FENIX_libc/include/limits.h

152 lines
3.9 KiB
C
Raw Normal View History

2020-11-18 09:41:58 +00:00
/*
* <limits.h> - implementation-defined constants
*
* This header is a part of the FENIX C Library and is free software.
* You can redistribute and/or modify it subject to the terms of the
* Clumsy Wolf Public License v4. For more details, see the file COPYING.
*
* The FENIX C Library is distributed WITH NO WARRANTY WHATSOEVER. See
* The CWPL for more details.
*/
#ifndef _FLC_LIMITS
#define _FLC_LIMITS
/*
Minimum values (POSIX)
Included in case anyone wants/needs 'em.
*/
#define _POSIX_AIO_LISTIO_MAX 2
#define _POSIX_AIO_MAX 1
#define _POSIX_ARG_MAX 4096
#define _POSIX_CHILD_MAX 25
#define _POSIX_DELAYTIMER_MAX 32
#define _POSIX_HOST_NAME_MAX 255
#define _POSIX_LINK_MAX 8
#define _POSIX_LOGIN_NAME_MAX 9
#define _POSIX_MAX_CANON 255
#define _POSIX_MAX_INPUT 255
#define _POSIX_MQ_OPEN_MAX 8
#define _POSIX_MQ_PRIO_MAX 32
#define _POSIX_NAME_MAX 14
#define _POSIX_NGROUPS_MAX 8
#define _POSIX_OPEN_MAX 20
#define _POSIX_PATH_MAX 256
#define _POSIX_PIPE_BUF 512
#define _POSIX_RE_DUP_MAX 255
#define _POSIX_RTSIG_MAX 8
#define _POSIX_SEM_NSEMS_MAX 256
#define _POSIX_SEM_VALUE_MAX 32767
#define _POSIX_SIGQUEUE_MAX 32
#define _POSIX_SSIZE_MAX 32767
#define _POSIX_SS_REPL_MAX 4
#define _POSIX_STREAM_MAX 8
#define _POSIX_SYMLINK_MAX 255
#define _POSIX_SYMLOOP_MAX 8
#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
#define _POSIX_THREAD_KEYS_MAX 128
#define _POSIX_THREAD_THREADS_MAX 64
#define _POSIX_TIMER_MAX 32
#define _POSIX_TRACE_EVENT_NAME_MAX 30
#define _POSIX_TRACE_NAME_MAX 8
#define _POSIX_TRACE_SYS_MAX 8
#define _POSIX_TRACE_USER_EVENT_MAX 32
#define _POSIX_TTY_NAME_MAX 9
#define _POSIX_TZNAME_MAX 6
#define _POSIX2_BC_BASE_MAX 99
#define _POSIX2_BC_DIM_MAX 2048
#define _POSIX2_BC_SCALE_MAX 99
#define _POSIX2_BC_STRING_MAX 1000
#define _POSIX2_CHARCLASS_NAME_MAX 14
#define _POSIX2_COLL_WEIGHTS_MAX 2
#define _POSIX2_EXPR_NEST_MAX 32
#define _POSIX2_LINE_MAX 2048
#define _POSIX2_RE_DUP_MAX 255
#define _XOPEN_IOV_MAX 16
#define _XOPEN_NAME_MAX 255
#define _XOPEN_PATH_MAX 1024
/* Pathname Variable Values */
#define FILESIZEBITS 64
#define LINK_MAX 16
/*
Remember, you only get 1024 canons.
After that, new canons have to start
merging in with old ones. Hence,
Smash Ultimate.
-Kat
*/
#define MAX_CANON 1024
#define MAX_INPUT 256
#define NAME_MAX 256
#define PATH_MAX 4096
#define PIPE_BUF 1024
#define POSIX_ALLOC_SIZE_MIN 1024
#define POSIX_REC_INCR_XFER_SIZE 512
#define POSIX_REC_MAX_XFER_SIZE 1048576
#define POSIX_REC_MIN_XFER_SIZE 512
#define POSIX_REC_XFER_ALIGN 512
#define SYMLINK_MAX 2048
/* Runtime Increasable Values */
/*
So, when we do <unistd.h>, that makes these weird.
Fun. Fun, fun.
-Kat
*/
#define BC_BASE_MAX 256
#define BC_DIM_MAX 8192
#define BC_SCALE_MAX 99
#define BC_STRING_MAX 1024
#define CHARCLASS_NAME_MAX 32
#define COLL_WEIGHTS_MAX 4
#define EXPR_NEST_MAX 128
#define LINE_MAX 8192
#define RE_DUP_MAX 512
/* Maximum values */
#define _POSIX_CLOCKRES_MIN 20000000
/* Numerical limits */
/* Shorts (Defined as 16-bit) */
#define SHRT_MAX 32767
#define SHRT_MIN -32767
#define USHRT_MAX 65535
/* Integers (Defined as 32-bit here) */
#define WORD_BIT 32
#define INT_MAX 2147483647
#define INT_MIN -2147483648
#define UINT_MAX 4294967295U
/* Long ints (Defined as 64-bit) */
#define LONG_BIT 64
#define LONG_MAX 9223372036854775807LL
#define LONG_MIN -9223372036854775808LL
#define ULONG_MAX 18446744073709551615ULL
/* Long long ints (Also defined as 64-bit) */
#define LLONG_MAX 9223372036854775807LL
#define LLONG_MIN -9223372036854775808LL
#define ULLONG_MAX 18446744073709551615ULL
/* Characters (Defined as 8 bit) */
#define CHAR_BIT 8
#define CHAR_MAX 127
#define CHAR_MIN -128
#define SCHAR_MAX 127
#define SCHAR_MIN -128
#define UCHAR_MAX 255
#define MB_LEN_MAX 4
/* ssize_t */
#define SSIZE_MAX 32767
/* Miscellaneous invariants */
#define NL_ARGMAX 9
#define NL_LANGMAX 14
#define NL_MSGMAX 65535
#define NL_SETMAX 255
#define NL_TEXTMAX 8192
#define NZERO 20
#endif /* ndef _FLC_LIMITS */