authorgravatar for reokodoku@lyboc.dns.navyreokodoku <reokodoku@lyboc.dns.navy> 2024-05-02 18:58:49+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-05-22 06:57:16-07:00
logf2110b0c0d225eba414ee235519d790c5c2922d7
tree63a43e1a8aa09eb1c7924faa08dda36e79380902
parent7ce03acb9db361a2313ec4fb8477a2536530bede

Change `std.os` to `std.posix` in error messages


1 files changed, 4 insertions(+), 4 deletions(-)

lib/std/posix.zig+4-4
......@@ -717,7 +717,7 @@ pub fn raise(sig: u8) RaiseError!void {
717717 }
718718 }
719719
720 @compileError("std.os.raise unimplemented for this target");
720 @compileError("std.posix.raise unimplemented for this target");
721721}
722722
723723pub const KillError = error{ ProcessNotFound, PermissionDenied } || UnexpectedError;
......@@ -1932,7 +1932,7 @@ pub fn execvpeZ(
19321932/// See also `getenvZ`.
19331933pub fn getenv(key: []const u8) ?[:0]const u8 {
19341934 if (native_os == .windows) {
1935 @compileError("std.os.getenv is unavailable for Windows because environment strings are in WTF-16 format. See std.process.getEnvVarOwned for a cross-platform API or std.process.getenvW for a Windows-specific API.");
1935 @compileError("std.posix.getenv is unavailable for Windows because environment strings are in WTF-16 format. See std.process.getEnvVarOwned for a cross-platform API or std.process.getenvW for a Windows-specific API.");
19361936 }
19371937 if (builtin.link_libc) {
19381938 var ptr = std.c.environ;
......@@ -1948,7 +1948,7 @@ pub fn getenv(key: []const u8) ?[:0]const u8 {
19481948 return null;
19491949 }
19501950 if (native_os == .wasi) {
1951 @compileError("std.os.getenv is unavailable for WASI. See std.process.getEnvMap or std.process.getEnvVarOwned for a cross-platform API.");
1951 @compileError("std.posix.getenv is unavailable for WASI. See std.process.getEnvMap or std.process.getEnvVarOwned for a cross-platform API.");
19521952 }
19531953 // The simplified start logic doesn't populate environ.
19541954 if (std.start.simplified_logic) return null;
......@@ -1972,7 +1972,7 @@ pub fn getenvZ(key: [*:0]const u8) ?[:0]const u8 {
19721972 return mem.sliceTo(value, 0);
19731973 }
19741974 if (native_os == .windows) {
1975 @compileError("std.os.getenvZ is unavailable for Windows because environment string is in WTF-16 format. See std.process.getEnvVarOwned for cross-platform API or std.process.getenvW for Windows-specific API.");
1975 @compileError("std.posix.getenvZ is unavailable for Windows because environment string is in WTF-16 format. See std.process.getEnvVarOwned for cross-platform API or std.process.getenvW for Windows-specific API.");
19761976 }
19771977 return getenv(mem.sliceTo(key, 0));
19781978}