diff options
-rw-r--r-- | build/flags.mk | 1 | ||||
-rw-r--r-- | build/flags/Wundef-prefix.c | 9 | ||||
-rw-r--r-- | src/bfs.h | 5 | ||||
-rw-r--r-- | src/fsade.c | 7 |
4 files changed, 22 insertions, 0 deletions
diff --git a/build/flags.mk b/build/flags.mk index 1421ce6..2562e03 100644 --- a/build/flags.mk +++ b/build/flags.mk @@ -88,6 +88,7 @@ AUTO_FLAGS := \ gen/flags/Wshadow.mk \ gen/flags/Wsign-compare.mk \ gen/flags/Wstrict-prototypes.mk \ + gen/flags/Wundef-prefix.mk \ gen/flags/bind-now.mk \ gen/flags/deps.mk diff --git a/build/flags/Wundef-prefix.c b/build/flags/Wundef-prefix.c new file mode 100644 index 0000000..3eaf82b --- /dev/null +++ b/build/flags/Wundef-prefix.c @@ -0,0 +1,9 @@ +// Copyright © Tavian Barnes <tavianator@tavianator.com> +// SPDX-License-Identifier: 0BSD + +/// _CPPFLAGS += -Wundef-prefix=BFS_ +/// -Werror + +int main(void) { + return 0; +} @@ -33,10 +33,15 @@ #ifndef BFS_COMMAND # define BFS_COMMAND "bfs" #endif + #ifndef BFS_HOMEPAGE # define BFS_HOMEPAGE "https://tavianator.com/projects/bfs.html" #endif +#ifndef BFS_LINT +# define BFS_LINT false +#endif + // This is a symbol instead of a literal so we don't have to rebuild everything // when the version number changes extern const char bfs_version[]; diff --git a/src/fsade.c b/src/fsade.c index 30b3018..dfdf125 100644 --- a/src/fsade.c +++ b/src/fsade.c @@ -36,6 +36,13 @@ # define BFS_USE_XATTR true #endif +#ifndef BFS_USE_EXTATTR +# define BFS_USE_EXTATTR false +#endif +#ifndef BFS_USE_XATTR +# define BFS_USE_XATTR false +#endif + /** * Many of the APIs used here don't have *at() variants, but we can try to * emulate something similar if /proc/self/fd is available. |