Skip to content

Commit

Permalink
add all android sysconf constants
Browse files Browse the repository at this point in the history
Source:
https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/include/bits/sysconf.h

Hex is used instead of decimal to match the source. No entries were
removed (can be verified with `--word-diff`).
  • Loading branch information
fkm3 committed Apr 13, 2024
1 parent ba73a3e commit 95c483e
Show file tree
Hide file tree
Showing 2 changed files with 165 additions and 134 deletions.
16 changes: 16 additions & 0 deletions libc-test/semver/android.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2920,6 +2920,21 @@ _SC_HOST_NAME_MAX
_SC_IOV_MAX
_SC_IPV6
_SC_JOB_CONTROL
_SC_LEVEL1_DCACHE_ASSOC
_SC_LEVEL1_DCACHE_LINESIZE
_SC_LEVEL1_DCACHE_SIZE
_SC_LEVEL1_ICACHE_ASSOC
_SC_LEVEL1_ICACHE_LINESIZE
_SC_LEVEL1_ICACHE_SIZE
_SC_LEVEL2_CACHE_ASSOC
_SC_LEVEL2_CACHE_LINESIZE
_SC_LEVEL2_CACHE_SIZE
_SC_LEVEL3_CACHE_ASSOC
_SC_LEVEL3_CACHE_LINESIZE
_SC_LEVEL3_CACHE_SIZE
_SC_LEVEL4_CACHE_ASSOC
_SC_LEVEL4_CACHE_LINESIZE
_SC_LEVEL4_CACHE_SIZE
_SC_LINE_MAX
_SC_LOGIN_NAME_MAX
_SC_MAPPED_FILES
Expand Down Expand Up @@ -2990,6 +3005,7 @@ _SC_TRACE_USER_EVENT_MAX
_SC_TTY_NAME_MAX
_SC_TYPED_MEMORY_OBJECTS
_SC_TZNAME_MAX
_SC_UIO_MAXIOV
_SC_V7_ILP32_OFF32
_SC_V7_ILP32_OFFBIG
_SC_V7_LP64_OFF64
Expand Down
283 changes: 149 additions & 134 deletions src/unix/linux_like/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1182,140 +1182,155 @@ pub const _PC_SYNC_IO: ::c_int = 19;

pub const FIONBIO: ::c_int = 0x5421;

pub const _SC_ARG_MAX: ::c_int = 0;
pub const _SC_BC_BASE_MAX: ::c_int = 1;
pub const _SC_BC_DIM_MAX: ::c_int = 2;
pub const _SC_BC_SCALE_MAX: ::c_int = 3;
pub const _SC_BC_STRING_MAX: ::c_int = 4;
pub const _SC_CHILD_MAX: ::c_int = 5;
pub const _SC_CLK_TCK: ::c_int = 6;
pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 7;
pub const _SC_EXPR_NEST_MAX: ::c_int = 8;
pub const _SC_LINE_MAX: ::c_int = 9;
pub const _SC_NGROUPS_MAX: ::c_int = 10;
pub const _SC_OPEN_MAX: ::c_int = 11;
pub const _SC_PASS_MAX: ::c_int = 12;
pub const _SC_2_C_BIND: ::c_int = 13;
pub const _SC_2_C_DEV: ::c_int = 14;
pub const _SC_2_C_VERSION: ::c_int = 15;
pub const _SC_2_CHAR_TERM: ::c_int = 16;
pub const _SC_2_FORT_DEV: ::c_int = 17;
pub const _SC_2_FORT_RUN: ::c_int = 18;
pub const _SC_2_LOCALEDEF: ::c_int = 19;
pub const _SC_2_SW_DEV: ::c_int = 20;
pub const _SC_2_UPE: ::c_int = 21;
pub const _SC_2_VERSION: ::c_int = 22;
pub const _SC_JOB_CONTROL: ::c_int = 23;
pub const _SC_SAVED_IDS: ::c_int = 24;
pub const _SC_VERSION: ::c_int = 25;
pub const _SC_RE_DUP_MAX: ::c_int = 26;
pub const _SC_STREAM_MAX: ::c_int = 27;
pub const _SC_TZNAME_MAX: ::c_int = 28;
pub const _SC_XOPEN_CRYPT: ::c_int = 29;
pub const _SC_XOPEN_ENH_I18N: ::c_int = 30;
pub const _SC_XOPEN_SHM: ::c_int = 31;
pub const _SC_XOPEN_VERSION: ::c_int = 32;
pub const _SC_XOPEN_XCU_VERSION: ::c_int = 33;
pub const _SC_XOPEN_REALTIME: ::c_int = 34;
pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 35;
pub const _SC_XOPEN_LEGACY: ::c_int = 36;
pub const _SC_ATEXIT_MAX: ::c_int = 37;
pub const _SC_IOV_MAX: ::c_int = 38;
pub const _SC_PAGESIZE: ::c_int = 39;
pub const _SC_PAGE_SIZE: ::c_int = 40;
pub const _SC_XOPEN_UNIX: ::c_int = 41;
pub const _SC_XBS5_ILP32_OFF32: ::c_int = 42;
pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 43;
pub const _SC_XBS5_LP64_OFF64: ::c_int = 44;
pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 45;
pub const _SC_AIO_LISTIO_MAX: ::c_int = 46;
pub const _SC_AIO_MAX: ::c_int = 47;
pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 48;
pub const _SC_DELAYTIMER_MAX: ::c_int = 49;
pub const _SC_MQ_OPEN_MAX: ::c_int = 50;
pub const _SC_MQ_PRIO_MAX: ::c_int = 51;
pub const _SC_RTSIG_MAX: ::c_int = 52;
pub const _SC_SEM_NSEMS_MAX: ::c_int = 53;
pub const _SC_SEM_VALUE_MAX: ::c_int = 54;
pub const _SC_SIGQUEUE_MAX: ::c_int = 55;
pub const _SC_TIMER_MAX: ::c_int = 56;
pub const _SC_ASYNCHRONOUS_IO: ::c_int = 57;
pub const _SC_FSYNC: ::c_int = 58;
pub const _SC_MAPPED_FILES: ::c_int = 59;
pub const _SC_MEMLOCK: ::c_int = 60;
pub const _SC_MEMLOCK_RANGE: ::c_int = 61;
pub const _SC_MEMORY_PROTECTION: ::c_int = 62;
pub const _SC_MESSAGE_PASSING: ::c_int = 63;
pub const _SC_PRIORITIZED_IO: ::c_int = 64;
pub const _SC_PRIORITY_SCHEDULING: ::c_int = 65;
pub const _SC_REALTIME_SIGNALS: ::c_int = 66;
pub const _SC_SEMAPHORES: ::c_int = 67;
pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 68;
pub const _SC_SYNCHRONIZED_IO: ::c_int = 69;
pub const _SC_TIMERS: ::c_int = 70;
pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 71;
pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 72;
pub const _SC_LOGIN_NAME_MAX: ::c_int = 73;
pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 74;
pub const _SC_THREAD_KEYS_MAX: ::c_int = 75;
pub const _SC_THREAD_STACK_MIN: ::c_int = 76;
pub const _SC_THREAD_THREADS_MAX: ::c_int = 77;
pub const _SC_TTY_NAME_MAX: ::c_int = 78;
pub const _SC_THREADS: ::c_int = 79;
pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 80;
pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 81;
pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 82;
pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 83;
pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 84;
pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 85;
pub const _SC_NPROCESSORS_CONF: ::c_int = 96;
pub const _SC_NPROCESSORS_ONLN: ::c_int = 97;
pub const _SC_PHYS_PAGES: ::c_int = 98;
pub const _SC_AVPHYS_PAGES: ::c_int = 99;
pub const _SC_MONOTONIC_CLOCK: ::c_int = 100;

pub const _SC_2_PBS: ::c_int = 101;
pub const _SC_2_PBS_ACCOUNTING: ::c_int = 102;
pub const _SC_2_PBS_CHECKPOINT: ::c_int = 103;
pub const _SC_2_PBS_LOCATE: ::c_int = 104;
pub const _SC_2_PBS_MESSAGE: ::c_int = 105;
pub const _SC_2_PBS_TRACK: ::c_int = 106;
pub const _SC_ADVISORY_INFO: ::c_int = 107;
pub const _SC_BARRIERS: ::c_int = 108;
pub const _SC_CLOCK_SELECTION: ::c_int = 109;
pub const _SC_CPUTIME: ::c_int = 110;
pub const _SC_HOST_NAME_MAX: ::c_int = 111;
pub const _SC_IPV6: ::c_int = 112;
pub const _SC_RAW_SOCKETS: ::c_int = 113;
pub const _SC_READER_WRITER_LOCKS: ::c_int = 114;
pub const _SC_REGEXP: ::c_int = 115;
pub const _SC_SHELL: ::c_int = 116;
pub const _SC_SPAWN: ::c_int = 117;
pub const _SC_SPIN_LOCKS: ::c_int = 118;
pub const _SC_SPORADIC_SERVER: ::c_int = 119;
pub const _SC_SS_REPL_MAX: ::c_int = 120;
pub const _SC_SYMLOOP_MAX: ::c_int = 121;
pub const _SC_THREAD_CPUTIME: ::c_int = 122;
pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 123;
pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 124;
pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 125;
pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 126;
pub const _SC_TIMEOUTS: ::c_int = 127;
pub const _SC_TRACE: ::c_int = 128;
pub const _SC_TRACE_EVENT_FILTER: ::c_int = 129;
pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 130;
pub const _SC_TRACE_INHERIT: ::c_int = 131;
pub const _SC_TRACE_LOG: ::c_int = 132;
pub const _SC_TRACE_NAME_MAX: ::c_int = 133;
pub const _SC_TRACE_SYS_MAX: ::c_int = 134;
pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 135;
pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 136;
pub const _SC_V7_ILP32_OFF32: ::c_int = 137;
pub const _SC_V7_ILP32_OFFBIG: ::c_int = 138;
pub const _SC_V7_LP64_OFF64: ::c_int = 139;
pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 140;
pub const _SC_XOPEN_STREAMS: ::c_int = 141;
pub const _SC_XOPEN_UUCP: ::c_int = 142;
pub const _SC_ARG_MAX: ::c_int = 0x0000;
pub const _SC_BC_BASE_MAX: ::c_int = 0x0001;
pub const _SC_BC_DIM_MAX: ::c_int = 0x0002;
pub const _SC_BC_SCALE_MAX: ::c_int = 0x0003;
pub const _SC_BC_STRING_MAX: ::c_int = 0x0004;
pub const _SC_CHILD_MAX: ::c_int = 0x0005;
pub const _SC_CLK_TCK: ::c_int = 0x0006;
pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 0x0007;
pub const _SC_EXPR_NEST_MAX: ::c_int = 0x0008;
pub const _SC_LINE_MAX: ::c_int = 0x0009;
pub const _SC_NGROUPS_MAX: ::c_int = 0x000a;
pub const _SC_OPEN_MAX: ::c_int = 0x000b;
pub const _SC_PASS_MAX: ::c_int = 0x000c;
pub const _SC_2_C_BIND: ::c_int = 0x000d;
pub const _SC_2_C_DEV: ::c_int = 0x000e;
pub const _SC_2_C_VERSION: ::c_int = 0x000f;
pub const _SC_2_CHAR_TERM: ::c_int = 0x0010;
pub const _SC_2_FORT_DEV: ::c_int = 0x0011;
pub const _SC_2_FORT_RUN: ::c_int = 0x0012;
pub const _SC_2_LOCALEDEF: ::c_int = 0x0013;
pub const _SC_2_SW_DEV: ::c_int = 0x0014;
pub const _SC_2_UPE: ::c_int = 0x0015;
pub const _SC_2_VERSION: ::c_int = 0x0016;
pub const _SC_JOB_CONTROL: ::c_int = 0x0017;
pub const _SC_SAVED_IDS: ::c_int = 0x0018;
pub const _SC_VERSION: ::c_int = 0x0019;
pub const _SC_RE_DUP_MAX: ::c_int = 0x001a;
pub const _SC_STREAM_MAX: ::c_int = 0x001b;
pub const _SC_TZNAME_MAX: ::c_int = 0x001c;
pub const _SC_XOPEN_CRYPT: ::c_int = 0x001d;
pub const _SC_XOPEN_ENH_I18N: ::c_int = 0x001e;
pub const _SC_XOPEN_SHM: ::c_int = 0x001f;
pub const _SC_XOPEN_VERSION: ::c_int = 0x0020;
pub const _SC_XOPEN_XCU_VERSION: ::c_int = 0x0021;
pub const _SC_XOPEN_REALTIME: ::c_int = 0x0022;
pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 0x0023;
pub const _SC_XOPEN_LEGACY: ::c_int = 0x0024;
pub const _SC_ATEXIT_MAX: ::c_int = 0x0025;
pub const _SC_IOV_MAX: ::c_int = 0x0026;
pub const _SC_UIO_MAXIOV: ::c_int = _SC_IOV_MAX;
pub const _SC_PAGESIZE: ::c_int = 0x0027;
pub const _SC_PAGE_SIZE: ::c_int = 0x0028;
pub const _SC_XOPEN_UNIX: ::c_int = 0x0029;
pub const _SC_XBS5_ILP32_OFF32: ::c_int = 0x002a;
pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 0x002b;
pub const _SC_XBS5_LP64_OFF64: ::c_int = 0x002c;
pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 0x002d;
pub const _SC_AIO_LISTIO_MAX: ::c_int = 0x002e;
pub const _SC_AIO_MAX: ::c_int = 0x002f;
pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 0x0030;
pub const _SC_DELAYTIMER_MAX: ::c_int = 0x0031;
pub const _SC_MQ_OPEN_MAX: ::c_int = 0x0032;
pub const _SC_MQ_PRIO_MAX: ::c_int = 0x0033;
pub const _SC_RTSIG_MAX: ::c_int = 0x0034;
pub const _SC_SEM_NSEMS_MAX: ::c_int = 0x0035;
pub const _SC_SEM_VALUE_MAX: ::c_int = 0x0036;
pub const _SC_SIGQUEUE_MAX: ::c_int = 0x0037;
pub const _SC_TIMER_MAX: ::c_int = 0x0038;
pub const _SC_ASYNCHRONOUS_IO: ::c_int = 0x0039;
pub const _SC_FSYNC: ::c_int = 0x003a;
pub const _SC_MAPPED_FILES: ::c_int = 0x003b;
pub const _SC_MEMLOCK: ::c_int = 0x003c;
pub const _SC_MEMLOCK_RANGE: ::c_int = 0x003d;
pub const _SC_MEMORY_PROTECTION: ::c_int = 0x003e;
pub const _SC_MESSAGE_PASSING: ::c_int = 0x003f;
pub const _SC_PRIORITIZED_IO: ::c_int = 0x0040;
pub const _SC_PRIORITY_SCHEDULING: ::c_int = 0x0041;
pub const _SC_REALTIME_SIGNALS: ::c_int = 0x0042;
pub const _SC_SEMAPHORES: ::c_int = 0x0043;
pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 0x0044;
pub const _SC_SYNCHRONIZED_IO: ::c_int = 0x0045;
pub const _SC_TIMERS: ::c_int = 0x0046;
pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 0x0047;
pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 0x0048;
pub const _SC_LOGIN_NAME_MAX: ::c_int = 0x0049;
pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 0x004a;
pub const _SC_THREAD_KEYS_MAX: ::c_int = 0x004b;
pub const _SC_THREAD_STACK_MIN: ::c_int = 0x004c;
pub const _SC_THREAD_THREADS_MAX: ::c_int = 0x004d;
pub const _SC_TTY_NAME_MAX: ::c_int = 0x004e;
pub const _SC_THREADS: ::c_int = 0x004f;
pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 0x0050;
pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 0x0051;
pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 0x0052;
pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 0x0053;
pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 0x0054;
pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 0x0055;
pub const _SC_NPROCESSORS_CONF: ::c_int = 0x0060;
pub const _SC_NPROCESSORS_ONLN: ::c_int = 0x0061;
pub const _SC_PHYS_PAGES: ::c_int = 0x0062;
pub const _SC_AVPHYS_PAGES: ::c_int = 0x0063;
pub const _SC_MONOTONIC_CLOCK: ::c_int = 0x0064;
pub const _SC_2_PBS: ::c_int = 0x0065;
pub const _SC_2_PBS_ACCOUNTING: ::c_int = 0x0066;
pub const _SC_2_PBS_CHECKPOINT: ::c_int = 0x0067;
pub const _SC_2_PBS_LOCATE: ::c_int = 0x0068;
pub const _SC_2_PBS_MESSAGE: ::c_int = 0x0069;
pub const _SC_2_PBS_TRACK: ::c_int = 0x006a;
pub const _SC_ADVISORY_INFO: ::c_int = 0x006b;
pub const _SC_BARRIERS: ::c_int = 0x006c;
pub const _SC_CLOCK_SELECTION: ::c_int = 0x006d;
pub const _SC_CPUTIME: ::c_int = 0x006e;
pub const _SC_HOST_NAME_MAX: ::c_int = 0x006f;
pub const _SC_IPV6: ::c_int = 0x0070;
pub const _SC_RAW_SOCKETS: ::c_int = 0x0071;
pub const _SC_READER_WRITER_LOCKS: ::c_int = 0x0072;
pub const _SC_REGEXP: ::c_int = 0x0073;
pub const _SC_SHELL: ::c_int = 0x0074;
pub const _SC_SPAWN: ::c_int = 0x0075;
pub const _SC_SPIN_LOCKS: ::c_int = 0x0076;
pub const _SC_SPORADIC_SERVER: ::c_int = 0x0077;
pub const _SC_SS_REPL_MAX: ::c_int = 0x0078;
pub const _SC_SYMLOOP_MAX: ::c_int = 0x0079;
pub const _SC_THREAD_CPUTIME: ::c_int = 0x007a;
pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 0x007b;
pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 0x007c;
pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 0x007d;
pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 0x007e;
pub const _SC_TIMEOUTS: ::c_int = 0x007f;
pub const _SC_TRACE: ::c_int = 0x0080;
pub const _SC_TRACE_EVENT_FILTER: ::c_int = 0x0081;
pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 0x0082;
pub const _SC_TRACE_INHERIT: ::c_int = 0x0083;
pub const _SC_TRACE_LOG: ::c_int = 0x0084;
pub const _SC_TRACE_NAME_MAX: ::c_int = 0x0085;
pub const _SC_TRACE_SYS_MAX: ::c_int = 0x0086;
pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 0x0087;
pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 0x0088;
pub const _SC_V7_ILP32_OFF32: ::c_int = 0x0089;
pub const _SC_V7_ILP32_OFFBIG: ::c_int = 0x008a;
pub const _SC_V7_LP64_OFF64: ::c_int = 0x008b;
pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 0x008c;
pub const _SC_XOPEN_STREAMS: ::c_int = 0x008d;
pub const _SC_XOPEN_UUCP: ::c_int = 0x008e;
pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 0x008f;
pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 0x0090;
pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 0x0091;
pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 0x0092;
pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 0x0093;
pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 0x0094;
pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 0x0095;
pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 0x0096;
pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 0x0097;
pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 0x0098;
pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 0x0099;
pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 0x009a;
pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 0x009b;
pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 0x009c;
pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 0x009d;

pub const F_LOCK: ::c_int = 1;
pub const F_TEST: ::c_int = 3;
Expand Down

0 comments on commit 95c483e

Please sign in to comment.