Define _SC_PAGE_SIZE constants
According to POSIX, sysconf can take _SC_PAGESIZE or _SC_PAGE_SIZE, which may be the same value. This constant was define in "apple" as equal to _SC_PAGESIZE, but not any of the other platforms. Add definitions for _SC_PAGE_SIZE for all platforms which had _SC_PAGESIZE defined. On all platforms but Android (Bionic), they are the same value; on Android _SC_PAGE_SIZE has a different value.
This commit is contained in:
parent
cb12fdfea3
commit
11f29f592a
@ -548,6 +548,7 @@ pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 44;
|
|||||||
pub const _SC_DELAYTIMER_MAX: ::c_int = 45;
|
pub const _SC_DELAYTIMER_MAX: ::c_int = 45;
|
||||||
pub const _SC_MQ_OPEN_MAX: ::c_int = 46;
|
pub const _SC_MQ_OPEN_MAX: ::c_int = 46;
|
||||||
pub const _SC_PAGESIZE: ::c_int = 47;
|
pub const _SC_PAGESIZE: ::c_int = 47;
|
||||||
|
pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
|
||||||
pub const _SC_RTSIG_MAX: ::c_int = 48;
|
pub const _SC_RTSIG_MAX: ::c_int = 48;
|
||||||
pub const _SC_SEM_NSEMS_MAX: ::c_int = 49;
|
pub const _SC_SEM_NSEMS_MAX: ::c_int = 49;
|
||||||
pub const _SC_SEM_VALUE_MAX: ::c_int = 50;
|
pub const _SC_SEM_VALUE_MAX: ::c_int = 50;
|
||||||
|
@ -362,6 +362,7 @@ pub const _SC_2_UPE : ::c_int = 25;
|
|||||||
pub const _SC_STREAM_MAX : ::c_int = 26;
|
pub const _SC_STREAM_MAX : ::c_int = 26;
|
||||||
pub const _SC_TZNAME_MAX : ::c_int = 27;
|
pub const _SC_TZNAME_MAX : ::c_int = 27;
|
||||||
pub const _SC_PAGESIZE : ::c_int = 28;
|
pub const _SC_PAGESIZE : ::c_int = 28;
|
||||||
|
pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
|
||||||
pub const _SC_FSYNC : ::c_int = 29;
|
pub const _SC_FSYNC : ::c_int = 29;
|
||||||
|
|
||||||
pub const KERN_PROC_ARGV: ::c_int = 1;
|
pub const KERN_PROC_ARGV: ::c_int = 1;
|
||||||
|
@ -196,6 +196,7 @@ pub const _SC_XOPEN_LEGACY: ::c_int = 36;
|
|||||||
pub const _SC_ATEXIT_MAX: ::c_int = 37;
|
pub const _SC_ATEXIT_MAX: ::c_int = 37;
|
||||||
pub const _SC_IOV_MAX: ::c_int = 38;
|
pub const _SC_IOV_MAX: ::c_int = 38;
|
||||||
pub const _SC_PAGESIZE: ::c_int = 39;
|
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_XOPEN_UNIX: ::c_int = 41;
|
||||||
pub const _SC_MQ_PRIO_MAX: ::c_int = 51;
|
pub const _SC_MQ_PRIO_MAX: ::c_int = 51;
|
||||||
pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 71;
|
pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 71;
|
||||||
|
@ -220,6 +220,7 @@ pub const _SC_MQ_OPEN_MAX: ::c_int = 27;
|
|||||||
pub const _SC_MQ_PRIO_MAX: ::c_int = 28;
|
pub const _SC_MQ_PRIO_MAX: ::c_int = 28;
|
||||||
pub const _SC_VERSION: ::c_int = 29;
|
pub const _SC_VERSION: ::c_int = 29;
|
||||||
pub const _SC_PAGESIZE: ::c_int = 30;
|
pub const _SC_PAGESIZE: ::c_int = 30;
|
||||||
|
pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
|
||||||
pub const _SC_RTSIG_MAX: ::c_int = 31;
|
pub const _SC_RTSIG_MAX: ::c_int = 31;
|
||||||
pub const _SC_SEM_NSEMS_MAX: ::c_int = 32;
|
pub const _SC_SEM_NSEMS_MAX: ::c_int = 32;
|
||||||
pub const _SC_SEM_VALUE_MAX: ::c_int = 33;
|
pub const _SC_SEM_VALUE_MAX: ::c_int = 33;
|
||||||
|
@ -626,6 +626,7 @@ pub const _SC_JOB_CONTROL: ::c_int = 6;
|
|||||||
pub const _SC_SAVED_IDS: ::c_int = 7;
|
pub const _SC_SAVED_IDS: ::c_int = 7;
|
||||||
pub const _SC_VERSION: ::c_int = 8;
|
pub const _SC_VERSION: ::c_int = 8;
|
||||||
pub const _SC_PAGESIZE: ::c_int = 11;
|
pub const _SC_PAGESIZE: ::c_int = 11;
|
||||||
|
pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
|
||||||
pub const _SC_NPROCESSORS_ONLN: ::c_int = 15;
|
pub const _SC_NPROCESSORS_ONLN: ::c_int = 15;
|
||||||
pub const _SC_STREAM_MAX: ::c_int = 16;
|
pub const _SC_STREAM_MAX: ::c_int = 16;
|
||||||
pub const _SC_TZNAME_MAX: ::c_int = 17;
|
pub const _SC_TZNAME_MAX: ::c_int = 17;
|
||||||
|
Loading…
Reference in New Issue
Block a user