@@ -551,50 +551,35 @@ enum nfsstat {
551551 NFSERR_BAD_COOKIE = 10003 ,
552552 NFSERR_NOTSUPP = 45 ,
553553 NFSERR_TOOSMALL = 10005 ,
554- // NFSERR_SERVERFAULT = 10006,
555554 NFSERR_BADTYPE = 10007 ,
556555 NFSERR_JUKEBOX = 10008 ,
557556}
558557
559558pub 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 ;
572565pub const S_nfsLib_NFSERR_XDEV : :: c_int =
573566 M_nfsStat | nfsstat:: NFSERR_XDEV as :: c_int ;
574567pub const S_nfsLib_NFSERR_NODEV : :: c_int =
575568 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 ;
588575pub const S_nfsLib_NFSERR_MLINK : :: c_int =
589576 M_nfsStat | nfsstat:: NFSERR_MLINK as :: c_int ;
590577pub const S_nfsLib_NFSERR_NAMETOOLONG : :: c_int =
591578 nfsstat:: NFSERR_NAMETOOLONG as :: c_int ;
592579pub const S_nfsLib_NFSERR_NOTEMPTY : :: c_int =
593580 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 ;
598583pub const S_nfsLib_NFSERR_WFLUSH : :: c_int =
599584 M_nfsStat | nfsstat:: NFSERR_WFLUSH as :: c_int ;
600585pub const S_nfsLib_NFSERR_REMOTE : :: c_int =
@@ -609,8 +594,7 @@ pub const S_nfsLib_NFSERR_NOTSUPP: ::c_int =
609594 nfsstat:: NFSERR_NOTSUPP as :: c_int ;
610595pub const S_nfsLib_NFSERR_TOOSMALL : :: c_int =
611596 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 ;
614598pub const S_nfsLib_NFSERR_BADTYPE : :: c_int =
615599 M_nfsStat | nfsstat:: NFSERR_BADTYPE as :: c_int ;
616600pub const S_nfsLib_NFSERR_JUKEBOX : :: c_int =
@@ -666,29 +650,29 @@ pub const S_IRWXO: ::c_int = 0x0007;
666650// socket.h
667651pub const SOL_SOCKET : :: c_int = 0xffff ;
668652
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 ;
692676
693677pub const SOCK_STREAM : :: c_int = 1 ;
694678pub const SOCK_DGRAM : :: c_int = 2 ;
@@ -899,7 +883,7 @@ const PTHREAD_RWLOCKATTR_INITIALIZER: pthread_rwlockattr_t =
899883 rwlockAttrStatus : PTHREAD_INITIALIZED_OBJ ,
900884 rwlockAttrPshared : 1 ,
901885 rwlockAttrMaxReaders : 0 ,
902- rwlockAttrConformOpt : 1 ,
886+ rwlockAttrConformOpt : 1 ,
903887 } ;
904888pub const PTHREAD_RWLOCK_INITIALIZER : pthread_rwlock_t = pthread_rwlock_t {
905889 rwlockSemId : null_mut ( ) ,
990974 }
991975}
992976
993- extern {
977+ extern "C" {
994978 pub fn isalnum ( c : c_int ) -> c_int ;
995979 pub fn isalpha ( c : c_int ) -> c_int ;
996980 pub fn iscntrl ( c : c_int ) -> c_int ;
@@ -1069,7 +1053,7 @@ extern {
10691053 pub fn free ( p : * mut c_void ) ;
10701054 pub fn abort ( ) -> !;
10711055 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 ;
10731057 pub fn system ( s : * const c_char ) -> c_int ;
10741058 pub fn getenv ( s : * const c_char ) -> * mut c_char ;
10751059
@@ -1127,7 +1111,7 @@ extern {
11271111 pub fn memset ( dest : * mut c_void , c : c_int , n : size_t ) -> * mut c_void ;
11281112}
11291113
1130- extern {
1114+ extern "C" {
11311115 pub fn getpwnam ( name : * const :: c_char ) -> * mut passwd ;
11321116 pub fn getpwuid ( uid : :: uid_t ) -> * mut passwd ;
11331117
@@ -1399,7 +1383,7 @@ extern {
13991383 pub fn _rtld_dladdr ( addr : * const :: c_void , info : * mut Dl_info ) -> :: c_int ;
14001384}
14011385
1402- extern {
1386+ extern "C" {
14031387 // stdlib.h
14041388 pub fn memalign ( block_size : :: size_t , size_arg : :: size_t )
14051389 -> * mut :: c_void ;
@@ -1411,9 +1395,7 @@ extern {
14111395 pub fn chdir ( attr : * const :: c_char ) -> :: c_int ;
14121396
14131397 // 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 ;
14171399
14181400 // pthread.h
14191401 pub fn pthread_mutexattr_destroy (
@@ -1475,7 +1457,7 @@ extern {
14751457 pub fn pthread_create (
14761458 pThread : * mut :: pthread_t ,
14771459 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 ,
14791461 value : * mut :: c_void ,
14801462 ) -> :: c_int ;
14811463
@@ -1487,9 +1469,9 @@ extern {
14871469
14881470 // int pthread_atfork (void (*)(void), void (*)(void), void (*)(void));
14891471 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 ( ) > ,
14931475 ) -> :: c_int ;
14941476 // stat.h
14951477 pub fn fstat ( fildes : :: c_int , buf : * mut stat ) -> :: c_int ;
@@ -1618,7 +1600,7 @@ extern {
16181600 // pthread.h
16191601 pub fn pthread_key_create (
16201602 key : * mut :: pthread_key_t ,
1621- dtor : :: Option < unsafe extern fn ( * mut :: c_void ) > ,
1603+ dtor : :: Option < unsafe extern "C" fn ( * mut :: c_void ) > ,
16221604 ) -> :: c_int ;
16231605
16241606 // pthread.h
@@ -2152,23 +2134,27 @@ pub fn posix_memalign(
21522134// epoll.h
21532135// Unfortunately epoll is currently only supported in the VxWorks kernel
21542136#[ 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+ }
21562140#[ 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+ }
21582144#[ allow( unused_variables) ]
21592145pub fn epoll_ctl (
21602146 epfd : :: c_int ,
21612147 op : :: c_int ,
21622148 fd : :: c_int ,
2163- event : * mut :: epoll_event
2164- ) -> :: c_int {
2149+ event : * mut :: epoll_event ,
2150+ ) -> :: c_int {
21652151 -1
21662152}
21672153#[ allow( unused_variables) ]
21682154pub fn epoll_create_and_ctl (
21692155 num : :: c_int ,
21702156 fds : * mut :: c_int ,
2171- event : * mut :: epoll_event
2157+ event : * mut :: epoll_event ,
21722158) -> :: c_int {
21732159 -1
21742160}
@@ -2177,9 +2163,9 @@ pub fn epoll_wait(
21772163 epfd : :: c_int ,
21782164 events : * mut :: epoll_event ,
21792165 maxevents : :: c_int ,
2180- timeout : :: c_int
2166+ timeout : :: c_int ,
21812167) -> :: c_int {
2182- -1
2168+ -1
21832169}
21842170
21852171// From sysconf.c -> doesn't seem to be supported?
0 commit comments