limits.h revision 00796434
1/*
2 * Copyright 2001-2012 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef _LIBC_LIMITS_H_
6#define _LIBC_LIMITS_H_
7	/* Note: The header guard is checked in gcc's limits.h. */
8
9
10#include <config/types.h>
11
12#include <float.h>		/* for DBL_DIG, FLT_DIG, etc */
13
14#define LONGLONG_MIN    (-9223372036854775807LL - 1)  /* these are Be specific */
15#define LONGLONG_MAX    (9223372036854775807LL)
16#define ULONGLONG_MAX   (0xffffffffffffffffULL)
17
18#define	ULLONG_MAX		ULONGLONG_MAX
19#define	LLONG_MAX		LONGLONG_MAX
20#define	LLONG_MIN		LONGLONG_MIN
21
22#define MB_LEN_MAX		16
23
24#define OFF_MAX			LLONG_MAX
25#define OFF_MIN			LLONG_MIN
26
27#define ARG_MAX			 		(32768)
28#define ATEXIT_MAX			 	(32)
29#define CHILD_MAX				(1024)
30#define IOV_MAX					(1024)
31#define FILESIZEBITS			(64)
32#define HOST_NAME_MAX			(255)
33#define LINE_MAX				(2048)
34#define LINK_MAX				(1)
35#define LOGIN_NAME_MAX			(32)
36#define MAX_CANON		   		(255)
37#define MAX_INPUT				(255)
38#define NAME_MAX				(256)
39#define NGROUPS_MAX		 		(32)
40#define OPEN_MAX				(128)
41#define PAGESIZE				(4096)
42#define PATH_MAX				(1024)
43#define PIPE_MAX				(512)
44#define PTHREAD_KEYS_MAX		256
45#define PTHREAD_STACK_MIN		(2 * PAGESIZE)
46#define SSIZE_MAX		  		__HAIKU_SADDR_MAX
47#define TTY_NAME_MAX			(256)
48#define TZNAME_MAX		  		(32)
49#define	SYMLINK_MAX				(1024)
50#define	SYMLOOP_MAX				(16)
51
52#define _POSIX_ARG_MAX	  		(32768)
53#define _POSIX_CHILD_MAX		(1024)
54#define _POSIX_HOST_NAME_MAX	(255)
55#define _POSIX_LINK_MAX	 		(1)
56#define _POSIX_LOGIN_NAME_MAX	(9)
57#define _POSIX_MAX_CANON		(255)
58#define _POSIX_MAX_INPUT		(255)
59#define _POSIX_NAME_MAX	 		(255)
60#define _POSIX_NGROUPS_MAX  	(8)
61#define _POSIX_OPEN_MAX	 		(128)
62#define _POSIX_PATH_MAX	 		(1024)
63#define _POSIX_PIPE_BUF	 		(512)
64#define _POSIX_SSIZE_MAX		__HAIKU_SADDR_MAX
65#define _POSIX_STREAM_MAX   	(8)
66#define _POSIX_TTY_NAME_MAX		(256)
67#define _POSIX_TZNAME_MAX   	(3)
68#define _POSIX_SEM_VALUE_MAX	INT_MAX
69#define	_POSIX_SIGQUEUE_MAX		32
70#define _POSIX_RTSIG_MAX		8
71#define _POSIX_CLOCKRES_MIN		20000000
72#define _POSIX_TIMER_MAX		32
73#define _POSIX_DELAYTIMER_MAX	32
74#define _POSIX_SEM_NSEMS_MAX	(256)
75
76#define _POSIX2_LINE_MAX		(2048)
77
78/* The XSI name for PAGESIZE, with extra underscore included. Only define if
79 * _XOPEN_SOURCE was requested, otherwise it could conflict with the application.
80 */
81#ifdef _XOPEN_SOURCE
82#define PAGE_SIZE				PAGESIZE
83#endif
84
85/* _GCC_LIMITS_H_ is defined by GCC's internal limits.h to avoid
86 * collisions with any defines in this file.
87 */
88#ifndef _GCC_LIMITS_H_
89#	include_next <limits.h>
90#endif
91
92#endif /* _LIBC_LIMITS_H_ */
93