1 #ifndef _LIMITS_H_ 2 #define _LIMITS_H_ 3 4 #include <float.h> /* for DBL_DIG, FLT_DIG, etc */ 5 6 /* XXX - commented out until we have GCC headers as this stops us 7 * building 8 * For now we'll just use the values given for non-intel platforms. 9 */ 10 11 /* _GCC_LIMITS_H_ is defined by GCC's internal limits.h to avoid 12 * collisions with any defines in this file. 13 */ 14 /* 15 #if __INTEL__ 16 # ifndef _GCC_LIMITS_H_ 17 # include_next <limits.h> 18 # endif 19 #else 20 */ 21 #define CHAR_BIT (8) 22 23 #define SCHAR_MIN (-127-1) 24 #define SCHAR_MAX (127) 25 26 #define UCHAR_MAX (255U) 27 28 #define CHAR_MIN SCHAR_MIN 29 #define CHAR_MAX SCHAR_MAX 30 31 #define MB_LEN_MAX (1) 32 33 #define SHRT_MIN (-32767-1) 34 #define SHRT_MAX (32767) 35 36 #define USHRT_MAX (65535U) 37 38 #define LONG_MIN (-2147483647L-1) 39 #define LONG_MAX (2147483647L) 40 41 #define ULONG_MAX (4294967295U) 42 43 #define INT_MIN LONG_MIN 44 #define INT_MAX LONG_MAX 45 #define UINT_MAX ULONG_MAX 46 47 //#endif /* else not INTEL */ 48 49 #define LONGLONG_MIN (-9223372036854775807LL - 1) /* these are Be specific */ 50 #define LONGLONG_MAX (9223372036854775807LL) 51 #define ULONGLONG_MAX (0xffffffffffffffffULL) 52 53 #define ULLONG_MAX ULONGLONG_MAX 54 #define LLONG_MAX LONGLONG_MAX 55 #define LLONG_MIN LONGLONG_MIN 56 57 #define OFF_MAX LLONG_MAX 58 #define OFF_MIN LLONG_MIN 59 60 /* These are various BeOS implementation limits */ 61 62 #define ARG_MAX (32768) 63 #define ATEXIT_MAX (32) /* XXXdbg */ 64 #define CHILD_MAX (1024) 65 #define IOV_MAX (256) /* really there is no limit */ 66 #define FILESIZEBITS (64) 67 #define LINK_MAX (1) 68 #define LOGIN_NAME_MAX (32) /* XXXdbg */ 69 #define MAX_CANON (255) 70 #define MAX_INPUT (255) 71 #define NAME_MAX (256) 72 #define NGROUPS_MAX (32) 73 #define OPEN_MAX (128) 74 #define PATH_MAX (1024) 75 #define PIPE_MAX (512) 76 #define SSIZE_MAX (2147483647L) 77 #define TTY_NAME_MAX (256) 78 #define TZNAME_MAX (32) 79 #define SYMLINKS_MAX (16) 80 81 #define _POSIX_ARG_MAX (32768) 82 #define _POSIX_CHILD_MAX (1024) 83 #define _POSIX_LINK_MAX (1) 84 #define _POSIX_LOGIN_NAME_MAX (9) /* XXXdbg */ 85 #define _POSIX_MAX_CANON (255) 86 #define _POSIX_MAX_INPUT (255) 87 #define _POSIX_NAME_MAX (255) 88 #define _POSIX_NGROUPS_MAX (0) 89 #define _POSIX_OPEN_MAX (128) 90 #define _POSIX_PATH_MAX (1024) 91 #define _POSIX_PIPE_BUF (512) 92 #define _POSIX_SSIZE_MAX (2147483647L) 93 #define _POSIX_STREAM_MAX (8) 94 #define _POSIX_TTY_NAME_MAX (256) 95 #define _POSIX_TZNAME_MAX (3) 96 97 #endif /* _LIMITS_H_ */ 98