posix_limits.h revision 73c44a4738fdb615eaede1d0ab21fc3de59105ab
1a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes/* 2a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * Copyright (C) 2014 The Android Open Source Project 3a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * All rights reserved. 4a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * 5a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * Redistribution and use in source and binary forms, with or without 6a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * modification, are permitted provided that the following conditions 7a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * are met: 8a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * * Redistributions of source code must retain the above copyright 9a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * notice, this list of conditions and the following disclaimer. 10a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * * Redistributions in binary form must reproduce the above copyright 11a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * notice, this list of conditions and the following disclaimer in 12a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * the documentation and/or other materials provided with the 13a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * distribution. 14a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * 15a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 18a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 19a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 20a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 21a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 22a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 25a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes * SUCH DAMAGE. 27a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes */ 28a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes 295704c423c81790195161c1757ae79da188590c51Elliott Hughes#ifndef _BITS_POSIX_LIMITS_H_ 305704c423c81790195161c1757ae79da188590c51Elliott Hughes#define _BITS_POSIX_LIMITS_H_ 31a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes 32203e13d97de840e01eded6a267fef9f245cf3a15Elliott Hughes#include <sys/cdefs.h> 331c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui 341c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui/* Any constant values here other than -1 or 200809L are explicitly specified by POSIX.1-2008. */ 3573c44a4738fdb615eaede1d0ab21fc3de59105abElliott Hughes/* Keep this list sorted by name. */ 365afae64a1bac56638c6348f0c8f5e9d61b654029Yabin Cui#define _POSIX_ADVISORY_INFO 200809L 371c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_AIO_LISTIO_MAX 2 381c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_AIO_MAX 1 39a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_ARG_MAX 4096 401c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_ASYNCHRONOUS_IO -1 /* not implemented */ 4173c44a4738fdb615eaede1d0ab21fc3de59105abElliott Hughes#define _POSIX_BARRIERS 200809L 42a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_CHILD_MAX 25 43a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_CHOWN_RESTRICTED 1 /* yes, chown requires appropriate privileges */ 441c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_CLOCK_SELECTION 200809L 45725756045e03ea6f7ef00d02e883ef2914d06ddeYabin Cui#define _POSIX_CPUTIME 0 /* Use sysconf to detect support at runtime. */ 461c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_DELAYTIMER_MAX 32 471c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_FSYNC 200809L /* fdatasync() supported */ 480589777a33a08b88682e31cfbc008889b3f258d0Yongqin Liu#define _POSIX_HOST_NAME_MAX 255 491c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_IPV6 200809L 501c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_JOB_CONTROL 1 /* job control is a Linux feature */ 51a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_LINK_MAX 8 52a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_LOGIN_NAME_MAX 9 /* includes trailing NUL */ 531c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_MAPPED_FILES 200809L /* mmap-ed files supported */ 54a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_MAX_CANON 255 55a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_MAX_INPUT 255 561c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_MEMLOCK 200809L 571c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_MEMLOCK_RANGE 200809L 581c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_MEMORY_PROTECTION 200809L 591c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_MESSAGE_PASSING -1 /* not implemented */ 60a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_MONOTONIC_CLOCK 0 /* the monotonic clock may be available; ask sysconf */ 611c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_MQ_OPEN_MAX 8 621c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_MQ_PRIO_MAX 32 63a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_NAME_MAX 14 641c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_NGROUPS_MAX 8 65a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_NO_TRUNC 1 /* very long pathnames generate an error */ 661c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_OPEN_MAX 20 67a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_PATH_MAX 256 68a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_PIPE_BUF 512 691c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_PRIORITY_SCHEDULING 200809L /* priority scheduling is a Linux feature */ 701c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_PRIORITIZED_IO -1 /* not implemented */ 711c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_RAW_SOCKETS 200809L 721c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_READER_WRITER_LOCKS 200809L 73634816055f51c536d24dea30dfe930b7fe2fa603Yabin Cui#define _POSIX_REALTIME_SIGNALS 200809L 741c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_REGEXP 1 75a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_RE_DUP_MAX 255 76a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_SAVED_IDS 1 /* saved user ids is a Linux feature */ 77a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_SEMAPHORES 200809L 781c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_SEM_NSEMS_MAX 256 79a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_SEM_VALUE_MAX 32767 801c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_SHARED_MEMORY_OBJECTS -1 /* shm_open()/shm_unlink() not implemented */ 811c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_SHELL 1 /* system() supported */ 821c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_SIGQUEUE_MAX 32 831c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_SPAWN -1 /* not implemented */ 8473c44a4738fdb615eaede1d0ab21fc3de59105abElliott Hughes#define _POSIX_SPIN_LOCKS 200809L 851c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_SPORADIC_SERVER -1 /* not implemented */ 86a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_SSIZE_MAX 32767 87a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_STREAM_MAX 8 88a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_SYMLINK_MAX 255 89a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_SYMLOOP_MAX 8 901c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_SYNCHRONIZED_IO 200809L /* synchronized i/o supported */ 911c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_THREADS 200809L /* we support threads */ 921c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_THREAD_ATTR_STACKADDR 200809L 931c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_THREAD_ATTR_STACKSIZE 200809L 94725756045e03ea6f7ef00d02e883ef2914d06ddeYabin Cui#define _POSIX_THREAD_CPUTIME 0 /* Use sysconf to detect support at runtime. */ 951c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 961c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_THREAD_KEYS_MAX 128 971c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_THREAD_PRIORITY_SCHEDULING 200809L 987292725bcd291bda814554fcb9d7c026619c0e49Elliott Hughes#define _POSIX_THREAD_PRIO_INHERIT -1 /* not implemented */ 997292725bcd291bda814554fcb9d7c026619c0e49Elliott Hughes#define _POSIX_THREAD_PRIO_PROTECT -1 /* not implemented */ 1001c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_THREAD_PROCESS_SHARED -1 /* not implemented */ 1011c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_THREAD_ROBUST_PRIO_INHERIT -1 /* not implemented */ 1021c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1 /* not implemented */ 1031c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_THREAD_SAFE_FUNCTIONS 200809L 1041c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_THREAD_SPORADIC_SERVER -1 /* not implemented */ 1051c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_THREAD_THREADS_MAX 64 1061c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_TIMEOUTS 200809L 1071c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_TIMERS 200809L /* Posix timers are supported */ 1081c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_TIMER_MAX 32 1091c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_TRACE -1 /* not implemented */ 1101c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_TRACE_EVENT_FILTER -1 /* not implemented */ 1111c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_TRACE_INHERIT -1 /* not implemented */ 1121c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_TRACE_LOG -1 /* not implemented */ 1131c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_TRACE_NAME_MAX 8 1141c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_TRACE_SYS_MAX 8 1151c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_TRACE_USER_EVENT_MAX 32 116a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_TTY_NAME_MAX 9 /* includes trailing NUL */ 1171c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_TYPED_MEMORY_OBJECTS -1 /* not implemented */ 1181c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_TZNAME_MAX 6 119a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes#define _POSIX_VDISABLE '\0' 120a186b2e0ca19620a52b4a49c17835532d13eb30aElliott Hughes 1211c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#if defined(__LP64__) 1221c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_V7_ILP32_OFF32 -1 1231c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_V7_ILP32_OFFBIG -1 1241c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_V7_LP64_OFF64 1 1251c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_V7_LPBIG_OFFBIG 1 1261c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#else 1271c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_V7_ILP32_OFF32 1 1281c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_V7_ILP32_OFFBIG -1 1291c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_V7_LP64_OFF64 -1 1301c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX_V7_LPBIG_OFFBIG -1 1311c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#endif 1321c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui 1331c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX2_BC_BASE_MAX 99 1341c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX2_BC_DIM_MAX 2048 1351c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX2_BC_SCALE_MAX 99 1361c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX2_BC_STRING_MAX 1000 1371c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX2_CHARCLASS_NAME_MAX 14 1381c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX2_CHAR_TERM -1 /* not implemented */ 1391c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX2_COLL_WEIGHTS_MAX 2 1401c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX2_C_BIND _POSIX_VERSION 1411c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX2_C_DEV -1 /* c dev utilities not implemented */ 1421c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX2_EXPR_NEST_MAX 32 1431c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX2_LINE_MAX 2048 1441c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX2_LOCALEDEF -1 /* localedef utilitiy not implemented */ 1451c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX2_RE_DUP_MAX _POSIX_RE_DUP_MAX 1461c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX2_SW_DEV -1 /* software dev utilities not implemented */ 1471c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _POSIX2_UPE -1 /* user portability utilities not implemented */ 1481c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui 1491c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _XOPEN_ENH_I18N -1 /* we don't support internationalization in the C library */ 1501c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _XOPEN_CRYPT -1 /* don't support X/Open Encryption */ 1511c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _XOPEN_IOV_MAX 16 1521c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _XOPEN_LEGACY -1 /* not support all */ 1531c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _XOPEN_REALTIME -1 /* we don't support all these functions */ 1541c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _XOPEN_REALTIME_THREADS -1 /* same here */ 1551c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _XOPEN_SHM -1 1561c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui#define _XOPEN_UNIX 1 1571c19194c9d2518dbe86973cd313a277ecb70d75cYabin Cui 1585704c423c81790195161c1757ae79da188590c51Elliott Hughes#endif 159