Skip to content

Commit 1c7f8fc

Browse files
nielxJohnTitor
authored andcommitted
Haiku: synchronize with post R1-beta 4 changes in libc
The following changes in Haiku's POSIX library are included, post R1 Beta 4 (hrev56578) [hrev56665] Added missing posixoptions and sysconf constants according POSIX.1-2017 standard [hrev56989] headers/posix: Add TIOCM_RNG as a synonym for TIOCM_RI [hrev56990] termios: New ioctl: TIOCOUTQ [hrev56995] tty: Implement exclusive mode [ 05bd3f0] termios.h: Undefine/remove some unimplemented BeOS extensions [hrev57422] libroot: Add stpncpy [hrev57593] Change `AT_FDCWD` from -1 to -100
1 parent e425fe3 commit 1c7f8fc

File tree

2 files changed

+90
-5
lines changed

2 files changed

+90
-5
lines changed

src/unix/haiku/mod.rs

+81-5
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ pub const F_RDLCK: ::c_int = 0x0040;
706706
pub const F_UNLCK: ::c_int = 0x0200;
707707
pub const F_WRLCK: ::c_int = 0x0400;
708708

709-
pub const AT_FDCWD: ::c_int = -1;
709+
pub const AT_FDCWD: ::c_int = -100;
710710
pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x01;
711711
pub const AT_SYMLINK_FOLLOW: ::c_int = 0x02;
712712
pub const AT_REMOVEDIR: ::c_int = 0x04;
@@ -1192,6 +1192,80 @@ pub const _SC_REGEXP: ::c_int = 62;
11921192
pub const _SC_SYMLOOP_MAX: ::c_int = 63;
11931193
pub const _SC_SHELL: ::c_int = 64;
11941194
pub const _SC_TTY_NAME_MAX: ::c_int = 65;
1195+
pub const _SC_ADVISORY_INFO: ::c_int = 66;
1196+
pub const _SC_BARRIERS: ::c_int = 67;
1197+
pub const _SC_CLOCK_SELECTION: ::c_int = 68;
1198+
pub const _SC_FSYNC: ::c_int = 69;
1199+
pub const _SC_IPV6: ::c_int = 70;
1200+
pub const _SC_MEMLOCK: ::c_int = 71;
1201+
pub const _SC_MEMLOCK_RANGE: ::c_int = 72;
1202+
pub const _SC_MESSAGE_PASSING: ::c_int = 73;
1203+
pub const _SC_PRIORITIZED_IO: ::c_int = 74;
1204+
pub const _SC_PRIORITY_SCHEDULING: ::c_int = 75;
1205+
pub const _SC_READER_WRITER_LOCKS: ::c_int = 76;
1206+
pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 77;
1207+
pub const _SC_SPAWN: ::c_int = 78;
1208+
pub const _SC_SPIN_LOCKS: ::c_int = 79;
1209+
pub const _SC_SPORADIC_SERVER: ::c_int = 80;
1210+
pub const _SC_SYNCHRONIZED_IO: ::c_int = 81;
1211+
pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 82;
1212+
pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 83;
1213+
pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 84;
1214+
pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 85;
1215+
pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 86;
1216+
pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 87;
1217+
pub const _SC_TIMEOUTS: ::c_int = 88;
1218+
pub const _SC_TRACE: ::c_int = 89;
1219+
pub const _SC_TRACE_EVENT_FILTER: ::c_int = 90;
1220+
pub const _SC_TRACE_INHERIT: ::c_int = 91;
1221+
pub const _SC_TRACE_LOG: ::c_int = 92;
1222+
pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 93;
1223+
pub const _SC_V6_ILP32_OFF32: ::c_int = 94;
1224+
pub const _SC_V6_ILP32_OFFBIG: ::c_int = 95;
1225+
pub const _SC_V6_LP64_OFF64: ::c_int = 96;
1226+
pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 97;
1227+
pub const _SC_V7_ILP32_OFF32: ::c_int = 98;
1228+
pub const _SC_V7_ILP32_OFFBIG: ::c_int = 99;
1229+
pub const _SC_V7_LP64_OFF64: ::c_int = 100;
1230+
pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 101;
1231+
pub const _SC_2_C_BIND: ::c_int = 102;
1232+
pub const _SC_2_C_DEV: ::c_int = 103;
1233+
pub const _SC_2_CHAR_TERM: ::c_int = 104;
1234+
pub const _SC_2_FORT_DEV: ::c_int = 105;
1235+
pub const _SC_2_FORT_RUN: ::c_int = 106;
1236+
pub const _SC_2_LOCALEDEF: ::c_int = 107;
1237+
pub const _SC_2_PBS: ::c_int = 108;
1238+
pub const _SC_2_PBS_ACCOUNTING: ::c_int = 109;
1239+
pub const _SC_2_PBS_CHECKPOINT: ::c_int = 110;
1240+
pub const _SC_2_PBS_LOCATE: ::c_int = 111;
1241+
pub const _SC_2_PBS_MESSAGE: ::c_int = 112;
1242+
pub const _SC_2_PBS_TRACK: ::c_int = 113;
1243+
pub const _SC_2_SW_DEV: ::c_int = 114;
1244+
pub const _SC_2_UPE: ::c_int = 115;
1245+
pub const _SC_2_VERSION: ::c_int = 116;
1246+
pub const _SC_XOPEN_CRYPT: ::c_int = 117;
1247+
pub const _SC_XOPEN_ENH_I18N: ::c_int = 118;
1248+
pub const _SC_XOPEN_REALTIME: ::c_int = 119;
1249+
pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 120;
1250+
pub const _SC_XOPEN_SHM: ::c_int = 121;
1251+
pub const _SC_XOPEN_STREAMS: ::c_int = 122;
1252+
pub const _SC_XOPEN_UNIX: ::c_int = 123;
1253+
pub const _SC_XOPEN_UUCP: ::c_int = 124;
1254+
pub const _SC_XOPEN_VERSION: ::c_int = 125;
1255+
pub const _SC_BC_BASE_MAX: ::c_int = 129;
1256+
pub const _SC_BC_DIM_MAX: ::c_int = 130;
1257+
pub const _SC_BC_SCALE_MAX: ::c_int = 131;
1258+
pub const _SC_BC_STRING_MAX: ::c_int = 132;
1259+
pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 133;
1260+
pub const _SC_EXPR_NEST_MAX: ::c_int = 134;
1261+
pub const _SC_LINE_MAX: ::c_int = 135;
1262+
pub const _SC_LOGIN_NAME_MAX: ::c_int = 136;
1263+
pub const _SC_MQ_OPEN_MAX: ::c_int = 137;
1264+
pub const _SC_MQ_PRIO_MAX: ::c_int = 138;
1265+
pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 139;
1266+
pub const _SC_THREAD_KEYS_MAX: ::c_int = 140;
1267+
pub const _SC_THREAD_THREADS_MAX: ::c_int = 141;
1268+
pub const _SC_RE_DUP_MAX: ::c_int = 142;
11951269

11961270
pub const PTHREAD_STACK_MIN: ::size_t = 8192;
11971271

@@ -1386,8 +1460,9 @@ pub const TCGB_RI: ::c_int = 0x04;
13861460
pub const TCGB_DCD: ::c_int = 0x08;
13871461
pub const TIOCM_CTS: ::c_int = TCGB_CTS;
13881462
pub const TIOCM_CD: ::c_int = TCGB_DCD;
1389-
pub const TIOCM_CAR: ::c_int = TIOCM_CD;
1463+
pub const TIOCM_CAR: ::c_int = TCGB_DCD;
13901464
pub const TIOCM_RI: ::c_int = TCGB_RI;
1465+
pub const TIOCM_RNG: ::c_int = TCGB_RI;
13911466
pub const TIOCM_DSR: ::c_int = TCGB_DSR;
13921467
pub const TIOCM_DTR: ::c_int = 0x10;
13931468
pub const TIOCM_RTS: ::c_int = 0x20;
@@ -1430,17 +1505,14 @@ pub const TCGETA: ::c_ulong = 0x8000;
14301505
pub const TCSETA: ::c_ulong = TCGETA + 1;
14311506
pub const TCSETAF: ::c_ulong = TCGETA + 2;
14321507
pub const TCSETAW: ::c_ulong = TCGETA + 3;
1433-
pub const TCWAITEVENT: ::c_ulong = TCGETA + 4;
14341508
pub const TCSBRK: ::c_ulong = TCGETA + 5;
14351509
pub const TCFLSH: ::c_ulong = TCGETA + 6;
14361510
pub const TCXONC: ::c_ulong = TCGETA + 7;
1437-
pub const TCQUERYCONNECTED: ::c_ulong = TCGETA + 8;
14381511
pub const TCGETBITS: ::c_ulong = TCGETA + 9;
14391512
pub const TCSETDTR: ::c_ulong = TCGETA + 10;
14401513
pub const TCSETRTS: ::c_ulong = TCGETA + 11;
14411514
pub const TIOCGWINSZ: ::c_ulong = TCGETA + 12;
14421515
pub const TIOCSWINSZ: ::c_ulong = TCGETA + 13;
1443-
pub const TCVTIME: ::c_ulong = TCGETA + 14;
14441516
pub const TIOCGPGRP: ::c_ulong = TCGETA + 15;
14451517
pub const TIOCSPGRP: ::c_ulong = TCGETA + 16;
14461518
pub const TIOCSCTTY: ::c_ulong = TCGETA + 17;
@@ -1450,6 +1522,10 @@ pub const TIOCSBRK: ::c_ulong = TCGETA + 20;
14501522
pub const TIOCCBRK: ::c_ulong = TCGETA + 21;
14511523
pub const TIOCMBIS: ::c_ulong = TCGETA + 22;
14521524
pub const TIOCMBIC: ::c_ulong = TCGETA + 23;
1525+
pub const TIOCGSID: ::c_ulong = TCGETA + 24;
1526+
pub const TIOCOUTQ: ::c_ulong = TCGETA + 25;
1527+
pub const TIOCEXCL: ::c_ulong = TCGETA + 26;
1528+
pub const TIOCNXCL: ::c_ulong = TCGETA + 27;
14531529

14541530
pub const PRIO_PROCESS: ::c_int = 0;
14551531
pub const PRIO_PGRP: ::c_int = 1;

src/unix/mod.rs

+9
Original file line numberDiff line numberDiff line change
@@ -1409,6 +1409,15 @@ cfg_if! {
14091409
target_os = "nto")))] {
14101410
extern "C" {
14111411
pub fn adjtime(delta: *const timeval, olddelta: *mut timeval) -> ::c_int;
1412+
}
1413+
}
1414+
}
1415+
1416+
cfg_if! {
1417+
if #[cfg(not(any(target_os = "emscripten",
1418+
target_os = "android",
1419+
target_os = "nto")))] {
1420+
extern "C" {
14121421
pub fn stpncpy(dst: *mut c_char, src: *const c_char, n: size_t) -> *mut c_char;
14131422
}
14141423
}

0 commit comments

Comments
 (0)