diff options
author | Jim Meyering <jim@meyering.net> | 2005-03-17 19:00:52 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2005-03-17 19:00:52 +0000 |
commit | 4ef7ce47dc621209b97bc6074844ea7d290f8286 (patch) | |
tree | 31637f29586f516c1a6f21d42ca0f94d323183d9 /src | |
parent | e778babb0075359c77a7abeddefd7fb748572649 (diff) | |
download | coreutils-4ef7ce47dc621209b97bc6074844ea7d290f8286.tar.xz |
Make __typeof__-using code depend on HAVE_TYPEOF, not __GNUC__,
since so many other C compilers also honor __typeof__.
Diffstat (limited to 'src')
-rw-r--r-- | src/system.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/system.h b/src/system.h index ce14aae9e..acd8a5203 100644 --- a/src/system.h +++ b/src/system.h @@ -818,10 +818,10 @@ ptr_align (void *ptr, size_t alignment) #define VERIFY_EXPR(assertion) \ (void)((struct {char a[(assertion) ? 1 : -1]; } *) 0) -#ifdef __GNUC__ -# define VERIFY_GCC_EXPR(assertion) VERIFY_EXPR (assertion) +#if HAVE_TYPEOF +# define VERIFY_W_TYPEOF(assertion) VERIFY_EXPR (assertion) #else -# define VERIFY_GCC_EXPR(assertion) (void) 0 +# define VERIFY_W_TYPEOF(assertion) (void) 0 #endif /* If 10*Accum+Digit_val is larger than Type_max, then don't update Accum @@ -832,7 +832,7 @@ ptr_align (void *ptr, size_t alignment) #define DECIMAL_DIGIT_ACCUMULATE(Accum, Digit_val, Type_max) \ ( \ /* Ensure that Type_max is the maximum value of Accum. */ \ - VERIFY_GCC_EXPR (TYPE_MAXIMUM (__typeof__ (Accum)) == (Type_max)), \ + VERIFY_W_TYPEOF (TYPE_MAXIMUM (__typeof__ (Accum)) == (Type_max)), \ /* If the result would overflow, return 1. \ Otherwise update Accum and return 0. */ \ ((Type_max) / 10 < Accum || Accum * 10 + (Digit_val) < Accum \ |