diff options
author | Rich Felker <dalias@aerifal.cx> | 2024-05-07 09:01:47 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2024-05-07 09:01:47 -0400 |
commit | 29b216b2f22d3341c4c00608d7ad554a6aed26f7 (patch) | |
tree | 7eec27d88807a1ea0f9eb0dfb57457b29a583958 /include | |
parent | 0dfa1d8caadb7b308740d7695b592c207bfad543 (diff) | |
download | musl-29b216b2f22d3341c4c00608d7ad554a6aed26f7.tar.gz musl-29b216b2f22d3341c4c00608d7ad554a6aed26f7.zip |
unistd.h: derive ILP32/LP64 macros from __LONG_MAX instead of arch bits
Diffstat (limited to 'include')
-rw-r--r-- | include/unistd.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/unistd.h b/include/unistd.h index 5bc7f798..42b0e82b 100644 --- a/include/unistd.h +++ b/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 |