Use non-uglified typeof().
[bertos.git] / macros.h
index 6639d99b93705ef7f88a0a0a5e31b0f405b83c32..7fec0134842687a0dff87d6df2ee9c601228d154 100755 (executable)
--- 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++.
  *#*
 #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; \
        })