| ... | @@ -218,9 +218,13 @@ pub const socket_t = if (builtin.os.tag == .windows) windows.ws2_32.SOCKET else | ... | @@ -218,9 +218,13 @@ pub const socket_t = if (builtin.os.tag == .windows) windows.ws2_32.SOCKET else |
| 218 | pub var environ: [][*:0]u8 = undefined; | 218 | pub var environ: [][*:0]u8 = undefined; |
| 219 | | 219 | |
| 220 | /// Populated by startup code before main(). | 220 | /// Populated by startup code before main(). |
| 221 | /// Not available on Windows. See `std.process.args` | 221 | /// Not available on WASI or Windows without libc. See `std.process.argsAlloc` |
| 222 | /// for obtaining the process arguments. | 222 | /// or `std.process.argsWithAllocator` for a cross-platform alternative. |
| 223 | pub var argv: [][*:0]u8 = undefined; | 223 | pub var argv: [][*:0]u8 = if (builtin.link_libc) undefined else switch (builtin.os.tag) { |
| | 224 | .windows => @compileError("argv isn't supported on Windows: use std.process.argsAlloc instead"), |
| | 225 | .wasi => @compileError("argv isn't supported on WASI: use std.process.argsAlloc instead"), |
| | 226 | else => undefined, |
| | 227 | }; |
| 224 | | 228 | |
| 225 | /// To obtain errno, call this function with the return value of the | 229 | /// To obtain errno, call this function with the return value of the |
| 226 | /// system function call. For some systems this will obtain the value directly | 230 | /// system function call. For some systems this will obtain the value directly |