mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-07 06:14:33 +00:00
also start prefering NtDll API. so far: * NtQueryInformationFile * NtClose adds a performance workaround for windows unicode conversion. but that should probably be removed before merging
15 lines
305 B
C
Vendored
15 lines
305 B
C
Vendored
#include <sys/auxv.h>
|
|
#include <errno.h>
|
|
#include "libc.h"
|
|
|
|
unsigned long __getauxval(unsigned long item)
|
|
{
|
|
size_t *auxv = libc.auxv;
|
|
if (item == AT_SECURE) return libc.secure;
|
|
for (; *auxv; auxv+=2)
|
|
if (*auxv==item) return auxv[1];
|
|
errno = ENOENT;
|
|
return 0;
|
|
}
|
|
|
|
weak_alias(__getauxval, getauxval);
|