| ... | @@ -70,26 +70,33 @@ pub usingnamespace switch (builtin.os.tag) { | ... | @@ -70,26 +70,33 @@ pub usingnamespace switch (builtin.os.tag) { |
| 70 | pub extern "c" fn closedir(dp: *DIR) c_int; | 70 | pub extern "c" fn closedir(dp: *DIR) c_int; |
| 71 | pub extern "c" fn telldir(dp: *DIR) c_long; | 71 | pub extern "c" fn telldir(dp: *DIR) c_long; |
| 72 | pub extern "c" fn seekdir(dp: *DIR, loc: c_long) void; | 72 | pub extern "c" fn seekdir(dp: *DIR, loc: c_long) void; |
| 73 | }, | | |
| 74 | }; | | |
| 75 | | 73 | |
| 76 | pub usingnamespace switch (builtin.os.tag) { | | |
| 77 | .netbsd, .macos, .ios, .watchos, .tvos, .windows => struct {}, | | |
| 78 | else => struct { | | |
| 79 | pub extern "c" fn clock_getres(clk_id: c_int, tp: *c.timespec) c_int; | | |
| 80 | pub extern "c" fn clock_gettime(clk_id: c_int, tp: *c.timespec) c_int; | 74 | pub extern "c" fn clock_gettime(clk_id: c_int, tp: *c.timespec) c_int; |
| 81 | pub extern "c" fn fstat(fd: c.fd_t, buf: *c.Stat) c_int; | 75 | pub extern "c" fn clock_getres(clk_id: c_int, tp: *c.timespec) c_int; |
| 82 | pub extern "c" fn getrusage(who: c_int, usage: *c.rusage) c_int; | | |
| 83 | pub extern "c" fn gettimeofday(noalias tv: ?*c.timeval, noalias tz: ?*c.timezone) c_int; | 76 | pub extern "c" fn gettimeofday(noalias tv: ?*c.timeval, noalias tz: ?*c.timezone) c_int; |
| 84 | pub extern "c" fn nanosleep(rqtp: *const c.timespec, rmtp: ?*c.timespec) c_int; | 77 | pub extern "c" fn nanosleep(rqtp: *const c.timespec, rmtp: ?*c.timespec) c_int; |
| | 78 | |
| | 79 | pub extern "c" fn getrusage(who: c_int, usage: *c.rusage) c_int; |
| | 80 | |
| 85 | pub extern "c" fn sched_yield() c_int; | 81 | pub extern "c" fn sched_yield() c_int; |
| | 82 | |
| 86 | pub extern "c" fn sigaction(sig: c_int, noalias act: ?*const c.Sigaction, noalias oact: ?*c.Sigaction) c_int; | 83 | pub extern "c" fn sigaction(sig: c_int, noalias act: ?*const c.Sigaction, noalias oact: ?*c.Sigaction) c_int; |
| 87 | pub extern "c" fn sigprocmask(how: c_int, noalias set: ?*const c.sigset_t, noalias oset: ?*c.sigset_t) c_int; | 84 | pub extern "c" fn sigprocmask(how: c_int, noalias set: ?*const c.sigset_t, noalias oset: ?*c.sigset_t) c_int; |
| | 85 | pub extern "c" fn sigfillset(set: ?*c.sigset_t) void; |
| | 86 | pub extern "c" fn sigwait(set: ?*c.sigset_t, sig: ?*c_int) c_int; |
| | 87 | |
| 88 | pub extern "c" fn socket(domain: c_uint, sock_type: c_uint, protocol: c_uint) c_int; | 88 | pub extern "c" fn socket(domain: c_uint, sock_type: c_uint, protocol: c_uint) c_int; |
| | 89 | |
| 89 | pub extern "c" fn stat(noalias path: [*:0]const u8, noalias buf: *c.Stat) c_int; | 90 | pub extern "c" fn stat(noalias path: [*:0]const u8, noalias buf: *c.Stat) c_int; |
| 90 | pub extern "c" fn sigfillset(set: ?*c.sigset_t) void; | 91 | |
| 91 | pub extern "c" fn alarm(seconds: c_uint) c_uint; | 92 | pub extern "c" fn alarm(seconds: c_uint) c_uint; |
| 92 | pub extern "c" fn sigwait(set: ?*c.sigset_t, sig: ?*c_int) c_int; | 93 | }, |
| | 94 | }; |
| | 95 | |
| | 96 | pub usingnamespace switch (builtin.os.tag) { |
| | 97 | .netbsd, .macos, .ios, .watchos, .tvos, .windows => struct {}, |
| | 98 | else => struct { |
| | 99 | pub extern "c" fn fstat(fd: c.fd_t, buf: *c.Stat) c_int; |
| 93 | pub extern "c" fn readdir(dp: *c.DIR) ?*c.dirent; | 100 | pub extern "c" fn readdir(dp: *c.DIR) ?*c.dirent; |
| 94 | }, | 101 | }, |
| 95 | }; | 102 | }; |