summary refs log tree commit diff
path: root/stdlib/tst-strtol.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/tst-strtol.c')
-rw-r--r--stdlib/tst-strtol.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/stdlib/tst-strtol.c b/stdlib/tst-strtol.c
index 8719d4b9ed..62acafbfe3 100644
--- a/stdlib/tst-strtol.c
+++ b/stdlib/tst-strtol.c
@@ -6,6 +6,7 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <strings.h>
+#include <limits.h>
 
 struct ltest
   {
@@ -17,7 +18,7 @@ struct ltest
   };
 static const struct ltest tests[] =
   {
-#if ~0UL == 0xffffffff
+#if LONG_MAX == 0x7fffffff
     /* First, signed numbers.  */
     { "   -17",		-17,		0,	0,	0 },
     { " +0x123fg",	0x123f,		0,	'g',	0 },