diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2022-03-12 22:43:10 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2022-03-12 22:43:10 -0500 |
commit | 64426f1a89450a0f79b723a4d966f7f9c7492c60 (patch) | |
tree | aeb9b990a501e5cc44e05fe26179b4c470b3a592 | |
parent | 8ad8838d21a133fb8a48e1e88001ca3aed9baf9d (diff) | |
download | bfs-64426f1a89450a0f79b723a4d966f7f9c7492c60.tar.xz |
Don't shadow standard headers
@italic on the AUR stated that bfs from the AUR fails to build on
Manjaro. From the build log, it seems like <time.h> doesn't get
included properly. I assume it's picking up ./time.h instead.
I couldn't reproduce the build issue in the default configuration, but
it does fail with EXTRA_CFLAGS="-I." which isn't good. So rename
everything with an x prefix to stop clashing.
Link: https://aur.archlinux.org/packages/bfs#comment-856102
Link: https://paste.rs/eqR
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | eval.c | 4 | ||||
-rw-r--r-- | exec.c | 2 | ||||
-rw-r--r-- | expr.h | 2 | ||||
-rw-r--r-- | main.c | 6 | ||||
-rw-r--r-- | parse.c | 6 | ||||
-rw-r--r-- | printf.c | 2 | ||||
-rw-r--r-- | tests/xtimegm.c | 2 | ||||
-rw-r--r-- | util.c | 2 | ||||
-rw-r--r-- | xregex.c (renamed from regex.c) | 2 | ||||
-rw-r--r-- | xregex.h (renamed from regex.h) | 0 | ||||
-rw-r--r-- | xspawn.c (renamed from spawn.c) | 2 | ||||
-rw-r--r-- | xspawn.h (renamed from spawn.h) | 0 | ||||
-rw-r--r-- | xtime.c (renamed from time.c) | 2 | ||||
-rw-r--r-- | xtime.h (renamed from time.h) | 0 |
15 files changed, 21 insertions, 21 deletions
@@ -217,17 +217,17 @@ bfs: \ parse.o \ printf.o \ pwcache.o \ - regex.o \ - spawn.o \ stat.o \ - time.o \ trie.o \ typo.o \ - util.o + util.o \ + xregex.o \ + xspawn.o \ + xtime.o tests/mksock: tests/mksock.o tests/trie: trie.o tests/trie.o -tests/xtimegm: time.o tests/xtimegm.o +tests/xtimegm: xtime.o tests/xtimegm.o $(BIN_GOALS): +$(CC) $(ALL_LDFLAGS) $^ $(ALL_LDLIBS) -o $@ @@ -34,10 +34,10 @@ #include "printf.h" #include "pwcache.h" #include "stat.h" -#include "time.h" #include "trie.h" #include "util.h" -#include "regex.h" +#include "xregex.h" +#include "xtime.h" #include <assert.h> #include <errno.h> #include <fcntl.h> @@ -20,8 +20,8 @@ #include "color.h" #include "diag.h" #include "dstring.h" -#include "spawn.h" #include "util.h" +#include "xspawn.h" #include <assert.h> #include <errno.h> #include <fcntl.h> @@ -25,8 +25,8 @@ #include "eval.h" #include "exec.h" #include "printf.h" -#include "regex.h" #include "stat.h" +#include "xregex.h" #include <stdbool.h> #include <stddef.h> #include <sys/types.h> @@ -43,13 +43,13 @@ * - fsade.[ch] (a facade over non-standard filesystem features) * - mtab.[ch] (parses the system's mount table) * - pwcache.[ch] (a cache for the user/group tables) - * - regex.[ch] (regular expression support) - * - spawn.[ch] (spawns processes) * - stat.[ch] (wraps stat(), or statx() on Linux) - * - time.[ch] (date/time handling utilities) * - trie.[ch] (a trie set/map implementation) * - typo.[ch] (fuzzy matching for typos) * - util.[ch] (everything else) + * - xregex.[ch] (regular expression support) + * - xspawn.[ch] (spawns processes) + * - xtime.[ch] (date/time handling utilities) */ #include "ctx.h" @@ -36,12 +36,12 @@ #include "opt.h" #include "printf.h" #include "pwcache.h" -#include "spawn.h" #include "stat.h" -#include "time.h" #include "typo.h" #include "util.h" -#include "regex.h" +#include "xregex.h" +#include "xspawn.h" +#include "xtime.h" #include <assert.h> #include <errno.h> #include <fcntl.h> @@ -24,8 +24,8 @@ #include "mtab.h" #include "pwcache.h" #include "stat.h" -#include "time.h" #include "util.h" +#include "xtime.h" #include <assert.h> #include <errno.h> #include <grp.h> diff --git a/tests/xtimegm.c b/tests/xtimegm.c index 2788dee..f4e28ee 100644 --- a/tests/xtimegm.c +++ b/tests/xtimegm.c @@ -14,7 +14,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ****************************************************************************/ -#include "../time.h" +#include "../xtime.h" #include <stdbool.h> #include <stdint.h> #include <stdio.h> @@ -16,7 +16,7 @@ #include "util.h" #include "dstring.h" -#include "regex.h" +#include "xregex.h" #include <assert.h> #include <errno.h> #include <fcntl.h> @@ -14,7 +14,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ****************************************************************************/ -#include "regex.h" +#include "xregex.h" #include "util.h" #include <assert.h> #include <errno.h> @@ -14,7 +14,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ****************************************************************************/ -#include "spawn.h" +#include "xspawn.h" #include "util.h" #include <errno.h> #include <fcntl.h> @@ -14,7 +14,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ****************************************************************************/ -#include "time.h" +#include "xtime.h" #include <errno.h> #include <limits.h> #include <stdbool.h> |