@@ -551,50 +551,35 @@ enum nfsstat {
551
551
NFSERR_BAD_COOKIE = 10003 ,
552
552
NFSERR_NOTSUPP = 45 ,
553
553
NFSERR_TOOSMALL = 10005 ,
554
- // NFSERR_SERVERFAULT = 10006,
555
554
NFSERR_BADTYPE = 10007 ,
556
555
NFSERR_JUKEBOX = 10008 ,
557
556
}
558
557
559
558
pub const S_nfsLib_NFS_OK : :: c_int = nfsstat:: NFS_OK as :: c_int ;
560
- pub const S_nfsLib_NFSERR_PERM : :: c_int =
561
- nfsstat:: NFSERR_PERM as :: c_int ;
562
- pub const S_nfsLib_NFSERR_NOENT : :: c_int =
563
- nfsstat:: NFSERR_NOENT as :: c_int ;
564
- pub const S_nfsLib_NFSERR_IO : :: c_int =
565
- nfsstat:: NFSERR_IO as :: c_int ;
566
- pub const S_nfsLib_NFSERR_NXIO : :: c_int =
567
- nfsstat:: NFSERR_NXIO as :: c_int ;
568
- pub const S_nfsLib_NFSERR_ACCESS : :: c_int =
569
- nfsstat:: NFSERR_ACCESS as :: c_int ;
570
- pub const S_nfsLib_NFSERR_EXIST : :: c_int =
571
- nfsstat:: NFSERR_EXIST as :: c_int ;
559
+ pub const S_nfsLib_NFSERR_PERM : :: c_int = nfsstat:: NFSERR_PERM as :: c_int ;
560
+ pub const S_nfsLib_NFSERR_NOENT : :: c_int = nfsstat:: NFSERR_NOENT as :: c_int ;
561
+ pub const S_nfsLib_NFSERR_IO : :: c_int = nfsstat:: NFSERR_IO as :: c_int ;
562
+ pub const S_nfsLib_NFSERR_NXIO : :: c_int = nfsstat:: NFSERR_NXIO as :: c_int ;
563
+ pub const S_nfsLib_NFSERR_ACCESS : :: c_int = nfsstat:: NFSERR_ACCESS as :: c_int ;
564
+ pub const S_nfsLib_NFSERR_EXIST : :: c_int = nfsstat:: NFSERR_EXIST as :: c_int ;
572
565
pub const S_nfsLib_NFSERR_XDEV : :: c_int =
573
566
M_nfsStat | nfsstat:: NFSERR_XDEV as :: c_int ;
574
567
pub const S_nfsLib_NFSERR_NODEV : :: c_int =
575
568
M_nfsStat | nfsstat:: NFSERR_NODEV as :: c_int ;
576
- pub const S_nfsLib_NFSERR_NOTDIR : :: c_int =
577
- nfsstat:: NFSERR_NOTDIR as :: c_int ;
578
- pub const S_nfsLib_NFSERR_ISDIR : :: c_int =
579
- nfsstat:: NFSERR_ISDIR as :: c_int ;
580
- pub const S_nfsLib_NFSERR_INVAL : :: c_int =
581
- nfsstat:: NFSERR_INVAL as :: c_int ;
582
- pub const S_nfsLib_NFSERR_FBIG : :: c_int =
583
- nfsstat:: NFSERR_FBIG as :: c_int ;
584
- pub const S_nfsLib_NFSERR_NOSPC : :: c_int =
585
- nfsstat:: NFSERR_NOSPC as :: c_int ;
586
- pub const S_nfsLib_NFSERR_ROFS : :: c_int =
587
- nfsstat:: NFSERR_ROFS as :: c_int ;
569
+ pub const S_nfsLib_NFSERR_NOTDIR : :: c_int = nfsstat:: NFSERR_NOTDIR as :: c_int ;
570
+ pub const S_nfsLib_NFSERR_ISDIR : :: c_int = nfsstat:: NFSERR_ISDIR as :: c_int ;
571
+ pub const S_nfsLib_NFSERR_INVAL : :: c_int = nfsstat:: NFSERR_INVAL as :: c_int ;
572
+ pub const S_nfsLib_NFSERR_FBIG : :: c_int = nfsstat:: NFSERR_FBIG as :: c_int ;
573
+ pub const S_nfsLib_NFSERR_NOSPC : :: c_int = nfsstat:: NFSERR_NOSPC as :: c_int ;
574
+ pub const S_nfsLib_NFSERR_ROFS : :: c_int = nfsstat:: NFSERR_ROFS as :: c_int ;
588
575
pub const S_nfsLib_NFSERR_MLINK : :: c_int =
589
576
M_nfsStat | nfsstat:: NFSERR_MLINK as :: c_int ;
590
577
pub const S_nfsLib_NFSERR_NAMETOOLONG : :: c_int =
591
578
nfsstat:: NFSERR_NAMETOOLONG as :: c_int ;
592
579
pub const S_nfsLib_NFSERR_NOTEMPTY : :: c_int =
593
580
nfsstat:: NFSERR_NOTEMPTY as :: c_int ;
594
- pub const S_nfsLib_NFSERR_DQUOT : :: c_int =
595
- nfsstat:: NFSERR_DQUOT as :: c_int ;
596
- pub const S_nfsLib_NFSERR_STALE : :: c_int =
597
- nfsstat:: NFSERR_STALE as :: c_int ;
581
+ pub const S_nfsLib_NFSERR_DQUOT : :: c_int = nfsstat:: NFSERR_DQUOT as :: c_int ;
582
+ pub const S_nfsLib_NFSERR_STALE : :: c_int = nfsstat:: NFSERR_STALE as :: c_int ;
598
583
pub const S_nfsLib_NFSERR_WFLUSH : :: c_int =
599
584
M_nfsStat | nfsstat:: NFSERR_WFLUSH as :: c_int ;
600
585
pub const S_nfsLib_NFSERR_REMOTE : :: c_int =
@@ -609,8 +594,7 @@ pub const S_nfsLib_NFSERR_NOTSUPP: ::c_int =
609
594
nfsstat:: NFSERR_NOTSUPP as :: c_int ;
610
595
pub const S_nfsLib_NFSERR_TOOSMALL : :: c_int =
611
596
M_nfsStat | nfsstat:: NFSERR_TOOSMALL as :: c_int ;
612
- pub const S_nfsLib_NFSERR_SERVERFAULT : :: c_int =
613
- nfsstat:: NFSERR_IO as :: c_int ;
597
+ pub const S_nfsLib_NFSERR_SERVERFAULT : :: c_int = nfsstat:: NFSERR_IO as :: c_int ;
614
598
pub const S_nfsLib_NFSERR_BADTYPE : :: c_int =
615
599
M_nfsStat | nfsstat:: NFSERR_BADTYPE as :: c_int ;
616
600
pub const S_nfsLib_NFSERR_JUKEBOX : :: c_int =
@@ -666,29 +650,29 @@ pub const S_IRWXO: ::c_int = 0x0007;
666
650
// socket.h
667
651
pub const SOL_SOCKET : :: c_int = 0xffff ;
668
652
669
- pub const SO_DEBUG : :: c_int = 0x0001 ;
670
- pub const SO_REUSEADDR : :: c_int = 0x0004 ;
671
- pub const SO_KEEPALIVE : :: c_int = 0x0008 ;
672
- pub const SO_DONTROUTE : :: c_int = 0x0010 ;
673
- pub const SO_RCVLOWAT : :: c_int = 0x0012 ;
674
- pub const SO_SNDLOWAT : :: c_int = 0x0013 ;
675
- pub const SO_SNDTIMEO : :: c_int = 0x1005 ;
676
- pub const SO_ACCEPTCONN : :: c_int = 0x001e ;
677
- pub const SO_BROADCAST : :: c_int = 0x0020 ;
678
- pub const SO_USELOOPBACK : :: c_int = 0x0040 ;
679
- pub const SO_LINGER : :: c_int = 0x0080 ;
680
- pub const SO_REUSEPORT : :: c_int = 0x0200 ;
681
-
682
- pub const SO_VLAN : :: c_int = 0x8000 ;
683
-
684
- pub const SO_SNDBUF : :: c_int = 0x1001 ;
685
- pub const SO_RCVBUF : :: c_int = 0x1002 ;
686
- pub const SO_RCVTIMEO : :: c_int = 0x1006 ;
687
- pub const SO_ERROR : :: c_int = 0x1007 ;
688
- pub const SO_TYPE : :: c_int = 0x1008 ;
689
- pub const SO_BINDTODEVICE : :: c_int = 0x1010 ;
690
- pub const SO_OOBINLINE : :: c_int = 0x1011 ;
691
- pub const SO_CONNTIMEO : :: c_int = 0x100a ;
653
+ pub const SO_DEBUG : :: c_int = 0x0001 ;
654
+ pub const SO_REUSEADDR : :: c_int = 0x0004 ;
655
+ pub const SO_KEEPALIVE : :: c_int = 0x0008 ;
656
+ pub const SO_DONTROUTE : :: c_int = 0x0010 ;
657
+ pub const SO_RCVLOWAT : :: c_int = 0x0012 ;
658
+ pub const SO_SNDLOWAT : :: c_int = 0x0013 ;
659
+ pub const SO_SNDTIMEO : :: c_int = 0x1005 ;
660
+ pub const SO_ACCEPTCONN : :: c_int = 0x001e ;
661
+ pub const SO_BROADCAST : :: c_int = 0x0020 ;
662
+ pub const SO_USELOOPBACK : :: c_int = 0x0040 ;
663
+ pub const SO_LINGER : :: c_int = 0x0080 ;
664
+ pub const SO_REUSEPORT : :: c_int = 0x0200 ;
665
+
666
+ pub const SO_VLAN : :: c_int = 0x8000 ;
667
+
668
+ pub const SO_SNDBUF : :: c_int = 0x1001 ;
669
+ pub const SO_RCVBUF : :: c_int = 0x1002 ;
670
+ pub const SO_RCVTIMEO : :: c_int = 0x1006 ;
671
+ pub const SO_ERROR : :: c_int = 0x1007 ;
672
+ pub const SO_TYPE : :: c_int = 0x1008 ;
673
+ pub const SO_BINDTODEVICE : :: c_int = 0x1010 ;
674
+ pub const SO_OOBINLINE : :: c_int = 0x1011 ;
675
+ pub const SO_CONNTIMEO : :: c_int = 0x100a ;
692
676
693
677
pub const SOCK_STREAM : :: c_int = 1 ;
694
678
pub const SOCK_DGRAM : :: c_int = 2 ;
@@ -899,7 +883,7 @@ const PTHREAD_RWLOCKATTR_INITIALIZER: pthread_rwlockattr_t =
899
883
rwlockAttrStatus : PTHREAD_INITIALIZED_OBJ ,
900
884
rwlockAttrPshared : 1 ,
901
885
rwlockAttrMaxReaders : 0 ,
902
- rwlockAttrConformOpt : 1 ,
886
+ rwlockAttrConformOpt : 1 ,
903
887
} ;
904
888
pub const PTHREAD_RWLOCK_INITIALIZER : pthread_rwlock_t = pthread_rwlock_t {
905
889
rwlockSemId : null_mut ( ) ,
990
974
}
991
975
}
992
976
993
- extern {
977
+ extern "C" {
994
978
pub fn isalnum ( c : c_int ) -> c_int ;
995
979
pub fn isalpha ( c : c_int ) -> c_int ;
996
980
pub fn iscntrl ( c : c_int ) -> c_int ;
@@ -1069,7 +1053,7 @@ extern {
1069
1053
pub fn free ( p : * mut c_void ) ;
1070
1054
pub fn abort ( ) -> !;
1071
1055
pub fn exit ( status : c_int ) -> !;
1072
- pub fn atexit ( cb : extern fn ( ) ) -> c_int ;
1056
+ pub fn atexit ( cb : extern "C" fn ( ) ) -> c_int ;
1073
1057
pub fn system ( s : * const c_char ) -> c_int ;
1074
1058
pub fn getenv ( s : * const c_char ) -> * mut c_char ;
1075
1059
@@ -1127,7 +1111,7 @@ extern {
1127
1111
pub fn memset ( dest : * mut c_void , c : c_int , n : size_t ) -> * mut c_void ;
1128
1112
}
1129
1113
1130
- extern {
1114
+ extern "C" {
1131
1115
pub fn getpwnam ( name : * const :: c_char ) -> * mut passwd ;
1132
1116
pub fn getpwuid ( uid : :: uid_t ) -> * mut passwd ;
1133
1117
@@ -1399,7 +1383,7 @@ extern {
1399
1383
pub fn _rtld_dladdr ( addr : * const :: c_void , info : * mut Dl_info ) -> :: c_int ;
1400
1384
}
1401
1385
1402
- extern {
1386
+ extern "C" {
1403
1387
// stdlib.h
1404
1388
pub fn memalign ( block_size : :: size_t , size_arg : :: size_t )
1405
1389
-> * mut :: c_void ;
@@ -1411,9 +1395,7 @@ extern {
1411
1395
pub fn chdir ( attr : * const :: c_char ) -> :: c_int ;
1412
1396
1413
1397
// pthread.h
1414
- pub fn pthread_mutexattr_init (
1415
- attr : * mut pthread_mutexattr_t ,
1416
- ) -> :: c_int ;
1398
+ pub fn pthread_mutexattr_init ( attr : * mut pthread_mutexattr_t ) -> :: c_int ;
1417
1399
1418
1400
// pthread.h
1419
1401
pub fn pthread_mutexattr_destroy (
@@ -1475,7 +1457,7 @@ extern {
1475
1457
pub fn pthread_create (
1476
1458
pThread : * mut :: pthread_t ,
1477
1459
pAttr : * const :: pthread_attr_t ,
1478
- start_routine : extern fn ( * mut :: c_void ) -> * mut :: c_void ,
1460
+ start_routine : extern "C" fn ( * mut :: c_void ) -> * mut :: c_void ,
1479
1461
value : * mut :: c_void ,
1480
1462
) -> :: c_int ;
1481
1463
@@ -1487,9 +1469,9 @@ extern {
1487
1469
1488
1470
// int pthread_atfork (void (*)(void), void (*)(void), void (*)(void));
1489
1471
pub fn pthread_atfork (
1490
- prepare : :: Option < unsafe extern fn ( ) > ,
1491
- parent : :: Option < unsafe extern fn ( ) > ,
1492
- child : :: Option < unsafe extern fn ( ) > ,
1472
+ prepare : :: Option < unsafe extern "C" fn ( ) > ,
1473
+ parent : :: Option < unsafe extern "C" fn ( ) > ,
1474
+ child : :: Option < unsafe extern "C" fn ( ) > ,
1493
1475
) -> :: c_int ;
1494
1476
// stat.h
1495
1477
pub fn fstat ( fildes : :: c_int , buf : * mut stat ) -> :: c_int ;
@@ -1618,7 +1600,7 @@ extern {
1618
1600
// pthread.h
1619
1601
pub fn pthread_key_create (
1620
1602
key : * mut :: pthread_key_t ,
1621
- dtor : :: Option < unsafe extern fn ( * mut :: c_void ) > ,
1603
+ dtor : :: Option < unsafe extern "C" fn ( * mut :: c_void ) > ,
1622
1604
) -> :: c_int ;
1623
1605
1624
1606
// pthread.h
@@ -2152,23 +2134,27 @@ pub fn posix_memalign(
2152
2134
// epoll.h
2153
2135
// Unfortunately epoll is currently only supported in the VxWorks kernel
2154
2136
#[ allow( unused_variables) ]
2155
- pub fn epoll_create ( size : :: c_int ) -> :: c_int { -1 }
2137
+ pub fn epoll_create ( size : :: c_int ) -> :: c_int {
2138
+ -1
2139
+ }
2156
2140
#[ allow( unused_variables) ]
2157
- pub fn epoll_create1 ( flags : :: c_int ) -> :: c_int { -1 }
2141
+ pub fn epoll_create1 ( flags : :: c_int ) -> :: c_int {
2142
+ -1
2143
+ }
2158
2144
#[ allow( unused_variables) ]
2159
2145
pub fn epoll_ctl (
2160
2146
epfd : :: c_int ,
2161
2147
op : :: c_int ,
2162
2148
fd : :: c_int ,
2163
- event : * mut :: epoll_event
2164
- ) -> :: c_int {
2149
+ event : * mut :: epoll_event ,
2150
+ ) -> :: c_int {
2165
2151
-1
2166
2152
}
2167
2153
#[ allow( unused_variables) ]
2168
2154
pub fn epoll_create_and_ctl (
2169
2155
num : :: c_int ,
2170
2156
fds : * mut :: c_int ,
2171
- event : * mut :: epoll_event
2157
+ event : * mut :: epoll_event ,
2172
2158
) -> :: c_int {
2173
2159
-1
2174
2160
}
@@ -2177,9 +2163,9 @@ pub fn epoll_wait(
2177
2163
epfd : :: c_int ,
2178
2164
events : * mut :: epoll_event ,
2179
2165
maxevents : :: c_int ,
2180
- timeout : :: c_int
2166
+ timeout : :: c_int ,
2181
2167
) -> :: c_int {
2182
- -1
2168
+ -1
2183
2169
}
2184
2170
2185
2171
// From sysconf.c -> doesn't seem to be supported?
0 commit comments