diff --git a/arch/i386/bits/limits.h b/arch/i386/bits/limits.h index 4e992453740f9f034cebce524dc6591f060043be..e19461df134b439e8d76911fea5dc483d92561ca 100644 --- a/arch/i386/bits/limits.h +++ b/arch/i386/bits/limits.h @@ -1,33 +1,8 @@ #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) -#define PIPE_BUF 4096 -#define PAGESIZE 4096 -#define PAGE_SIZE PAGESIZE -#define FILESIZEBITS 64 -#define NAME_MAX 255 -#define SYMLINK_MAX 255 -#define PATH_MAX 4096 -#define NZERO 20 -#define NGROUPS_MAX 32 -#define ARG_MAX 131072 -#define IOV_MAX 1024 -#define SYMLOOP_MAX 40 -#define WORD_BIT 32 +#define PAGE_SIZE 4096 #define LONG_BIT 32 #endif -#define SHRT_MIN (-1-0x7fff) -#define SHRT_MAX 0x7fff -#define USHRT_MAX 0xffff - -#define INT_MIN (-1-0x7fffffff) -#define INT_MAX 0x7fffffff -#define UINT_MAX 0xffffffffU - -#define LONG_MIN (-1-0x7fffffffL) #define LONG_MAX 0x7fffffffL -#define ULONG_MAX 0xffffffffUL - -#define LLONG_MIN (-1-0x7fffffffffffffffLL) #define LLONG_MAX 0x7fffffffffffffffLL -#define ULLONG_MAX 0xffffffffffffffffULL diff --git a/arch/x86_64/bits/limits.h b/arch/x86_64/bits/limits.h index 465448986bef851864247ac158cba8fe48930e71..2ba566bfa0472e8e16d7f906320bc628de47d054 100644 --- a/arch/x86_64/bits/limits.h +++ b/arch/x86_64/bits/limits.h @@ -1,34 +1,8 @@ #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) -#define PIPE_BUF 4096 -#define PAGESIZE 4096 -#define PAGE_SIZE PAGESIZE -#define FILESIZEBITS 64 -#define NAME_MAX 255 -#define SYMLINK_MAX 255 -#define PATH_MAX 4096 -#define NZERO 20 -#define NGROUPS_MAX 32 -#define ARG_MAX 131072 -#define IOV_MAX 1024 -#define SYMLOOP_MAX 40 -#define WORD_BIT 64 +#define PAGE_SIZE 4096 #define LONG_BIT 64 #endif -#define SHRT_MIN (-1-0x7fff) -#define SHRT_MAX 0x7fff -#define USHRT_MAX 0xffff - -#define INT_MIN (-1-0x7fffffff) -#define INT_MAX 0x7fffffff -#define UINT_MAX 0xffffffffU - -#define LONG_MIN (-1-0x7fffffffffffffffL) #define LONG_MAX 0x7fffffffffffffffL -#define ULONG_MAX 0xffffffffffffffffUL - -#define LLONG_MIN (-1-0x7fffffffffffffffLL) #define LLONG_MAX 0x7fffffffffffffffLL -#define ULLONG_MAX 0xffffffffffffffffULL - diff --git a/include/limits.h b/include/limits.h index 4d0410a0e08c9d324b8ef83a88c250c64cefb1bc..56f7a12f313dcad419d14e3a7543c9edbd09622f 100644 --- a/include/limits.h +++ b/include/limits.h @@ -13,12 +13,34 @@ #define UCHAR_MAX 255 #define CHAR_MIN (-128) #define CHAR_MAX 127 +#define SHRT_MIN (-1-0x7fff) +#define SHRT_MAX 0x7fff +#define USHRT_MAX 0xffff +#define INT_MIN (-1-0x7fffffff) +#define INT_MAX 0x7fffffff +#define UINT_MAX 0xffffffffU +#define LONG_MIN (-LONG_MAX-1) +#define ULONG_MAX (2UL*LONG_MAX+1) +#define LLONG_MIN (-LLONG_MAX-1) +#define ULLONG_MAX (2ULL*LLONG_MAX+1) #define MB_LEN_MAX 4 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) +#define PIPE_BUF 4096 +#define PAGESIZE PAGE_SIZE +#define FILESIZEBITS 64 +#define NAME_MAX 255 +#define SYMLINK_MAX 255 +#define PATH_MAX 4096 +#define NZERO 20 +#define NGROUPS_MAX 32 +#define ARG_MAX 131072 +#define IOV_MAX 1024 +#define SYMLOOP_MAX 40 +#define WORD_BIT 32 #define SSIZE_MAX LONG_MAX #define TZNAME_MAX 6 #define TTY_NAME_MAX 20