Time To Get Rid Of errno
Time To Get Rid Of errno
Posted Sep 23, 2015 3:24 UTC (Wed) by vapier (guest, #15768)In reply to: Time To Get Rid Of errno by hrw
Parent article: Glibc wrappers for (nearly all) Linux system calls
as for the syscalls you quoted, there are other stat variants (stat64 and fstatat64 at least). there's really no guarantee your code will compile or run properly when you call the syscalls directly. C libraries provide stable APIs/ABIs, including emulating newer functionality when the kernel is old (e.g. the *at syscalls could be emulated in userspace when the kernel was too old by utilizing /proc/self/fd/, but you'd have to call glibc's fstatat and not the kernel's syscall(__NR_newfstatat)).