aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorSteve Ellcey <sellcey@caviumnetworks.com>2016-11-04 09:37:44 -0700
committerSteve Ellcey <sellcey@caviumnetworks.com>2016-11-04 09:37:44 -0700
commitd060cd002dab2c5800a3e47d4d5e63814775e958 (patch)
tree0d9f4e20fb27eceaf96f326873319a1479964124 /sysdeps/generic
parent95e431cc73c2df3bc606107d6f79c4683bd61102 (diff)
downloadglibc-d060cd002dab2c5800a3e47d4d5e63814775e958.tar
glibc-d060cd002dab2c5800a3e47d4d5e63814775e958.tar.gz
glibc-d060cd002dab2c5800a3e47d4d5e63814775e958.tar.bz2
glibc-d060cd002dab2c5800a3e47d4d5e63814775e958.zip
Define wordsize.h macros everywhere
* bits/wordsize.h: Add documentation. * sysdeps/aarch64/bits/wordsize.h : New file * sysdeps/generic/stdint.h (PTRDIFF_MIN, PTRDIFF_MAX): Update definitions. (SIZE_MAX): Change ifdef to if in __WORDSIZE32_SIZE_ULONG check. * sysdeps/gnu/bits/utmp.h (__WORDSIZE_TIME64_COMPAT32): Check with #if instead of #ifdef. * sysdeps/gnu/bits/utmpx.h (__WORDSIZE_TIME64_COMPAT32): Ditto. * sysdeps/mips/bits/wordsize.h (__WORDSIZE32_SIZE_ULONG, __WORDSIZE32_PTRDIFF_LONG, __WORDSIZE_TIME64_COMPAT32): Add or change defines. * sysdeps/powerpc/powerpc32/bits/wordsize.h: Likewise. * sysdeps/powerpc/powerpc64/bits/wordsize.h: Likewise. * sysdeps/s390/s390-32/bits/wordsize.h: Likewise. * sysdeps/s390/s390-64/bits/wordsize.h: Likewise. * sysdeps/sparc/sparc32/bits/wordsize.h: Likewise. * sysdeps/sparc/sparc64/bits/wordsize.h: Likewise. * sysdeps/tile/tilegx/bits/wordsize.h: Likewise. * sysdeps/tile/tilepro/bits/wordsize.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/wordsize.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/wordsize.h: Likewise. * sysdeps/wordsize-32/bits/wordsize.h: Likewise. * sysdeps/wordsize-64/bits/wordsize.h: Likewise. * sysdeps/x86/bits/wordsize.h: Likewise.
Diffstat (limited to 'sysdeps/generic')
-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)