Re: 2.4.9 does not compile [PATCH]

From: Anton Altaparmakov (aia21@cam.ac.uk)
Date: Thu Aug 16 2001 - 18:22:43 EST


At 23:31 16/08/2001, David S. Miller wrote:
> From: tpepper@vato.org
> Date: Thu, 16 Aug 2001 14:41:09 -0700
>
> Confirmed here. Looks like a pretty obvious goof to me. Does the
> following
> fix it for you?
>
>The args and semantics of min/max changed to take
>a type first argument, the problem with this ntfs file is that it
>fails to include linux/kernel.h

It has indeed. I do fail to see why that was necessary though...

IMHO, it would have been more elegant to use the typeof construct provided
by gcc in the new macro instead of introducing a type parameter like this...

#define min(x,y) \
         ({ typeof(x) __x = (x); typeof(y) __y = (y); __x < __y ? __x: __y; })

Best regards,

         Anton

-- 
   "Nothing succeeds like success." - Alexandre Dumas
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS Maintainer / WWW: http://linux-ntfs.sf.net/
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 23 2001 - 21:00:19 EST