Skip to content

Commit 57fa5fa

Browse files
committed
Add sysconf constants for FreeBSD and DragonflyBSD
1 parent 8f666d4 commit 57fa5fa

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

src/unix/bsd/freebsdlike/dragonfly/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,13 @@ pub const AT_SYMLINK_FOLLOW: ::c_int = 8;
414414

415415
pub const VCHECKPT: usize = 19;
416416

417+
pub const _SC_V7_ILP32_OFF32: ::c_int = 122;
418+
pub const _SC_V7_ILP32_OFFBIG: ::c_int = 123;
419+
pub const _SC_V7_LP64_OFF64: ::c_int = 124;
420+
pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 125;
421+
pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 126;
422+
pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 127;
423+
417424
extern {
418425
pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
419426
-> ::c_int;

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,8 @@ pub const TABDLY: ::tcflag_t = 0x00000004;
521521
pub const TAB0: ::tcflag_t = 0x00000000;
522522
pub const TAB3: ::tcflag_t = 0x00000004;
523523

524+
pub const _SC_CPUSET_SIZE: ::c_int = 122;
525+
524526
extern {
525527
pub fn __error() -> *mut ::c_int;
526528

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,12 +710,31 @@ pub const _SC_SEM_VALUE_MAX: ::c_int = 50;
710710
pub const _SC_SIGQUEUE_MAX: ::c_int = 51;
711711
pub const _SC_TIMER_MAX: ::c_int = 52;
712712
pub const _SC_IOV_MAX: ::c_int = 56;
713+
pub const _SC_NPROCESSORS_CONF: ::c_int = 57;
714+
pub const _SC_2_PBS: ::c_int = 59;
715+
pub const _SC_2_PBS_ACCOUNTING: ::c_int = 60;
716+
pub const _SC_2_PBS_CHECKPOINT: ::c_int = 61;
717+
pub const _SC_2_PBS_LOCATE: ::c_int = 62;
718+
pub const _SC_2_PBS_MESSAGE: ::c_int = 63;
719+
pub const _SC_2_PBS_TRACK: ::c_int = 64;
720+
pub const _SC_ADVISORY_INFO: ::c_int = 65;
721+
pub const _SC_BARRIERS: ::c_int = 66;
722+
pub const _SC_CLOCK_SELECTION: ::c_int = 67;
723+
pub const _SC_CPUTIME: ::c_int = 68;
724+
pub const _SC_FILE_LOCKING: ::c_int = 69;
713725
pub const _SC_NPROCESSORS_ONLN: ::c_int = 58;
714726
pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 70;
715727
pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 71;
716728
pub const _SC_HOST_NAME_MAX: ::c_int = 72;
717729
pub const _SC_LOGIN_NAME_MAX: ::c_int = 73;
730+
pub const _SC_MONOTONIC_CLOCK: ::c_int = 74;
718731
pub const _SC_MQ_PRIO_MAX: ::c_int = 75;
732+
pub const _SC_READER_WRITER_LOCKS: ::c_int = 76;
733+
pub const _SC_REGEXP: ::c_int = 77;
734+
pub const _SC_SHELL: ::c_int = 78;
735+
pub const _SC_SPAWN: ::c_int = 79;
736+
pub const _SC_SPIN_LOCKS: ::c_int = 80;
737+
pub const _SC_SPORADIC_SERVER: ::c_int = 81;
719738
pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 82;
720739
pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 83;
721740
pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 85;
@@ -725,20 +744,36 @@ pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 88;
725744
pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 89;
726745
pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 90;
727746
pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 91;
747+
pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 92;
728748
pub const _SC_THREAD_STACK_MIN: ::c_int = 93;
729749
pub const _SC_THREAD_THREADS_MAX: ::c_int = 94;
750+
pub const _SC_TIMEOUTS: ::c_int = 95;
730751
pub const _SC_THREADS: ::c_int = 96;
752+
pub const _SC_TRACE: ::c_int = 97;
753+
pub const _SC_TRACE_EVENT_FILTER: ::c_int = 98;
754+
pub const _SC_TRACE_INHERIT: ::c_int = 99;
755+
pub const _SC_TRACE_LOG: ::c_int = 100;
731756
pub const _SC_TTY_NAME_MAX: ::c_int = 101;
757+
pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 102;
758+
pub const _SC_V6_ILP32_OFF32: ::c_int = 103;
759+
pub const _SC_V6_ILP32_OFFBIG: ::c_int = 104;
760+
pub const _SC_V6_LP64_OFF64: ::c_int = 105;
761+
pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 106;
732762
pub const _SC_ATEXIT_MAX: ::c_int = 107;
733763
pub const _SC_XOPEN_CRYPT: ::c_int = 108;
734764
pub const _SC_XOPEN_ENH_I18N: ::c_int = 109;
735765
pub const _SC_XOPEN_LEGACY: ::c_int = 110;
736766
pub const _SC_XOPEN_REALTIME: ::c_int = 111;
737767
pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 112;
738768
pub const _SC_XOPEN_SHM: ::c_int = 113;
769+
pub const _SC_XOPEN_STREAMS: ::c_int = 114;
739770
pub const _SC_XOPEN_UNIX: ::c_int = 115;
740771
pub const _SC_XOPEN_VERSION: ::c_int = 116;
741772
pub const _SC_XOPEN_XCU_VERSION: ::c_int = 117;
773+
pub const _SC_IPV6: ::c_int = 118;
774+
pub const _SC_RAW_SOCKETS: ::c_int = 119;
775+
pub const _SC_SYMLOOP_MAX: ::c_int = 120;
776+
pub const _SC_PHYS_PAGES: ::c_int = 121;
742777

743778
pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _;
744779
pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _;

0 commit comments

Comments
 (0)