zig/lib/std
Meili C 0f17cbfc6a fix: allow std.linux.getgroups to accept null
looking at `man getgroups` and `info getgroups` this is given as an
example:

  ```c
       // Here's how to use ‘getgroups’ to read all the supplementary group
       // IDs:

            gid_t *
            read_all_groups (void)
            {
              int ngroups = getgroups (0, NULL);
              gid_t *groups
                = (gid_t *) xmalloc (ngroups * sizeof (gid_t));
              int val = getgroups (ngroups, groups);
              if (val < 0)
                {
                  free (groups);
                  return NULL;
                }
              return groups;
            }
  ```

getgroups(0, NULL) is used to get the count of groups so that the
correct count can be used to allocate a list of gid_t. This small changes makes this
possible.

equivalent example in Zig after the change:

  ```zig
    // get the group count
    const ngroups: usize = std.os.linux.getgroups(0, null);
    if (ngroups <= 0) {
        return error.GetGroupsError;
    }

    std.debug.print("number of groups: {d}\n", .{ngroups});
    const groups_gids: []u32 = try alloc.alloc(u32, ngroups);

    // populate an array of gid_t
    _ = std.os.linux.getgroups(ngroups, @ptrCast(groups_gids));
  ```
2024-12-22 21:48:47 +01:00
..
Build std.Build: add API to create Compile steps from existing module 2024-12-18 01:48:54 +05:00
c add m4 {pro,max} detection 2024-12-16 20:56:29 -05:00
compress Rewrite bit_reader and bit_writer to take advantage of current zig semantics and enhance readability (#21689) 2024-10-13 18:44:42 -07:00
crypto argon2: bail out if m < 8p (#22232) 2024-12-14 19:26:55 +00:00
debug defaultPanic: @trap on 'other' target 2024-11-29 15:30:05 -05:00
dwarf Dwarf: include comptime-only values in debug info 2024-12-16 17:25:52 -05:00
fmt
fs std.os.windows: Map PIPE_NOT_AVAILABLE from OpenFile() to error.NoDevice (#21938) 2024-11-27 22:33:29 +01:00
hash correct the hint in XxHash3 2024-12-15 03:40:20 -08:00
heap Fix index calculation in WasmPageAllocator 2024-10-12 22:53:02 +02:00
http std.http.Client: change ssl key log creation permission bits 2024-11-07 20:56:33 -05:00
io Rewrite bit_reader and bit_writer to take advantage of current zig semantics and enhance readability (#21689) 2024-10-13 18:44:42 -07:00
json
math Add branchHint to std.math.pow 2024-12-18 05:30:08 -05:00
mem Allocator.free: document zero-length behavior 2024-11-24 18:19:11 -05:00
meta
net
os fix: allow std.linux.getgroups to accept null 2024-12-22 21:48:47 +01:00
posix std.posix: Skip Stat struct comparison in fstatat test for s390x-linux. 2024-10-04 00:26:55 +02:00
process std.os.windows: Map PIPE_NOT_AVAILABLE from OpenFile() to error.NoDevice (#21938) 2024-11-27 22:33:29 +01:00
Random
sort
tar Remove old deprecated symbols in std (#21584) 2024-10-04 13:50:25 -07:00
Target Merge pull request #22067 from alexrp/pie-tests 2024-11-28 14:07:28 +01:00
testing
Thread std.Thread.Futex: Mark inline asm volatile in WasmImpl. 2024-11-27 23:24:37 +01:00
time
tz
unicode
valgrind std.valgrind: Fix some compile errors. 2024-11-04 10:56:32 +01:00
zig compiler: disallow callconv etc from depending on function parameters 2024-12-18 23:06:35 +00:00
zip
array_hash_map.zig std.ArrayHashMap fix eql documentation 2024-12-11 15:21:56 -05:00
array_list.zig compiler: remove anonymous struct types, unify all tuples 2024-10-31 20:42:53 +00:00
ascii.zig Updated ascii.zig's isWhitespace function to use switch instead of for loop. (#22094) 2024-11-29 12:26:23 -08:00
atomic.zig std.atomic: add a function to get the cache line size for a particular cpu (#21956) 2024-11-13 05:35:05 +01:00
base64.zig
bit_set.zig
BitStack.zig
bounded_array.zig
buf_map.zig
buf_set.zig
Build.zig std.Build: add API to create Compile steps from existing module 2024-12-18 01:48:54 +05:00
builtin.zig compiler: Improve the handling of unwind table levels. 2024-12-11 00:10:15 +01:00
c.zig Also export mach_timebase_info_data from darwin 2024-12-14 03:16:34 +01:00
coff.zig
compress.zig
crypto.zig Reinstantiates AEGIS-MAC with the final construction (#22205) 2024-12-11 18:52:43 +01:00
debug.zig defaultPanic: @trap on 'other' target 2024-11-29 15:30:05 -05:00
dwarf.zig
dynamic_library.zig std.dynamic_library: update to new elf API 2024-10-12 10:44:17 -07:00
elf.zig link.Elf: eliminate an O(N^2) algorithm in flush() 2024-10-12 10:44:17 -07:00
enums.zig
fifo.zig
fmt.zig std: Disable some vector-related tests on armeb. 2024-12-13 03:13:14 +01:00
fs.zig fix compilation errors for fs and fs.Dir (#21643) 2024-10-17 01:08:58 +02:00
gpu.zig std.gpu: add instanceIndex 2024-11-01 02:04:27 +03:30
hash.zig std.hash.int: avoid words like "easy" and "fast" in doc comments 2024-11-24 15:30:52 -08:00
hash_map.zig hashmap: remove inline from getIndex now that we have @branchHint 2024-12-15 17:20:08 -08:00
heap.zig Remove old deprecated symbols in std (#21584) 2024-10-04 13:50:25 -07:00
http.zig
io.zig std.io.Poller: handle EPIPE as EOF 2024-11-25 14:18:55 -08:00
json.zig
leb128.zig
linked_list.zig
log.zig
macho.zig
math.zig
mem.zig std.mem: adjust semantics 2024-11-22 15:30:07 -08:00
meta.zig std.meta.eql: use == directly when comparing packed structs (#21982) 2024-11-24 14:29:44 -08:00
multi_array_list.zig compiler: allow files with AstGen errors to undergo semantic analysis 2024-12-05 19:58:38 +00:00
net.zig
once.zig
os.zig
pdb.zig
posix.zig std.Build.Cache.hit: work around macOS kernel bug 2024-12-11 11:56:44 -08:00
priority_dequeue.zig
priority_queue.zig
process.zig
Progress.zig std.Progress: fix data race 2024-10-23 13:47:44 -07:00
Random.zig add branchHint to std.Random.float 2024-12-13 13:24:38 +01:00
RingBuffer.zig
segmented_list.zig
SemanticVersion.zig compiler: remove anonymous struct types, unify all tuples 2024-10-31 20:42:53 +00:00
simd.zig std: Disable some vector-related tests on armeb. 2024-12-13 03:13:14 +01:00
sort.zig std.equalRange: Compute lower and upper bounds simultaneously 2024-09-23 13:03:06 -07:00
start.zig start: Extend DWARF unwinding protection to more architectures. 2024-12-11 00:10:17 +01:00
static_string_map.zig
std.zig std.crypto.tls: improve debuggability of encrypted connections 2024-11-07 20:25:26 -05:00
tar.zig Remove old deprecated symbols in std (#21584) 2024-10-04 13:50:25 -07:00
Target.zig std.Target: Remove special case for wasm in Abi.default(). 2024-12-15 11:57:19 +01:00
testing.zig std.testing.expectError: fix error names 2024-11-12 14:35:14 +02:00
Thread.zig std.os.windows: Fix some incorrect callconv specifiers. 2024-11-02 10:44:18 +01:00
time.zig move std.time.sleep to std.Thread.sleep 2024-09-26 12:35:14 -07:00
treap.zig
tz.zig
unicode.zig
Uri.zig
valgrind.zig std.valgrind: Port doClientRequest() to all archs supported by Valgrind. 2024-11-04 12:39:48 +01:00
wasm.zig
zig.zig compiler: introduce ZonGen and make ast-check run it for ZON inputs 2024-12-16 17:02:35 +00:00
zip.zig