X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=macros.h;h=7fec0134842687a0dff87d6df2ee9c601228d154;hb=03cc360121e2d82317702a73e0c816d4080fc8c5;hp=6639d99b93705ef7f88a0a0a5e31b0f405b83c32;hpb=710f861d5049012cbf64d9bae757b0e917907c8c;p=bertos.git diff --git a/macros.h b/macros.h index 6639d99b..7fec0134 100755 --- a/macros.h +++ b/macros.h @@ -14,6 +14,9 @@ /*#* *#* $Log$ + *#* Revision 1.10 2005/01/22 04:19:50 bernie + *#* Use non-uglified typeof(). + *#* *#* Revision 1.9 2004/12/08 08:51:34 bernie *#* Add type-generic macros for C++. *#* @@ -75,18 +78,18 @@ #elif (COMPILER_STATEMENT_EXPRESSIONS && COMPILER_TYPEOF) /* Type-generic macros implemented with statement expressions. */ #define ABS(n) ({ \ - __typeof__(n) _n = (n); \ + typeof(n) _n = (n); \ (_n < 0) ? -_n : _n; \ }) #define MIN(a,b) ({ \ - __typeof__(a) _a = (a); \ - __typeof__(b) _b = (b); \ + typeof(a) _a = (a); \ + typeof(b) _b = (b); \ (void)(&_a == &_b); /* ensure same type */ \ (_a < _b) ? _a : _b; \ }) #define MAX(a,b) ({ \ - __typeof__(a) _a = (a); \ - __typeof__(b) _b = (b); \ + typeof(a) _a = (a); \ + typeof(b) _b = (b); \ (void)(&_a == &_b); /* ensure same type */ \ (_a > _b) ? _a : _b; \ })