| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This replaces the explicit CPPFLAGS list in flags.mk with just
`-include src/prelude.h`, shortening our compiler command lines and
allowing them to be easily documented.
|
| |
|
|
|
|
| |
clock_gettime() is available everywhere by now.
|
|
|
|
|
| |
Some platforms define AT_FDCWD to a constant like 0xFFFAFDCD that gets
typed as an unsigned int.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
POSIX specifies[1] that
If a thread accesses tzname, daylight, or timezone directly while
another thread is in a call to tzset(), or to any function that is
required or allowed to set timezone information as if by calling
tzset(), the behavior is undefined.
So calling it lazily from arbitrary threads is risky.
[1]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/tzset.html
|
|
|
|
|
|
|
| |
We used to have is_nonexistence_error() to consistently treat ENOENT and
ENOTDIR the same. Recently, we started considering EFAULT the same as
ENAMETOOLONG on DragonFly BSD to work around a kernel bug. Unify both
of these behind a more generic interface.
|
|
|
|
|
|
|
|
|
| |
DragonFly's x86_64 assembly implementation of copyinstr() checks the
wrong pointer when deciding whether to return EFAULT or ENAMETOOLONG,
causing it to always return EFAULT for overlong paths. Work around it
by treating EFAULT the same as ENAMETOOLONG on DragonFly.
Link: https://twitter.com/tavianator/status/1742991411203485713
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
In anticipation of C23, since those headers won't be necessary any more.
|
| |
|
|
|
|
|
|
|
| |
And while I'm at it, remove years from copyright declarations.
Link: https://spdx.dev/about/
Link: https://daniel.haxx.se/blog/2023/01/08/copyright-without-years/
|
| |
|
| |
|
| |
|
|
POSIX touch(1) doesn't include the -h option, and indeed OpenBSD doesn't
implement it. Making our own utility also lets us add some handy
extensions like -p (create parents) and -M (set permissions).
|