@@ -308,6 +308,16 @@ s! {
308
308
pub sem_pad1: [ u64 ; 3 ] ,
309
309
pub sem_pad2: [ u64 ; 2 ]
310
310
}
311
+
312
+ pub struct flock {
313
+ pub l_type: :: c_short,
314
+ pub l_whence: :: c_short,
315
+ pub l_start: :: off_t,
316
+ pub l_len: :: off_t,
317
+ pub l_sysid: :: c_int,
318
+ pub l_pid: :: pid_t,
319
+ pub l_pad: [ :: c_long; 4 ]
320
+ }
311
321
}
312
322
313
323
pub const LC_CTYPE : :: c_int = 0 ;
@@ -396,6 +406,8 @@ pub const NOEXPR: ::nl_item = 57;
396
406
pub const _DATE_FMT: :: nl_item = 58 ;
397
407
pub const MAXSTRMSG : :: nl_item = 58 ;
398
408
409
+ pub const PATH_MAX : :: c_int = 1024 ;
410
+
399
411
pub const SA_ONSTACK : :: c_int = 0x00000001 ;
400
412
pub const SA_RESETHAND : :: c_int = 0x00000002 ;
401
413
pub const SA_RESTART : :: c_int = 0x00000004 ;
@@ -411,6 +423,8 @@ pub const FIONBIO: ::c_int = 0x8004667e;
411
423
412
424
pub const SIGCHLD : :: c_int = 18 ;
413
425
pub const SIGBUS : :: c_int = 10 ;
426
+ pub const SIG_BLOCK : :: c_int = 1 ;
427
+ pub const SIG_UNBLOCK : :: c_int = 2 ;
414
428
pub const SIG_SETMASK : :: c_int = 3 ;
415
429
416
430
pub const IPV6_MULTICAST_LOOP : :: c_int = 0x8 ;
@@ -484,6 +498,9 @@ pub const F_TEST: ::c_int = 3;
484
498
pub const F_TLOCK : :: c_int = 2 ;
485
499
pub const F_ULOCK : :: c_int = 0 ;
486
500
pub const F_DUPFD_CLOEXEC : :: c_int = 37 ;
501
+ pub const F_SETLK : :: c_int = 6 ;
502
+ pub const F_SETLKW : :: c_int = 7 ;
503
+ pub const F_GETLK : :: c_int = 14 ;
487
504
pub const SIGHUP : :: c_int = 1 ;
488
505
pub const SIGINT : :: c_int = 2 ;
489
506
pub const SIGQUIT : :: c_int = 3 ;
@@ -492,9 +509,26 @@ pub const SIGABRT: ::c_int = 6;
492
509
pub const SIGFPE : :: c_int = 8 ;
493
510
pub const SIGKILL : :: c_int = 9 ;
494
511
pub const SIGSEGV : :: c_int = 11 ;
512
+ pub const SIGSYS : :: c_int = 12 ;
495
513
pub const SIGPIPE : :: c_int = 13 ;
496
514
pub const SIGALRM : :: c_int = 14 ;
497
515
pub const SIGTERM : :: c_int = 15 ;
516
+ pub const SIGUSR1 : :: c_int = 16 ;
517
+ pub const SIGUSR2 : :: c_int = 17 ;
518
+ pub const SIGPWR : :: c_int = 19 ;
519
+ pub const SIGWINCH : :: c_int = 20 ;
520
+ pub const SIGURG : :: c_int = 21 ;
521
+ pub const SIGPOLL : :: c_int = 22 ;
522
+ pub const SIGIO : :: c_int = SIGPOLL ;
523
+ pub const SIGSTOP : :: c_int = 23 ;
524
+ pub const SIGTSTP : :: c_int = 24 ;
525
+ pub const SIGCONT : :: c_int = 25 ;
526
+ pub const SIGTTIN : :: c_int = 26 ;
527
+ pub const SIGTTOU : :: c_int = 27 ;
528
+ pub const SIGVTALRM : :: c_int = 28 ;
529
+ pub const SIGPROF : :: c_int = 29 ;
530
+ pub const SIGXCPU : :: c_int = 30 ;
531
+ pub const SIGXFSZ : :: c_int = 31 ;
498
532
499
533
pub const WNOHANG : :: c_int = 0x40 ;
500
534
@@ -506,8 +540,12 @@ pub const PROT_EXEC: ::c_int = 4;
506
540
pub const MAP_SHARED : :: c_int = 0x0001 ;
507
541
pub const MAP_PRIVATE : :: c_int = 0x0002 ;
508
542
pub const MAP_FIXED : :: c_int = 0x0010 ;
543
+ pub const MAP_NORESERVE : :: c_int = 0x40 ;
509
544
pub const MAP_ANON : :: c_int = 0x0100 ;
510
-
545
+ pub const MAP_RENAME : :: c_int = 0x20 ;
546
+ pub const MAP_ALIGN : :: c_int = 0x200 ;
547
+ pub const MAP_TEXT : :: c_int = 0x400 ;
548
+ pub const MAP_INITDATA : :: c_int = 0x800 ;
511
549
pub const MAP_FAILED : * mut :: c_void = !0 as * mut :: c_void ;
512
550
513
551
pub const MCL_CURRENT : :: c_int = 0x0001 ;
@@ -516,6 +554,7 @@ pub const MCL_FUTURE: ::c_int = 0x0002;
516
554
pub const MS_SYNC : :: c_int = 0x0004 ;
517
555
pub const MS_ASYNC : :: c_int = 0x0001 ;
518
556
pub const MS_INVALIDATE : :: c_int = 0x0002 ;
557
+ pub const MS_INVALCURPROC : :: c_int = 0x0008 ;
519
558
520
559
pub const EPERM : :: c_int = 1 ;
521
560
pub const ENOENT : :: c_int = 2 ;
@@ -949,5 +988,6 @@ extern {
949
988
flags : :: c_int ) -> :: c_int ;
950
989
pub fn mkfifoat ( dirfd : :: c_int , pathname : * const :: c_char ,
951
990
mode : :: mode_t ) -> :: c_int ;
991
+ pub fn sethostname ( name : * const :: c_char , len : :: size_t ) -> :: c_int ;
952
992
}
953
993
0 commit comments