| author | |
| committer | |
| log | 9cf34a8d81f31917acdcf9c25b8cbfe241646c3a |
| tree | 44decc3a12619940c3456124314001c1dacc3ae1 |
| parent | b430cd62e40afd30048a4d9992ec62bb34f5e041 |
| signature |
* does not move all of them, only those which map almost 1:1
* also removes their musl implementation55 files changed, 289 insertions(+), 477 deletions(-)
lib/c.zig+1| ... | ... | @@ -26,6 +26,7 @@ comptime { |
| 26 | 26 | _ = @import("c/wchar.zig"); |
| 27 | 27 | |
| 28 | 28 | _ = @import("c/sys.zig"); |
| 29 | _ = @import("c/unistd.zig"); | |
| 29 | 30 | |
| 30 | 31 | if (builtin.target.isMuslLibC() or builtin.target.isWasiLibC()) { |
| 31 | 32 | // Files specific to musl and wasi-libc. |
lib/c/sys.zig+4| ... | ... | @@ -1,3 +1,7 @@ |
| 1 | 1 | comptime { |
| 2 | _ = @import("sys/mman.zig"); | |
| 3 | _ = @import("sys/file.zig"); | |
| 4 | _ = @import("sys/reboot.zig"); | |
| 5 | _ = @import("sys/capability.zig"); | |
| 2 | 6 | _ = @import("sys/utsname.zig"); |
| 3 | 7 | } |
lib/c/sys/capability.zig created+18| ... | ... | @@ -0,0 +1,18 @@ |
| 1 | const std = @import("std"); | |
| 2 | const common = @import("../common.zig"); | |
| 3 | const builtin = @import("builtin"); | |
| 4 | ||
| 5 | comptime { | |
| 6 | if (builtin.target.isMuslLibC()) { | |
| 7 | @export(&capsetLinux, .{ .name = "capset", .linkage = common.linkage, .visibility = common.visibility }); | |
| 8 | @export(&capgetLinux, .{ .name = "capget", .linkage = common.linkage, .visibility = common.visibility }); | |
| 9 | } | |
| 10 | } | |
| 11 | ||
| 12 | fn capsetLinux(hdrp: *anyopaque, datap: *anyopaque) callconv(.c) c_int { | |
| 13 | return common.errno(std.os.linux.capset(@ptrCast(@alignCast(hdrp)), @ptrCast(@alignCast(datap)))); | |
| 14 | } | |
| 15 | ||
| 16 | fn capgetLinux(hdrp: *anyopaque, datap: *anyopaque) callconv(.c) c_int { | |
| 17 | return common.errno(std.os.linux.capget(@ptrCast(@alignCast(hdrp)), @ptrCast(@alignCast(datap)))); | |
| 18 | } |
lib/c/sys/file.zig created+13| ... | ... | @@ -0,0 +1,13 @@ |
| 1 | const std = @import("std"); | |
| 2 | const common = @import("../common.zig"); | |
| 3 | const builtin = @import("builtin"); | |
| 4 | ||
| 5 | comptime { | |
| 6 | if (builtin.target.isMuslLibC()) { | |
| 7 | @export(&flockLinux, .{ .name = "flock", .linkage = common.linkage, .visibility = common.visibility }); | |
| 8 | } | |
| 9 | } | |
| 10 | ||
| 11 | fn flockLinux(fd: c_int, operation: c_int) callconv(.c) c_int { | |
| 12 | return common.errno(std.os.linux.flock(fd, operation)); | |
| 13 | } |
lib/c/sys/mman.zig created+57| ... | ... | @@ -0,0 +1,57 @@ |
| 1 | const std = @import("std"); | |
| 2 | const common = @import("../common.zig"); | |
| 3 | const builtin = @import("builtin"); | |
| 4 | ||
| 5 | comptime { | |
| 6 | if (builtin.target.isMuslLibC()) { | |
| 7 | @export(&madviseLinux, .{ .name = "madvise", .linkage = common.linkage, .visibility = common.visibility }); | |
| 8 | @export(&madviseLinux, .{ .name = "__madvise", .linkage = common.linkage, .visibility = common.visibility }); | |
| 9 | ||
| 10 | @export(&mlockLinux, .{ .name = "mlock", .linkage = common.linkage, .visibility = common.visibility }); | |
| 11 | @export(&mlockallLinux, .{ .name = "mlockall", .linkage = common.linkage, .visibility = common.visibility }); | |
| 12 | ||
| 13 | @export(&mprotectLinux, .{ .name = "mprotect", .linkage = common.linkage, .visibility = common.visibility }); | |
| 14 | @export(&mprotectLinux, .{ .name = "__mprotect", .linkage = common.linkage, .visibility = common.visibility }); | |
| 15 | ||
| 16 | @export(&munlockLinux, .{ .name = "munlock", .linkage = common.linkage, .visibility = common.visibility }); | |
| 17 | @export(&munlockallLinux, .{ .name = "munlockall", .linkage = common.linkage, .visibility = common.visibility }); | |
| 18 | ||
| 19 | @export(&posix_madviseLinux, .{ .name = "posix_madvise", .linkage = common.linkage, .visibility = common.visibility }); | |
| 20 | } | |
| 21 | } | |
| 22 | ||
| 23 | fn madviseLinux(addr: *anyopaque, len: usize, advice: c_int) callconv(.c) c_int { | |
| 24 | return common.errno(std.os.linux.madvise(@ptrCast(addr), len, @bitCast(advice))); | |
| 25 | } | |
| 26 | ||
| 27 | fn mincoreLinux(addr: *anyopaque, len: usize, vec: [*]u8) callconv(.c) c_int { | |
| 28 | return common.errno(std.os.linux.mincore(@ptrCast(addr), len, vec)); | |
| 29 | } | |
| 30 | ||
| 31 | fn mlockLinux(addr: *const anyopaque, len: usize) callconv(.c) c_int { | |
| 32 | return common.errno(std.os.linux.mlock(@ptrCast(addr), len)); | |
| 33 | } | |
| 34 | ||
| 35 | fn mlockallLinux(flags: c_int) callconv(.c) c_int { | |
| 36 | return common.errno(std.os.linux.mlockall(@bitCast(flags))); | |
| 37 | } | |
| 38 | ||
| 39 | fn mprotectLinux(addr: *anyopaque, len: usize, prot: c_int) callconv(.c) c_int { | |
| 40 | const page_size = std.heap.pageSize(); | |
| 41 | const start = std.mem.alignBackward(usize, @intFromPtr(addr), page_size); | |
| 42 | const aligned_len = std.mem.alignForward(usize, len, page_size); | |
| 43 | return common.errno(std.os.linux.mprotect(@ptrFromInt(start), aligned_len, @bitCast(prot))); | |
| 44 | } | |
| 45 | ||
| 46 | fn munlockLinux(addr: *const anyopaque, len: usize) callconv(.c) c_int { | |
| 47 | return common.errno(std.os.linux.munlock(@ptrCast(addr), len)); | |
| 48 | } | |
| 49 | ||
| 50 | fn munlockallLinux() callconv(.c) c_int { | |
| 51 | return common.errno(std.os.linux.munlockall()); | |
| 52 | } | |
| 53 | ||
| 54 | fn posix_madviseLinux(addr: *anyopaque, len: usize, advice: c_int) callconv(.c) c_int { | |
| 55 | if (advice == std.os.linux.MADV.DONTNEED) return 0; | |
| 56 | return @intCast(-@as(isize, @bitCast(std.os.linux.madvise(@ptrCast(addr), len, @bitCast(advice))))); | |
| 57 | } |
lib/c/sys/reboot.zig created+13| ... | ... | @@ -0,0 +1,13 @@ |
| 1 | const std = @import("std"); | |
| 2 | const common = @import("../common.zig"); | |
| 3 | const builtin = @import("builtin"); | |
| 4 | ||
| 5 | comptime { | |
| 6 | if (builtin.target.isMuslLibC()) { | |
| 7 | @export(&rebootLinux, .{ .name = "reboot", .linkage = common.linkage, .visibility = common.visibility }); | |
| 8 | } | |
| 9 | } | |
| 10 | ||
| 11 | fn rebootLinux(cmd: c_int) callconv(.c) c_int { | |
| 12 | return common.errno(std.os.linux.reboot(.MAGIC1, .MAGIC2, @enumFromInt(cmd), null)); | |
| 13 | } |
lib/c/unistd.zig created+183| ... | ... | @@ -0,0 +1,183 @@ |
| 1 | const std = @import("std"); | |
| 2 | const common = @import("common.zig"); | |
| 3 | const builtin = @import("builtin"); | |
| 4 | const linux = std.os.linux; | |
| 5 | ||
| 6 | comptime { | |
| 7 | if (builtin.target.isMuslLibC()) { | |
| 8 | @export(&_exit, .{ .name = "_exit", .linkage = common.linkage, .visibility = common.visibility }); | |
| 9 | ||
| 10 | @export(&accessLinux, .{ .name = "access", .linkage = common.linkage, .visibility = common.visibility }); | |
| 11 | @export(&acctLinux, .{ .name = "acct", .linkage = common.linkage, .visibility = common.visibility }); | |
| 12 | @export(&chdirLinux, .{ .name = "chdir", .linkage = common.linkage, .visibility = common.visibility }); | |
| 13 | @export(&chownLinux, .{ .name = "chown", .linkage = common.linkage, .visibility = common.visibility }); | |
| 14 | @export(&fchownatLinux, .{ .name = "fchownat", .linkage = common.linkage, .visibility = common.visibility }); | |
| 15 | @export(&lchownLinux, .{ .name = "lchown", .linkage = common.linkage, .visibility = common.visibility }); | |
| 16 | @export(&chrootLinux, .{ .name = "chroot", .linkage = common.linkage, .visibility = common.visibility }); | |
| 17 | @export(&ctermidLinux, .{ .name = "ctermid", .linkage = common.linkage, .visibility = common.visibility }); | |
| 18 | @export(&dupLinux, .{ .name = "dup", .linkage = common.linkage, .visibility = common.visibility }); | |
| 19 | ||
| 20 | @export(&getegidLinux, .{ .name = "getegid", .linkage = common.linkage, .visibility = common.visibility }); | |
| 21 | @export(&geteuidLinux, .{ .name = "geteuid", .linkage = common.linkage, .visibility = common.visibility }); | |
| 22 | @export(&getgidLinux, .{ .name = "getgid", .linkage = common.linkage, .visibility = common.visibility }); | |
| 23 | @export(&getgroupsLinux, .{ .name = "getgroups", .linkage = common.linkage, .visibility = common.visibility }); | |
| 24 | @export(&getpgidLinux, .{ .name = "getpgid", .linkage = common.linkage, .visibility = common.visibility }); | |
| 25 | @export(&getpgrpLinux, .{ .name = "getpgrp", .linkage = common.linkage, .visibility = common.visibility }); | |
| 26 | @export(&setpgidLinux, .{ .name = "setpgid", .linkage = common.linkage, .visibility = common.visibility }); | |
| 27 | @export(&setpgrpLinux, .{ .name = "setpgrp", .linkage = common.linkage, .visibility = common.visibility }); | |
| 28 | @export(&getsidLinux, .{ .name = "getsid", .linkage = common.linkage, .visibility = common.visibility }); | |
| 29 | @export(&getpidLinux, .{ .name = "getpid", .linkage = common.linkage, .visibility = common.visibility }); | |
| 30 | @export(&getppidLinux, .{ .name = "getppid", .linkage = common.linkage, .visibility = common.visibility }); | |
| 31 | @export(&getuidLinux, .{ .name = "getuid", .linkage = common.linkage, .visibility = common.visibility }); | |
| 32 | ||
| 33 | @export(&rmdirLinux, .{ .name = "rmdir", .linkage = common.linkage, .visibility = common.visibility }); | |
| 34 | @export(&linkLinux, .{ .name = "link", .linkage = common.linkage, .visibility = common.visibility }); | |
| 35 | @export(&linkatLinux, .{ .name = "linkat", .linkage = common.linkage, .visibility = common.visibility }); | |
| 36 | @export(&pipeLinux, .{ .name = "pipe", .linkage = common.linkage, .visibility = common.visibility }); | |
| 37 | @export(&renameatLinux, .{ .name = "renameat", .linkage = common.linkage, .visibility = common.visibility }); | |
| 38 | @export(&symlinkLinux, .{ .name = "symlink", .linkage = common.linkage, .visibility = common.visibility }); | |
| 39 | @export(&symlinkatLinux, .{ .name = "symlinkat", .linkage = common.linkage, .visibility = common.visibility }); | |
| 40 | @export(&syncLinux, .{ .name = "sync", .linkage = common.linkage, .visibility = common.visibility }); | |
| 41 | @export(&unlinkLinux, .{ .name = "unlink", .linkage = common.linkage, .visibility = common.visibility }); | |
| 42 | @export(&unlinkatLinux, .{ .name = "unlinkat", .linkage = common.linkage, .visibility = common.visibility }); | |
| 43 | ||
| 44 | @export(&execveLinux, .{ .name = "execve", .linkage = common.linkage, .visibility = common.visibility }); | |
| 45 | } | |
| 46 | } | |
| 47 | ||
| 48 | fn _exit(exit_code: c_int) callconv(.c) noreturn { | |
| 49 | std.c._Exit(exit_code); | |
| 50 | } | |
| 51 | ||
| 52 | fn accessLinux(path: [*:0]const c_char, amode: c_int) callconv(.c) c_int { | |
| 53 | return common.errno(linux.access(@ptrCast(path), @bitCast(amode))); | |
| 54 | } | |
| 55 | ||
| 56 | fn acctLinux(path: [*:0]const c_char) callconv(.c) c_int { | |
| 57 | return common.errno(linux.acct(@ptrCast(path))); | |
| 58 | } | |
| 59 | ||
| 60 | fn chdirLinux(path: [*:0]const c_char) callconv(.c) c_int { | |
| 61 | return common.errno(linux.chdir(@ptrCast(path))); | |
| 62 | } | |
| 63 | ||
| 64 | fn chownLinux(path: [*:0]const c_char, uid: linux.uid_t, gid: linux.gid_t) callconv(.c) c_int { | |
| 65 | return common.errno(linux.chown(@ptrCast(path), uid, gid)); | |
| 66 | } | |
| 67 | ||
| 68 | fn fchownatLinux(fd: c_int, path: [*:0]const c_char, uid: linux.uid_t, gid: linux.gid_t, flags: c_int) callconv(.c) c_int { | |
| 69 | return common.errno(linux.fchownat(fd, @ptrCast(path), uid, gid, @bitCast(flags))); | |
| 70 | } | |
| 71 | ||
| 72 | fn lchownLinux(path: [*:0]const c_char, uid: linux.uid_t, gid: linux.gid_t) callconv(.c) c_int { | |
| 73 | return common.errno(linux.lchown(@ptrCast(path), uid, gid)); | |
| 74 | } | |
| 75 | ||
| 76 | fn chrootLinux(path: [*:0]const c_char) callconv(.c) c_int { | |
| 77 | return common.errno(linux.chroot(@ptrCast(path))); | |
| 78 | } | |
| 79 | ||
| 80 | fn ctermidLinux(maybe_path: ?[*]c_char) callconv(.c) [*:0]c_char { | |
| 81 | const default_tty = "/dev/tty"; | |
| 82 | ||
| 83 | return if (maybe_path) |path| blk: { | |
| 84 | path[0..(default_tty.len + 1)].* = @bitCast(default_tty.*); | |
| 85 | break :blk path[0..default_tty.len :0].ptr; | |
| 86 | } else @ptrCast(@constCast(default_tty)); | |
| 87 | } | |
| 88 | ||
| 89 | fn dupLinux(fd: c_int) callconv(.c) c_int { | |
| 90 | return common.errno(linux.dup(fd)); | |
| 91 | } | |
| 92 | ||
| 93 | fn getegidLinux() callconv(.c) linux.gid_t { | |
| 94 | return linux.getegid(); | |
| 95 | } | |
| 96 | ||
| 97 | fn geteuidLinux() callconv(.c) linux.uid_t { | |
| 98 | return linux.geteuid(); | |
| 99 | } | |
| 100 | ||
| 101 | fn getgidLinux() callconv(.c) linux.gid_t { | |
| 102 | return linux.getgid(); | |
| 103 | } | |
| 104 | ||
| 105 | fn getgroupsLinux(size: c_int, list: ?[*]linux.gid_t) callconv(.c) c_int { | |
| 106 | return common.errno(linux.getgroups(@intCast(size), list)); | |
| 107 | } | |
| 108 | ||
| 109 | fn getpgidLinux(pid: linux.pid_t) callconv(.c) linux.pid_t { | |
| 110 | return common.errno(linux.getpgid(pid)); | |
| 111 | } | |
| 112 | ||
| 113 | fn getpgrpLinux() callconv(.c) linux.pid_t { | |
| 114 | return @intCast(linux.getpgid(0)); // @intCast as it cannot fail | |
| 115 | } | |
| 116 | ||
| 117 | fn setpgidLinux(pid: linux.pid_t, pgid: linux.pid_t) callconv(.c) c_int { | |
| 118 | return common.errno(linux.setpgid(pid, pgid)); | |
| 119 | } | |
| 120 | ||
| 121 | fn setpgrpLinux() callconv(.c) linux.pid_t { | |
| 122 | return @intCast(linux.setpgid(0, 0)); // @intCast as it cannot fail | |
| 123 | } | |
| 124 | ||
| 125 | fn getpidLinux() callconv(.c) linux.pid_t { | |
| 126 | return linux.getpid(); | |
| 127 | } | |
| 128 | ||
| 129 | fn getppidLinux() callconv(.c) linux.pid_t { | |
| 130 | return linux.getppid(); | |
| 131 | } | |
| 132 | ||
| 133 | fn getsidLinux(pid: linux.pid_t) callconv(.c) linux.pid_t { | |
| 134 | return common.errno(linux.getsid(pid)); | |
| 135 | } | |
| 136 | ||
| 137 | fn getuidLinux() callconv(.c) linux.uid_t { | |
| 138 | return linux.getuid(); | |
| 139 | } | |
| 140 | ||
| 141 | fn linkLinux(old: [*:0]const c_char, new: [*:0]const c_char) callconv(.c) c_int { | |
| 142 | return common.errno(linux.link(@ptrCast(old), @ptrCast(new))); | |
| 143 | } | |
| 144 | ||
| 145 | fn linkatLinux(old_fd: c_int, old: [*:0]const c_char, new_fd: c_int, new: [*:0]const c_char, flags: c_int) callconv(.c) c_int { | |
| 146 | return common.errno(linux.linkat(old_fd, @ptrCast(old), new_fd, @ptrCast(new), @bitCast(flags))); | |
| 147 | } | |
| 148 | ||
| 149 | fn pipeLinux(fd: *[2]c_int) callconv(.c) c_int { | |
| 150 | return common.errno(linux.pipe(@ptrCast(fd))); | |
| 151 | } | |
| 152 | ||
| 153 | fn renameatLinux(old_fd: c_int, old: [*:0]const c_char, new_fd: c_int, new: [*:0]const c_char) callconv(.c) c_int { | |
| 154 | return common.errno(linux.renameat(old_fd, @ptrCast(old), new_fd, @ptrCast(new))); | |
| 155 | } | |
| 156 | ||
| 157 | fn rmdirLinux(path: [*:0]const c_char) callconv(.c) c_int { | |
| 158 | return common.errno(linux.rmdir(@ptrCast(path))); | |
| 159 | } | |
| 160 | ||
| 161 | fn symlinkLinux(existing: [*:0]const c_char, new: [*:0]const c_char) callconv(.c) c_int { | |
| 162 | return common.errno(linux.symlink(@ptrCast(existing), @ptrCast(new))); | |
| 163 | } | |
| 164 | ||
| 165 | fn symlinkatLinux(existing: [*:0]const c_char, fd: c_int, new: [*:0]const c_char) callconv(.c) c_int { | |
| 166 | return common.errno(linux.symlinkat(@ptrCast(existing), fd, @ptrCast(new))); | |
| 167 | } | |
| 168 | ||
| 169 | fn syncLinux() callconv(.c) void { | |
| 170 | linux.sync(); | |
| 171 | } | |
| 172 | ||
| 173 | fn unlinkLinux(path: [*:0]const c_char) callconv(.c) c_int { | |
| 174 | return common.errno(linux.unlink(@ptrCast(path))); | |
| 175 | } | |
| 176 | ||
| 177 | fn unlinkatLinux(fd: c_int, path: [*:0]const c_char, flags: c_int) callconv(.c) c_int { | |
| 178 | return common.errno(linux.unlinkat(fd, @ptrCast(path), @bitCast(flags))); | |
| 179 | } | |
| 180 | ||
| 181 | fn execveLinux(path: [*:0]const c_char, argv: [*:null]const ?[*:0]c_char, envp: [*:null]const ?[*:0]c_char) callconv(.c) c_int { | |
| 182 | return common.errno(linux.execve(@ptrCast(path), @ptrCast(argv), @ptrCast(envp))); | |
| 183 | } |
lib/libc/musl/src/linux/cap.c deleted-11| ... | ... | @@ -1,11 +0,0 @@ |
| 1 | #include "syscall.h" | |
| 2 | ||
| 3 | int capset(void *a, void *b) | |
| 4 | { | |
| 5 | 	return syscall(SYS_capset, a, b); | |
| 6 | } | |
| 7 | ||
| 8 | int capget(void *a, void *b) | |
| 9 | { | |
| 10 | 	return syscall(SYS_capget, a, b); | |
| 11 | } |
lib/libc/musl/src/linux/chroot.c deleted-8| ... | ... | @@ -1,8 +0,0 @@ |
| 1 | #define _GNU_SOURCE | |
| 2 | #include <unistd.h> | |
| 3 | #include "syscall.h" | |
| 4 | ||
| 5 | int chroot(const char *path) | |
| 6 | { | |
| 7 | 	return syscall(SYS_chroot, path); | |
| 8 | } |
lib/libc/musl/src/linux/flock.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <sys/file.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | int flock(int fd, int op) | |
| 5 | { | |
| 6 | 	return syscall(SYS_flock, fd, op); | |
| 7 | } |
lib/libc/musl/src/linux/reboot.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <sys/reboot.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | int reboot(int type) | |
| 5 | { | |
| 6 | 	return syscall(SYS_reboot, 0xfee1dead, 672274793, type); | |
| 7 | } |
lib/libc/musl/src/mman/madvise.c deleted-9| ... | ... | @@ -1,9 +0,0 @@ |
| 1 | #include <sys/mman.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | int __madvise(void *addr, size_t len, int advice) | |
| 5 | { | |
| 6 | 	return syscall(SYS_madvise, addr, len, advice); | |
| 7 | } | |
| 8 | ||
| 9 | weak_alias(__madvise, madvise); |
lib/libc/musl/src/mman/mincore.c deleted-8| ... | ... | @@ -1,8 +0,0 @@ |
| 1 | #define _GNU_SOURCE | |
| 2 | #include <sys/mman.h> | |
| 3 | #include "syscall.h" | |
| 4 | ||
| 5 | int mincore (void *addr, size_t len, unsigned char *vec) | |
| 6 | { | |
| 7 | 	return syscall(SYS_mincore, addr, len, vec); | |
| 8 | } |
lib/libc/musl/src/mman/mlock.c deleted-11| ... | ... | @@ -1,11 +0,0 @@ |
| 1 | #include <sys/mman.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | int mlock(const void *addr, size_t len) | |
| 5 | { | |
| 6 | #ifdef SYS_mlock | |
| 7 | 	return syscall(SYS_mlock, addr, len); | |
| 8 | #else | |
| 9 | 	return syscall(SYS_mlock2, addr, len, 0); | |
| 10 | #endif | |
| 11 | } |
lib/libc/musl/src/mman/mlockall.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <sys/mman.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | int mlockall(int flags) | |
| 5 | { | |
| 6 | 	return syscall(SYS_mlockall, flags); | |
| 7 | } |
lib/libc/musl/src/mman/mprotect.c deleted-13| ... | ... | @@ -1,13 +0,0 @@ |
| 1 | #include <sys/mman.h> | |
| 2 | #include "libc.h" | |
| 3 | #include "syscall.h" | |
| 4 | ||
| 5 | int __mprotect(void *addr, size_t len, int prot) | |
| 6 | { | |
| 7 | 	size_t start, end; | |
| 8 | 	start = (size_t)addr & -PAGE_SIZE; | |
| 9 | 	end = (size_t)((char *)addr + len + PAGE_SIZE-1) & -PAGE_SIZE; | |
| 10 | 	return syscall(SYS_mprotect, start, end-start, prot); | |
| 11 | } | |
| 12 | ||
| 13 | weak_alias(__mprotect, mprotect); |
lib/libc/musl/src/mman/munlock.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <sys/mman.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | int munlock(const void *addr, size_t len) | |
| 5 | { | |
| 6 | 	return syscall(SYS_munlock, addr, len); | |
| 7 | } |
lib/libc/musl/src/mman/munlockall.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <sys/mman.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | int munlockall(void) | |
| 5 | { | |
| 6 | 	return syscall(SYS_munlockall); | |
| 7 | } |
lib/libc/musl/src/mman/posix_madvise.c deleted-9| ... | ... | @@ -1,9 +0,0 @@ |
| 1 | #define _GNU_SOURCE | |
| 2 | #include <sys/mman.h> | |
| 3 | #include "syscall.h" | |
| 4 | ||
| 5 | int posix_madvise(void *addr, size_t len, int advice) | |
| 6 | { | |
| 7 | 	if (advice == MADV_DONTNEED) return 0; | |
| 8 | 	return -__syscall(SYS_madvise, addr, len, advice); | |
| 9 | } |
lib/libc/musl/src/process/execve.c deleted-8| ... | ... | @@ -1,8 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | int execve(const char *path, char *const argv[], char *const envp[]) | |
| 5 | { | |
| 6 | 	/* do we need to use environ if envp is null? */ | |
| 7 | 	return syscall(SYS_execve, path, argv, envp); | |
| 8 | } |
lib/libc/musl/src/unistd/_exit.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include <stdlib.h> | |
| 3 | ||
| 4 | _Noreturn void _exit(int status) | |
| 5 | { | |
| 6 | 	_Exit(status); | |
| 7 | } |
lib/libc/musl/src/unistd/access.c deleted-12| ... | ... | @@ -1,12 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include <fcntl.h> | |
| 3 | #include "syscall.h" | |
| 4 | ||
| 5 | int access(const char *filename, int amode) | |
| 6 | { | |
| 7 | #ifdef SYS_access | |
| 8 | 	return syscall(SYS_access, filename, amode); | |
| 9 | #else | |
| 10 | 	return syscall(SYS_faccessat, AT_FDCWD, filename, amode, 0); | |
| 11 | #endif | |
| 12 | } |
lib/libc/musl/src/unistd/acct.c deleted-8| ... | ... | @@ -1,8 +0,0 @@ |
| 1 | #define _GNU_SOURCE | |
| 2 | #include <unistd.h> | |
| 3 | #include "syscall.h" | |
| 4 | ||
| 5 | int acct(const char *filename) | |
| 6 | { | |
| 7 | 	return syscall(SYS_acct, filename); | |
| 8 | } |
lib/libc/musl/src/unistd/chdir.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | int chdir(const char *path) | |
| 5 | { | |
| 6 | 	return syscall(SYS_chdir, path); | |
| 7 | } |
lib/libc/musl/src/unistd/chown.c deleted-12| ... | ... | @@ -1,12 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include <fcntl.h> | |
| 3 | #include "syscall.h" | |
| 4 | ||
| 5 | int chown(const char *path, uid_t uid, gid_t gid) | |
| 6 | { | |
| 7 | #ifdef SYS_chown | |
| 8 | 	return syscall(SYS_chown, path, uid, gid); | |
| 9 | #else | |
| 10 | 	return syscall(SYS_fchownat, AT_FDCWD, path, uid, gid, 0); | |
| 11 | #endif | |
| 12 | } |
lib/libc/musl/src/unistd/ctermid.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <stdio.h> | |
| 2 | #include <string.h> | |
| 3 | ||
| 4 | char *ctermid(char *s) | |
| 5 | { | |
| 6 | 	return s ? strcpy(s, "/dev/tty") : "/dev/tty"; | |
| 7 | } |
lib/libc/musl/src/unistd/dup.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | int dup(int fd) | |
| 5 | { | |
| 6 | 	return syscall(SYS_dup, fd); | |
| 7 | } |
lib/libc/musl/src/unistd/fchownat.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | int fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag) | |
| 5 | { | |
| 6 | 	return syscall(SYS_fchownat, fd, path, uid, gid, flag); | |
| 7 | } |
lib/libc/musl/src/unistd/getegid.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | gid_t getegid(void) | |
| 5 | { | |
| 6 | 	return __syscall(SYS_getegid); | |
| 7 | } |
lib/libc/musl/src/unistd/geteuid.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | uid_t geteuid(void) | |
| 5 | { | |
| 6 | 	return __syscall(SYS_geteuid); | |
| 7 | } |
lib/libc/musl/src/unistd/getgid.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | gid_t getgid(void) | |
| 5 | { | |
| 6 | 	return __syscall(SYS_getgid); | |
| 7 | } |
lib/libc/musl/src/unistd/getgroups.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | int getgroups(int count, gid_t list[]) | |
| 5 | { | |
| 6 | 	return syscall(SYS_getgroups, count, list); | |
| 7 | } |
lib/libc/musl/src/unistd/getpgid.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | pid_t getpgid(pid_t pid) | |
| 5 | { | |
| 6 | 	return syscall(SYS_getpgid, pid); | |
| 7 | } |
lib/libc/musl/src/unistd/getpgrp.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | pid_t getpgrp(void) | |
| 5 | { | |
| 6 | 	return __syscall(SYS_getpgid, 0); | |
| 7 | } |
lib/libc/musl/src/unistd/getpid.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | pid_t getpid(void) | |
| 5 | { | |
| 6 | 	return __syscall(SYS_getpid); | |
| 7 | } |
lib/libc/musl/src/unistd/getppid.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | pid_t getppid(void) | |
| 5 | { | |
| 6 | 	return __syscall(SYS_getppid); | |
| 7 | } |
lib/libc/musl/src/unistd/getsid.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | pid_t getsid(pid_t pid) | |
| 5 | { | |
| 6 | 	return syscall(SYS_getsid, pid); | |
| 7 | } |
lib/libc/musl/src/unistd/getuid.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | uid_t getuid(void) | |
| 5 | { | |
| 6 | 	return __syscall(SYS_getuid); | |
| 7 | } |
lib/libc/musl/src/unistd/lchown.c deleted-12| ... | ... | @@ -1,12 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include <fcntl.h> | |
| 3 | #include "syscall.h" | |
| 4 | ||
| 5 | int lchown(const char *path, uid_t uid, gid_t gid) | |
| 6 | { | |
| 7 | #ifdef SYS_lchown | |
| 8 | 	return syscall(SYS_lchown, path, uid, gid); | |
| 9 | #else | |
| 10 | 	return syscall(SYS_fchownat, AT_FDCWD, path, uid, gid, AT_SYMLINK_NOFOLLOW); | |
| 11 | #endif | |
| 12 | } |
lib/libc/musl/src/unistd/link.c deleted-12| ... | ... | @@ -1,12 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include <fcntl.h> | |
| 3 | #include "syscall.h" | |
| 4 | ||
| 5 | int link(const char *existing, const char *new) | |
| 6 | { | |
| 7 | #ifdef SYS_link | |
| 8 | 	return syscall(SYS_link, existing, new); | |
| 9 | #else | |
| 10 | 	return syscall(SYS_linkat, AT_FDCWD, existing, AT_FDCWD, new, 0); | |
| 11 | #endif | |
| 12 | } |
lib/libc/musl/src/unistd/linkat.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | int linkat(int fd1, const char *existing, int fd2, const char *new, int flag) | |
| 5 | { | |
| 6 | 	return syscall(SYS_linkat, fd1, existing, fd2, new, flag); | |
| 7 | } |
lib/libc/musl/src/unistd/mips/pipe.s deleted-20| ... | ... | @@ -1,20 +0,0 @@ |
| 1 | .set noreorder | |
| 2 | ||
| 3 | .global pipe | |
| 4 | .type pipe,@function | |
| 5 | pipe: | |
| 6 | 	lui $gp, %hi(_gp_disp) | |
| 7 | 	addiu $gp, %lo(_gp_disp) | |
| 8 | 	addu $gp, $gp, $25 | |
| 9 | 	li $2, 4042 | |
| 10 | 	syscall | |
| 11 | 	beq $7, $0, 1f | |
| 12 | 	nop | |
| 13 | 	lw $25, %call16(__syscall_ret)($gp) | |
| 14 | 	jr $25 | |
| 15 | 	subu $4, $0, $2 | |
| 16 | 1:	sw $2, 0($4) | |
| 17 | 	sw $3, 4($4) | |
| 18 | 	move $2, $0 | |
| 19 | 	jr $ra | |
| 20 | 	nop |
lib/libc/musl/src/unistd/mips64/pipe.s deleted-19| ... | ... | @@ -1,19 +0,0 @@ |
| 1 | .set	noreorder | |
| 2 | .global	pipe | |
| 3 | .type	pipe,@function | |
| 4 | pipe: | |
| 5 | 	lui	$3, %hi(%neg(%gp_rel(pipe))) | |
| 6 | 	daddiu	$3, $3, %lo(%neg(%gp_rel(pipe))) | |
| 7 | 	daddu	$3, $3, $25 | |
| 8 | 	li	$2, 5021 | |
| 9 | 	syscall | |
| 10 | 	beq	$7, $0, 1f | |
| 11 | 	nop | |
| 12 | 	ld	$25, %got_disp(__syscall_ret)($3) | |
| 13 | 	jr	$25 | |
| 14 | 	dsubu	$4, $0, $2 | |
| 15 | 1:	sw	$2, 0($4) | |
| 16 | 	sw	$3, 4($4) | |
| 17 | 	move	$2, $0 | |
| 18 | 	jr	$ra | |
| 19 | 	nop |
lib/libc/musl/src/unistd/mipsn32/pipe.s deleted-19| ... | ... | @@ -1,19 +0,0 @@ |
| 1 | .set	noreorder | |
| 2 | .global	pipe | |
| 3 | .type	pipe,@function | |
| 4 | pipe: | |
| 5 | 	lui	$3, %hi(%neg(%gp_rel(pipe))) | |
| 6 | 	addiu	$3, $3, %lo(%neg(%gp_rel(pipe))) | |
| 7 | 	addu	$3, $3, $25 | |
| 8 | 	li	$2, 6021 | |
| 9 | 	syscall | |
| 10 | 	beq	$7, $0, 1f | |
| 11 | 	nop | |
| 12 | 	lw	$25, %got_disp(__syscall_ret)($3) | |
| 13 | 	jr	$25 | |
| 14 | 	subu	$4, $0, $2 | |
| 15 | 1:	sw	$2, 0($4) | |
| 16 | 	sw	$3, 4($4) | |
| 17 | 	move	$2, $0 | |
| 18 | 	jr	$ra | |
| 19 | 	nop |
lib/libc/musl/src/unistd/pipe.c deleted-11| ... | ... | @@ -1,11 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | int pipe(int fd[2]) | |
| 5 | { | |
| 6 | #ifdef SYS_pipe | |
| 7 | 	return syscall(SYS_pipe, fd); | |
| 8 | #else | |
| 9 | 	return syscall(SYS_pipe2, fd, 0); | |
| 10 | #endif | |
| 11 | } |
lib/libc/musl/src/unistd/renameat.c deleted-11| ... | ... | @@ -1,11 +0,0 @@ |
| 1 | #include <stdio.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | int renameat(int oldfd, const char *old, int newfd, const char *new) | |
| 5 | { | |
| 6 | #ifdef SYS_renameat | |
| 7 | 	return syscall(SYS_renameat, oldfd, old, newfd, new); | |
| 8 | #else | |
| 9 | 	return syscall(SYS_renameat2, oldfd, old, newfd, new, 0); | |
| 10 | #endif | |
| 11 | } |
lib/libc/musl/src/unistd/rmdir.c deleted-12| ... | ... | @@ -1,12 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include <fcntl.h> | |
| 3 | #include "syscall.h" | |
| 4 | ||
| 5 | int rmdir(const char *path) | |
| 6 | { | |
| 7 | #ifdef SYS_rmdir | |
| 8 | 	return syscall(SYS_rmdir, path); | |
| 9 | #else | |
| 10 | 	return syscall(SYS_unlinkat, AT_FDCWD, path, AT_REMOVEDIR); | |
| 11 | #endif | |
| 12 | } |
lib/libc/musl/src/unistd/setpgid.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | int setpgid(pid_t pid, pid_t pgid) | |
| 5 | { | |
| 6 | 	return syscall(SYS_setpgid, pid, pgid); | |
| 7 | } |
lib/libc/musl/src/unistd/setpgrp.c deleted-6| ... | ... | @@ -1,6 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | ||
| 3 | pid_t setpgrp(void) | |
| 4 | { | |
| 5 | 	return setpgid(0, 0); | |
| 6 | } |
lib/libc/musl/src/unistd/symlink.c deleted-12| ... | ... | @@ -1,12 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include <fcntl.h> | |
| 3 | #include "syscall.h" | |
| 4 | ||
| 5 | int symlink(const char *existing, const char *new) | |
| 6 | { | |
| 7 | #ifdef SYS_symlink | |
| 8 | 	return syscall(SYS_symlink, existing, new); | |
| 9 | #else | |
| 10 | 	return syscall(SYS_symlinkat, existing, AT_FDCWD, new); | |
| 11 | #endif | |
| 12 | } |
lib/libc/musl/src/unistd/symlinkat.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | int symlinkat(const char *existing, int fd, const char *new) | |
| 5 | { | |
| 6 | 	return syscall(SYS_symlinkat, existing, fd, new); | |
| 7 | } |
lib/libc/musl/src/unistd/sync.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | void sync(void) | |
| 5 | { | |
| 6 | 	__syscall(SYS_sync); | |
| 7 | } |
lib/libc/musl/src/unistd/unlink.c deleted-12| ... | ... | @@ -1,12 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include <fcntl.h> | |
| 3 | #include "syscall.h" | |
| 4 | ||
| 5 | int unlink(const char *path) | |
| 6 | { | |
| 7 | #ifdef SYS_unlink | |
| 8 | 	return syscall(SYS_unlink, path); | |
| 9 | #else | |
| 10 | 	return syscall(SYS_unlinkat, AT_FDCWD, path, 0); | |
| 11 | #endif | |
| 12 | } |
lib/libc/musl/src/unistd/unlinkat.c deleted-7| ... | ... | @@ -1,7 +0,0 @@ |
| 1 | #include <unistd.h> | |
| 2 | #include "syscall.h" | |
| 3 | ||
| 4 | int unlinkat(int fd, const char *path, int flag) | |
| 5 | { | |
| 6 | 	return syscall(SYS_unlinkat, fd, path, flag); | |
| 7 | } |
src/libs/musl.zig-47| ... | ... | @@ -704,8 +704,6 @@ const src_files = [_][]const u8{ |
| 704 | 704 | "musl/src/linux/arch_prctl.c", |
| 705 | 705 | "musl/src/linux/brk.c", |
| 706 | 706 | "musl/src/linux/cache.c", |
| 707 | "musl/src/linux/cap.c", | |
| 708 | "musl/src/linux/chroot.c", | |
| 709 | 707 | "musl/src/linux/clock_adjtime.c", |
| 710 | 708 | "musl/src/linux/clone.c", |
| 711 | 709 | "musl/src/linux/copy_file_range.c", |
| ... | ... | @@ -713,7 +711,6 @@ const src_files = [_][]const u8{ |
| 713 | 711 | "musl/src/linux/eventfd.c", |
| 714 | 712 | "musl/src/linux/fallocate.c", |
| 715 | 713 | "musl/src/linux/fanotify.c", |
| 716 | "musl/src/linux/flock.c", | |
| 717 | 714 | "musl/src/linux/getdents.c", |
| 718 | 715 | "musl/src/linux/getrandom.c", |
| 719 | 716 | "musl/src/linux/gettid.c", |
| ... | ... | @@ -738,7 +735,6 @@ const src_files = [_][]const u8{ |
| 738 | 735 | "musl/src/linux/pwritev2.c", |
| 739 | 736 | "musl/src/linux/quotactl.c", |
| 740 | 737 | "musl/src/linux/readahead.c", |
| 741 | "musl/src/linux/reboot.c", | |
| 742 | 738 | "musl/src/linux/remap_file_pages.c", |
| 743 | 739 | "musl/src/linux/sbrk.c", |
| 744 | 740 | "musl/src/linux/sendfile.c", |
| ... | ... | @@ -1157,18 +1153,10 @@ const src_files = [_][]const u8{ |
| 1157 | 1153 | "musl/src/misc/syscall.c", |
| 1158 | 1154 | "musl/src/misc/syslog.c", |
| 1159 | 1155 | "musl/src/misc/wordexp.c", |
| 1160 | "musl/src/mman/madvise.c", | |
| 1161 | "musl/src/mman/mincore.c", | |
| 1162 | "musl/src/mman/mlockall.c", | |
| 1163 | "musl/src/mman/mlock.c", | |
| 1164 | 1156 | "musl/src/mman/mmap.c", |
| 1165 | "musl/src/mman/mprotect.c", | |
| 1166 | 1157 | "musl/src/mman/mremap.c", |
| 1167 | 1158 | "musl/src/mman/msync.c", |
| 1168 | "musl/src/mman/munlockall.c", | |
| 1169 | "musl/src/mman/munlock.c", | |
| 1170 | 1159 | "musl/src/mman/munmap.c", |
| 1171 | "musl/src/mman/posix_madvise.c", | |
| 1172 | 1160 | "musl/src/mman/shm_open.c", |
| 1173 | 1161 | "musl/src/mq/mq_close.c", |
| 1174 | 1162 | "musl/src/mq/mq_getattr.c", |
| ... | ... | @@ -1304,7 +1292,6 @@ const src_files = [_][]const u8{ |
| 1304 | 1292 | "musl/src/process/execle.c", |
| 1305 | 1293 | "musl/src/process/execlp.c", |
| 1306 | 1294 | "musl/src/process/execv.c", |
| 1307 | "musl/src/process/execve.c", | |
| 1308 | 1295 | "musl/src/process/execvp.c", |
| 1309 | 1296 | "musl/src/process/fexecve.c", |
| 1310 | 1297 | "musl/src/process/fork.c", |
| ... | ... | @@ -1871,51 +1858,26 @@ const src_files = [_][]const u8{ |
| 1871 | 1858 | "musl/src/time/utime.c", |
| 1872 | 1859 | "musl/src/time/wcsftime.c", |
| 1873 | 1860 | "musl/src/time/__year_to_secs.c", |
| 1874 | "musl/src/unistd/access.c", | |
| 1875 | "musl/src/unistd/acct.c", | |
| 1876 | 1861 | "musl/src/unistd/alarm.c", |
| 1877 | "musl/src/unistd/chdir.c", | |
| 1878 | "musl/src/unistd/chown.c", | |
| 1879 | 1862 | "musl/src/unistd/close.c", |
| 1880 | "musl/src/unistd/ctermid.c", | |
| 1881 | 1863 | "musl/src/unistd/dup2.c", |
| 1882 | 1864 | "musl/src/unistd/dup3.c", |
| 1883 | "musl/src/unistd/dup.c", | |
| 1884 | "musl/src/unistd/_exit.c", | |
| 1885 | 1865 | "musl/src/unistd/faccessat.c", |
| 1886 | 1866 | "musl/src/unistd/fchdir.c", |
| 1887 | "musl/src/unistd/fchownat.c", | |
| 1888 | 1867 | "musl/src/unistd/fchown.c", |
| 1889 | 1868 | "musl/src/unistd/fdatasync.c", |
| 1890 | 1869 | "musl/src/unistd/fsync.c", |
| 1891 | 1870 | "musl/src/unistd/ftruncate.c", |
| 1892 | 1871 | "musl/src/unistd/getcwd.c", |
| 1893 | "musl/src/unistd/getegid.c", | |
| 1894 | "musl/src/unistd/geteuid.c", | |
| 1895 | "musl/src/unistd/getgid.c", | |
| 1896 | "musl/src/unistd/getgroups.c", | |
| 1897 | 1872 | "musl/src/unistd/gethostname.c", |
| 1898 | 1873 | "musl/src/unistd/getlogin.c", |
| 1899 | 1874 | "musl/src/unistd/getlogin_r.c", |
| 1900 | "musl/src/unistd/getpgid.c", | |
| 1901 | "musl/src/unistd/getpgrp.c", | |
| 1902 | "musl/src/unistd/getpid.c", | |
| 1903 | "musl/src/unistd/getppid.c", | |
| 1904 | "musl/src/unistd/getsid.c", | |
| 1905 | "musl/src/unistd/getuid.c", | |
| 1906 | 1875 | "musl/src/unistd/isatty.c", |
| 1907 | "musl/src/unistd/lchown.c", | |
| 1908 | "musl/src/unistd/linkat.c", | |
| 1909 | "musl/src/unistd/link.c", | |
| 1910 | 1876 | "musl/src/unistd/lseek.c", |
| 1911 | "musl/src/unistd/mips64/pipe.s", | |
| 1912 | 1877 | "musl/src/unistd/mipsn32/lseek.c", |
| 1913 | "musl/src/unistd/mipsn32/pipe.s", | |
| 1914 | "musl/src/unistd/mips/pipe.s", | |
| 1915 | 1878 | "musl/src/unistd/nice.c", |
| 1916 | 1879 | "musl/src/unistd/pause.c", |
| 1917 | 1880 | "musl/src/unistd/pipe2.c", |
| 1918 | "musl/src/unistd/pipe.c", | |
| 1919 | 1881 | "musl/src/unistd/posix_close.c", |
| 1920 | 1882 | "musl/src/unistd/pread.c", |
| 1921 | 1883 | "musl/src/unistd/preadv.c", |
| ... | ... | @@ -1925,13 +1887,9 @@ const src_files = [_][]const u8{ |
| 1925 | 1887 | "musl/src/unistd/readlinkat.c", |
| 1926 | 1888 | "musl/src/unistd/readlink.c", |
| 1927 | 1889 | "musl/src/unistd/readv.c", |
| 1928 | "musl/src/unistd/renameat.c", | |
| 1929 | "musl/src/unistd/rmdir.c", | |
| 1930 | 1890 | "musl/src/unistd/setegid.c", |
| 1931 | 1891 | "musl/src/unistd/seteuid.c", |
| 1932 | 1892 | "musl/src/unistd/setgid.c", |
| 1933 | "musl/src/unistd/setpgid.c", | |
| 1934 | "musl/src/unistd/setpgrp.c", | |
| 1935 | 1893 | "musl/src/unistd/setregid.c", |
| 1936 | 1894 | "musl/src/unistd/setresgid.c", |
| 1937 | 1895 | "musl/src/unistd/setresuid.c", |
| ... | ... | @@ -1940,17 +1898,12 @@ const src_files = [_][]const u8{ |
| 1940 | 1898 | "musl/src/unistd/setuid.c", |
| 1941 | 1899 | "musl/src/unistd/setxid.c", |
| 1942 | 1900 | "musl/src/unistd/sleep.c", |
| 1943 | "musl/src/unistd/symlinkat.c", | |
| 1944 | "musl/src/unistd/symlink.c", | |
| 1945 | "musl/src/unistd/sync.c", | |
| 1946 | 1901 | "musl/src/unistd/tcgetpgrp.c", |
| 1947 | 1902 | "musl/src/unistd/tcsetpgrp.c", |
| 1948 | 1903 | "musl/src/unistd/truncate.c", |
| 1949 | 1904 | "musl/src/unistd/ttyname.c", |
| 1950 | 1905 | "musl/src/unistd/ttyname_r.c", |
| 1951 | 1906 | "musl/src/unistd/ualarm.c", |
| 1952 | "musl/src/unistd/unlinkat.c", | |
| 1953 | "musl/src/unistd/unlink.c", | |
| 1954 | 1907 | "musl/src/unistd/usleep.c", |
| 1955 | 1908 | "musl/src/unistd/write.c", |
| 1956 | 1909 | "musl/src/unistd/writev.c", |