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_BUF (4 * 1024) 44 #define PIPE_MAX (512) 45 #define PTHREAD_KEYS_MAX 256 46 #define PTHREAD_STACK_MIN (2 * PAGESIZE) 47 #define SSIZE_MAX __HAIKU_SADDR_MAX 48 #define TTY_NAME_MAX (256) 49 #define TZNAME_MAX (32) 50 #define SYMLINK_MAX (1024) 51 #define SYMLOOP_MAX (16) 52 53 #define _POSIX_ARG_MAX (32768) 54 #define _POSIX_CHILD_MAX (1024) 55 #define _POSIX_HOST_NAME_MAX (255) 56 #define _POSIX_LINK_MAX (1) 57 #define _POSIX_LOGIN_NAME_MAX (9) 58 #define _POSIX_MAX_CANON (255) 59 #define _POSIX_MAX_INPUT (255) 60 #define _POSIX_NAME_MAX (255) 61 #define _POSIX_NGROUPS_MAX (8) 62 #define _POSIX_OPEN_MAX (128) 63 #define _POSIX_PATH_MAX (1024) 64 #define _POSIX_PIPE_BUF (512) 65 #define _POSIX_SSIZE_MAX __HAIKU_SADDR_MAX 66 #define _POSIX_STREAM_MAX (8) 67 #define _POSIX_TTY_NAME_MAX (256) 68 #define _POSIX_TZNAME_MAX (3) 69 #define _POSIX_SEM_VALUE_MAX INT_MAX 70 #define _POSIX_SIGQUEUE_MAX 32 71 #define _POSIX_RTSIG_MAX 8 72 #define _POSIX_CLOCKRES_MIN 20000000 73 #define _POSIX_TIMER_MAX 32 74 #define _POSIX_DELAYTIMER_MAX 32 75 #define _POSIX_SEM_NSEMS_MAX (256) 76 77 #define _POSIX2_LINE_MAX (2048) 78 79 #ifdef _XOPEN_SOURCE 80 /* The XSI name for PAGESIZE, with extra underscore included. Only define if 81 * _XOPEN_SOURCE was requested, otherwise it could conflict with the application. 82 */ 83 #define PAGE_SIZE PAGESIZE 84 /* XSI extension: Default process priority. This is used by the implementation 85 * of getpriority(), setpriority() and nice(). */ 86 #define NZERO 20 87 #endif 88 89 /* _GCC_LIMITS_H_ is defined by GCC's internal limits.h to avoid 90 * collisions with any defines in this file. 91 */ 92 #ifndef _GCC_LIMITS_H_ 93 # include_next <limits.h> 94 #endif 95 96 #endif /* _LIBC_LIMITS_H_ */ 97