authorgravatar for reokodoku@lyboc.dns.navyreokodoku <reokodoku@lyboc.dns.navy> 2024-05-02 18:58:49+02:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2024-05-03 07:49:03+03:00
log8ea4283d83a23b2956a1894eeb64793335de82b9
tree86352fe672628e3f27d8653701af7b9c9423ede4
parent20b9b54e6b276c993f723f5aa3fafea72409a4fe

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 {...@@ -717,7 +717,7 @@ pub fn raise(sig: u8) RaiseError!void {
717 }717 }
718 }718 }
719719
720 @compileError("std.os.raise unimplemented for this target");720 @compileError("std.posix.raise unimplemented for this target");
721}721}
722722
723pub const KillError = error{ ProcessNotFound, PermissionDenied } || UnexpectedError;723pub const KillError = error{ ProcessNotFound, PermissionDenied } || UnexpectedError;
...@@ -1932,7 +1932,7 @@ pub fn execvpeZ(...@@ -1932,7 +1932,7 @@ pub fn execvpeZ(
1932/// See also `getenvZ`.1932/// See also `getenvZ`.
1933pub fn getenv(key: []const u8) ?[:0]const u8 {1933pub fn getenv(key: []const u8) ?[:0]const u8 {
1934 if (native_os == .windows) {1934 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.");
1936 }1936 }
1937 if (builtin.link_libc) {1937 if (builtin.link_libc) {
1938 var ptr = std.c.environ;1938 var ptr = std.c.environ;
...@@ -1948,7 +1948,7 @@ pub fn getenv(key: []const u8) ?[:0]const u8 {...@@ -1948,7 +1948,7 @@ pub fn getenv(key: []const u8) ?[:0]const u8 {
1948 return null;1948 return null;
1949 }1949 }
1950 if (native_os == .wasi) {1950 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.");
1952 }1952 }
1953 // The simplified start logic doesn't populate environ.1953 // The simplified start logic doesn't populate environ.
1954 if (std.start.simplified_logic) return null;1954 if (std.start.simplified_logic) return null;
...@@ -1972,7 +1972,7 @@ pub fn getenvZ(key: [*:0]const u8) ?[:0]const u8 {...@@ -1972,7 +1972,7 @@ pub fn getenvZ(key: [*:0]const u8) ?[:0]const u8 {
1972 return mem.sliceTo(value, 0);1972 return mem.sliceTo(value, 0);
1973 }1973 }
1974 if (native_os == .windows) {1974 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.");
1976 }1976 }
1977 return getenv(mem.sliceTo(key, 0));1977 return getenv(mem.sliceTo(key, 0));
1978}1978}