path: root/src/stat/stat.c
AgeCommit message (Collapse)AuthorLines
2019-10-28disable lfs64 aliases for remapped time64 functionsRich Felker-0/+2
these functions cannot provide the glibc lfs64-ABI-compatible symbols when time_t differs from what it was in that ABI. instead, the aliases need to be provided by the time32 compat shims or through some other mechanism.
2019-07-18cleanup includes now that stat, lstat no longer make direct syscallsRich Felker-1/+0
2019-07-18refactor all stat functions in terms of fstatatRich Felker-5/+1
equivalent logic for fstat+O_PATH fallback and direct use of stat/lstat syscalls where appropriate is kept, now in the fstatat function. this change both improves functionality (now, fstatat forms equivalent to fstat/lstat/stat will work even on kernels too old to have the at functions) and localizes direct interfacing with the kernel stat structure to one file.
2018-09-12remove spurious inclusion of libc.h for LFS64 ABI aliasesRich Felker-2/+1
the LFS64 macro was not self-documenting and barely saved any characters. simply use weak_alias directly so that it's clear what's being done, and doesn't depend on a header to provide a strange macro.
2014-05-29support linux kernel apis (new archs) with old syscalls removedRich Felker-0/+5
such archs are expected to omit definitions of the SYS_* macros for syscalls their kernels lack from arch/$ARCH/bits/syscall.h. the preprocessor is then able to select the an appropriate implementation for affected functions. two basic strategies are used on a case-by-case basis: where the old syscalls correspond to deprecated library-level functions, the deprecated functions have been converted to wrappers for the modern function, and the modern function has fallback code (omitted at the preprocessor level on new archs) to make use of the old syscalls if the new syscall fails with ENOSYS. this also improves functionality on older kernels and eliminates the incentive to program with deprecated library-level functions for the sake of compatibility with older kernels. in other situations where the old syscalls correspond to library-level functions which are not deprecated but merely lack some new features, such as the *at functions, the old syscalls are still used on archs which support them. this may change at some point in the future if or when fallback code is added to the new functions to make them usable (possibly with reduced functionality) on old kernels.
2012-09-06use restrict everywhere it's required by c99 and/or posix 2008Rich Felker-1/+1
to deal with the fact that the public headers may be used with pre-c99 compilers, __restrict is used in place of restrict, and defined appropriately for any supported compiler. we also avoid the form [restrict] since older versions of gcc rejected it due to a bug in the original c99 standard, and instead use the form *restrict.
2011-03-20global cleanup to use the new syscall interfaceRich Felker-1/+1
2011-02-15finish moving 32-bit-specific junk out of source files.Rich Felker-1/+1
2011-02-12initial check-in, version 0.5.0v0.5.0Rich Felker-0/+10