From: Sami Kerola Date: Sun, 27 Feb 2011 12:05:09 +0000 (+0100) Subject: include: [c.h]: typeof to __typeof__ fix X-Git-Tag: v2.20-rc1~478 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c764e1a41d52ee427ee492c6bf882a86f8dc9532;p=thirdparty%2Futil-linux.git include: [c.h]: typeof to __typeof__ fix Signed-off-by: Sami Kerola --- diff --git a/include/c.h b/include/c.h index 0db8b2b590..f725fc7eb3 100644 --- a/include/c.h +++ b/include/c.h @@ -32,10 +32,10 @@ /* &a[0] degrades to a pointer: a different type from an array */ # define __must_be_array(a) \ - BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0]))) + BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(__typeof__(a), __typeof__(&a[0]))) # define ignore_result(x) ({ \ - typeof(x) __dummy __attribute__((__unused__)) = (x); (void) __dummy; \ + __typeof__(x) __dummy __attribute__((__unused__)) = (x); (void) __dummy; \ }) #else /* !__GNUC__ */ @@ -89,16 +89,16 @@ #ifndef min # define min(x, y) ({ \ - typeof(x) _min1 = (x); \ - typeof(y) _min2 = (y); \ + __typeof__(x) _min1 = (x); \ + __typeof__(y) _min2 = (y); \ (void) (&_min1 == &_min2); \ _min1 < _min2 ? _min1 : _min2; }) #endif #ifndef max # define max(x, y) ({ \ - typeof(x) _max1 = (x); \ - typeof(y) _max2 = (y); \ + __typeof__(x) _max1 = (x); \ + __typeof__(y) _max2 = (y); \ (void) (&_max1 == &_max2); \ _max1 > _max2 ? _max1 : _max2; }) #endif