aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic/stdint.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/stdint.h')
-rw-r--r--sysdeps/generic/stdint.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/sysdeps/generic/stdint.h b/sysdeps/generic/stdint.h
index 5428dbc30d..8e4347c623 100644
--- a/sysdeps/generic/stdint.h
+++ b/sysdeps/generic/stdint.h
@@ -249,8 +249,13 @@ typedef unsigned long long int uintmax_t;
# define PTRDIFF_MIN (-9223372036854775807L-1)
# define PTRDIFF_MAX (9223372036854775807L)
# else
-# define PTRDIFF_MIN (-2147483647-1)
-# define PTRDIFF_MAX (2147483647)
+# if __WORDSIZE32_PTRDIFF_LONG
+# define PTRDIFF_MIN (-2147483647L-1)
+# define PTRDIFF_MAX (2147483647L)
+# else
+# define PTRDIFF_MIN (-2147483647-1)
+# define PTRDIFF_MAX (2147483647)
+# endif
# endif
/* Limits of `sig_atomic_t'. */
@@ -261,7 +266,7 @@ typedef unsigned long long int uintmax_t;
# if __WORDSIZE == 64
# define SIZE_MAX (18446744073709551615UL)
# else
-# ifdef __WORDSIZE32_SIZE_ULONG
+# if __WORDSIZE32_SIZE_ULONG
# define SIZE_MAX (4294967295UL)
# else
# define SIZE_MAX (4294967295U)