summaryrefslogtreecommitdiff
path: root/lib/strtoimax.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-12-02 00:42:52 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-12-02 00:42:52 +0000
commit76bebf24a531f7019ba6369eb5eafe34c2992882 (patch)
tree49f0a2466e3dceb957fee8fb154d7cba140f2f87 /lib/strtoimax.c
parentb3c0bca1f8a793e886889f711a11d4490b8cab85 (diff)
downloadcoreutils-76bebf24a531f7019ba6369eb5eafe34c2992882.tar.xz
Import from gnulib.
Diffstat (limited to 'lib/strtoimax.c')
-rw-r--r--lib/strtoimax.c11
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);