summaryrefslogtreecommitdiffstats
path: root/util.c
Commit message (Collapse)AuthorAgeFilesLines
* Check for <sys/param.h> before including itTavian Barnes2018-11-081-3/+7
| | | | Fixes #38.
* util: Provide fallback implementations of makedev()/major()/minor()Tavian Barnes2018-11-021-0/+14
|
* util: Wrap __has_include()Tavian Barnes2018-11-011-1/+1
|
* Print device major/minor numbers for -lsTavian Barnes2018-11-011-0/+16
|
* Update copyright datesTavian Barnes2018-09-241-1/+1
|
* util: Preserve errno in pipe_cloexec()Tavian Barnes2018-07-241-0/+2
|
* util: macOS doesn't have pipe2()Tavian Barnes2018-07-241-1/+2
| | | | | | | The code was testing for BSD, since all the normal BSDs have it. But until recently, <sys/param.h> wasn't included, so BSD was undefined even on platforms that define it. Now that it is defined appropriately, exclude macOS specifically.
* stat: New wrapper around the stat() familyTavian Barnes2018-01-081-11/+0
| | | | | This lets bfs transparently support the new statx() system call on Linux, giving it access to file birth times.
* exec: Recover from E2BIGTavian Barnes2017-11-121-0/+18
|
* util: Wrap faccessat() to fix some portability issuesTavian Barnes2017-09-201-0/+14
|
* util: Factor out checks for nonexistent paths/broken linksTavian Barnes2017-09-061-1/+5
|
* Avoid multiple extra stat()s of broken symlinks for -xtypeTavian Barnes2017-08-221-5/+5
|
* Unify broken symlink handlingTavian Barnes2017-08-121-0/+11
| | | | | | | | | Rather than open-code the fallback logic for broken symlinks everywhere it's needed, introduce a new xfstatat() utility function that performs the fallback automatically. Using xfstatat() consistently fixes a few bugs, including cases where broken symlinks are given as arguments to predicates like -samefile.
* Re-license under the BSD Zero Clause LicenseTavian Barnes2017-07-271-10/+15
|
* main: Call setlocale() at startup to use the system localeTavian Barnes2017-07-201-0/+10
|
* Handle yes/no prompts correctly according to the localeTavian Barnes2017-07-151-0/+72
|
* Release 1.01.0Tavian Barnes2017-04-241-1/+1
|
* Move bftw_typeflag converters to util.cTavian Barnes2017-04-081-1/+98
|
* Color link targets for -lsTavian Barnes2017-03-161-0/+15
| | | | Fixes #18.
* Implement -ls and -flsTavian Barnes2017-03-111-0/+85
|
* Don't trust st_size when reading symlinksTavian Barnes2017-01-311-0/+30
| | | | | Linux /proc, for example, reports a st_size of 0 for everything. It's nice to be able to use -lname on them anyway.
* Implement -regex, -iregex, and -regextype/-ETavian Barnes2016-12-181-0/+11
|
* Move portability code into util.hTavian Barnes2016-12-041-0/+18
|
* Check for readdir() errors everywhere.Tavian Barnes2016-11-141-0/+10
|
* Redirect stdin from /dev/null for -ok and -okdir.Tavian Barnes2016-11-131-0/+50