xref: /haiku/headers/posix/limits.h (revision 7120e97489acbf17d86d3f33e3b2e68974fd4b23)
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 /* These are various BeOS implementation limits */
54 
55 #define ARG_MAX			 		(32768)
56 #define ATEXIT_MAX			 	(32)	 /* XXXdbg */
57 #define CHILD_MAX				(1024)
58 #define IOV_MAX					(256)	/* really there is no limit */
59 #define FILESIZEBITS			(64)
60 #define LINK_MAX				(1)
61 #define LOGIN_NAME_MAX			(32)	 /* XXXdbg */
62 #define MAX_CANON		   		(255)
63 #define MAX_INPUT				(255)
64 #define NAME_MAX				(256)
65 #define NGROUPS_MAX		 		(32)
66 #define OPEN_MAX				(128)
67 #define PATH_MAX				(1024)
68 #define PIPE_MAX				(512)
69 #define SSIZE_MAX		  		(2147483647L)
70 #define TTY_NAME_MAX			(256)
71 #define TZNAME_MAX		  		(32)
72 #define	SYMLINKS_MAX			(16)
73 
74 #define _POSIX_ARG_MAX	  		(32768)
75 #define _POSIX_CHILD_MAX		(1024)
76 #define _POSIX_LINK_MAX	 		(1)
77 #define _POSIX_LOGIN_NAME_MAX	(9)		/* XXXdbg */
78 #define _POSIX_MAX_CANON		(255)
79 #define _POSIX_MAX_INPUT		(255)
80 #define _POSIX_NAME_MAX	 		(255)
81 #define _POSIX_NGROUPS_MAX  	(0)
82 #define _POSIX_OPEN_MAX	 		(128)
83 #define _POSIX_PATH_MAX	 		(1024)
84 #define _POSIX_PIPE_BUF	 		(512)
85 #define _POSIX_SSIZE_MAX		(2147483647L)
86 #define _POSIX_STREAM_MAX   	(8)
87 #define _POSIX_TTY_NAME_MAX		(256)
88 #define _POSIX_TZNAME_MAX   	(3)
89 
90 #endif /* _LIMITS_H_ */
91