Browse Source

unistd.h: derive ILP32/LP64 macros from __LONG_MAX instead of arch bits

Rich Felker 7 months ago
parent
commit
29b216b2f2

+ 0 - 2
arch/aarch64/bits/posix.h

@@ -1,2 +0,0 @@
-#define _POSIX_V6_LP64_OFF64  1
-#define _POSIX_V7_LP64_OFF64  1

+ 0 - 2
arch/arm/bits/posix.h

@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG  1
-#define _POSIX_V7_ILP32_OFFBIG  1

+ 0 - 2
arch/i386/bits/posix.h

@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG  1
-#define _POSIX_V7_ILP32_OFFBIG  1

+ 0 - 2
arch/loongarch64/bits/posix.h

@@ -1,2 +0,0 @@
-#define _POSIX_V6_LP64_OFF64 1
-#define _POSIX_V7_LP64_OFF64 1

+ 0 - 2
arch/m68k/bits/posix.h

@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG  1
-#define _POSIX_V7_ILP32_OFFBIG  1

+ 0 - 2
arch/microblaze/bits/posix.h

@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG  1
-#define _POSIX_V7_ILP32_OFFBIG  1

+ 0 - 2
arch/mips/bits/posix.h

@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG  1
-#define _POSIX_V7_ILP32_OFFBIG  1

+ 0 - 2
arch/mips64/bits/posix.h

@@ -1,2 +0,0 @@
-#define _POSIX_V6_LP64_OFFBIG 1
-#define _POSIX_V7_LP64_OFFBIG 1

+ 0 - 2
arch/mipsn32/bits/posix.h

@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG  1
-#define _POSIX_V7_ILP32_OFFBIG  1

+ 0 - 2
arch/or1k/bits/posix.h

@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG  1
-#define _POSIX_V7_ILP32_OFFBIG  1

+ 0 - 2
arch/powerpc/bits/posix.h

@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG  1
-#define _POSIX_V7_ILP32_OFFBIG  1

+ 0 - 2
arch/powerpc64/bits/posix.h

@@ -1,2 +0,0 @@
-#define _POSIX_V6_LP64_OFF64  1
-#define _POSIX_V7_LP64_OFF64  1

+ 0 - 2
arch/riscv32/bits/posix.h

@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG 1
-#define _POSIX_V7_ILP32_OFFBIG 1

+ 0 - 2
arch/riscv64/bits/posix.h

@@ -1,2 +0,0 @@
-#define _POSIX_V6_LP64_OFF64 1
-#define _POSIX_V7_LP64_OFF64 1

+ 0 - 2
arch/s390x/bits/posix.h

@@ -1,2 +0,0 @@
-#define _POSIX_V6_LP64_OFF64  1
-#define _POSIX_V7_LP64_OFF64  1

+ 0 - 2
arch/sh/bits/posix.h

@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG  1
-#define _POSIX_V7_ILP32_OFFBIG  1

+ 0 - 2
arch/x32/bits/posix.h

@@ -1,2 +0,0 @@
-#define _POSIX_V6_ILP32_OFFBIG  1
-#define _POSIX_V7_ILP32_OFFBIG  1

+ 0 - 2
arch/x86_64/bits/posix.h

@@ -1,2 +0,0 @@
-#define _POSIX_V6_LP64_OFF64  1
-#define _POSIX_V7_LP64_OFF64  1

+ 7 - 1
include/unistd.h

@@ -257,7 +257,13 @@ pid_t gettid(void);
 
 #define _POSIX2_C_BIND          _POSIX_VERSION
 
-#include <bits/posix.h>
+#if __LONG_MAX == 0x7fffffffL
+#define _POSIX_V6_ILP32_OFFBIG  1
+#define _POSIX_V7_ILP32_OFFBIG  1
+#else
+#define _POSIX_V6_LP64_OFF64  1
+#define _POSIX_V7_LP64_OFF64  1
+#endif