diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2005-12-02 00:42:52 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2005-12-02 00:42:52 +0000 |
commit | 76bebf24a531f7019ba6369eb5eafe34c2992882 (patch) | |
tree | 49f0a2466e3dceb957fee8fb154d7cba140f2f87 /lib/strtoimax.c | |
parent | b3c0bca1f8a793e886889f711a11d4490b8cab85 (diff) | |
download | coreutils-76bebf24a531f7019ba6369eb5eafe34c2992882.tar.xz |
Import from gnulib.
Diffstat (limited to 'lib/strtoimax.c')
-rw-r--r-- | lib/strtoimax.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/strtoimax.c b/lib/strtoimax.c index 43a690d24..a15b84af3 100644 --- a/lib/strtoimax.c +++ b/lib/strtoimax.c @@ -32,8 +32,7 @@ #include <stdlib.h> -/* Verify a requirement at compile-time (unlike assert, which is runtime). */ -#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; } +#include "verify.h" #ifdef UNSIGNED # ifndef HAVE_DECL_STRTOULL @@ -68,15 +67,13 @@ INT strtoimax (char const *ptr, char **endptr, int base) { #if HAVE_LONG_LONG - verify (size_is_that_of_long_or_long_long, - (sizeof (INT) == sizeof (long int) - || sizeof (INT) == sizeof (long long int))); + verify (sizeof (INT) == sizeof (long int) + || sizeof (INT) == sizeof (long long int)); if (sizeof (INT) != sizeof (long int)) return strtoll (ptr, endptr, base); #else - verify (size_is_that_of_long, - sizeof (INT) == sizeof (long int)); + verify (sizeof (INT) == sizeof (long int)); #endif return strtol (ptr, endptr, base); |