summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-05-11 10:12:35 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-05-11 13:14:04 -0400
commit59f87eed2b930af2f31fd1d1fb2589f80f426ee0 (patch)
tree1563b95fab7fb09da5f629704315785ec0a60e64
parent87d8d5928325f951f40b5f87292a17586b85943b (diff)
downloadbfs-59f87eed2b930af2f31fd1d1fb2589f80f426ee0.tar.xz
config: Provide <stdalign.h> and <stdbool.h>
In anticipation of C23, since those headers won't be necessary any more.
-rw-r--r--src/bfstd.c1
-rw-r--r--src/bfstd.h2
-rw-r--r--src/bftw.c1
-rw-r--r--src/color.c1
-rw-r--r--src/color.h1
-rw-r--r--src/config.h6
-rw-r--r--src/ctx.h2
-rw-r--r--src/diag.h1
-rw-r--r--src/dir.c2
-rw-r--r--src/eval.h2
-rw-r--r--src/exec.c1
-rw-r--r--src/expr.h2
-rw-r--r--src/fsade.h1
-rw-r--r--src/main.c2
-rw-r--r--src/mtab.c1
-rw-r--r--src/mtab.h2
-rw-r--r--src/opt.c1
-rw-r--r--src/parse.c1
-rw-r--r--src/printf.c1
-rw-r--r--src/pwcache.c2
-rw-r--r--src/stat.c1
-rw-r--r--src/trie.c1
-rw-r--r--src/trie.h1
-rw-r--r--src/xspawn.c1
-rw-r--r--src/xtime.c2
-rw-r--r--tests/xtimegm.c2
-rw-r--r--tests/xtouch.c2
27 files changed, 15 insertions, 28 deletions
diff --git a/src/bfstd.c b/src/bfstd.c
index 1dc322b..932f2c4 100644
--- a/src/bfstd.c
+++ b/src/bfstd.c
@@ -9,7 +9,6 @@
#include <fcntl.h>
#include <langinfo.h>
#include <nl_types.h>
-#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/bfstd.h b/src/bfstd.h
index 028e4e6..e4fd1f1 100644
--- a/src/bfstd.h
+++ b/src/bfstd.h
@@ -8,7 +8,7 @@
#ifndef BFS_BFSTD_H
#define BFS_BFSTD_H
-#include <stdbool.h>
+#include "config.h"
#include <stddef.h>
// #include <errno.h>
diff --git a/src/bftw.c b/src/bftw.c
index 56701a7..14805de 100644
--- a/src/bftw.c
+++ b/src/bftw.c
@@ -28,7 +28,6 @@
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
-#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
diff --git a/src/color.c b/src/color.c
index 589e631..eeadf98 100644
--- a/src/color.c
+++ b/src/color.c
@@ -15,7 +15,6 @@
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
-#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/color.h b/src/color.h
index 737c34b..3db2b07 100644
--- a/src/color.h
+++ b/src/color.h
@@ -10,7 +10,6 @@
#include "config.h"
#include <stdarg.h>
-#include <stdbool.h>
#include <stdio.h>
/**
diff --git a/src/config.h b/src/config.h
index 229bafb..4408feb 100644
--- a/src/config.h
+++ b/src/config.h
@@ -8,9 +8,13 @@
#ifndef BFS_CONFIG_H
#define BFS_CONFIG_H
-#include <stdbool.h>
#include <stddef.h>
+#if __STDC_VERSION__ < 202311L
+# include <stdalign.h>
+# include <stdbool.h>
+#endif
+
// bfs packaging configuration
#ifndef BFS_COMMAND
diff --git a/src/ctx.h b/src/ctx.h
index 4c748b7..0dc9f08 100644
--- a/src/ctx.h
+++ b/src/ctx.h
@@ -9,8 +9,8 @@
#define BFS_CTX_H
#include "bftw.h"
+#include "config.h"
#include "trie.h"
-#include <stdbool.h>
#include <stddef.h>
#include <sys/resource.h>
#include <time.h>
diff --git a/src/diag.h b/src/diag.h
index 2952e30..987d4b4 100644
--- a/src/diag.h
+++ b/src/diag.h
@@ -11,7 +11,6 @@
#include "ctx.h"
#include "config.h"
#include <stdarg.h>
-#include <stdbool.h>
struct bfs_expr;
diff --git a/src/dir.c b/src/dir.c
index eb6e3e0..30db5df 100644
--- a/src/dir.c
+++ b/src/dir.c
@@ -8,8 +8,6 @@
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
-#include <stdalign.h>
-#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
diff --git a/src/eval.h b/src/eval.h
index 3d70319..bdb9440 100644
--- a/src/eval.h
+++ b/src/eval.h
@@ -9,7 +9,7 @@
#ifndef BFS_EVAL_H
#define BFS_EVAL_H
-#include <stdbool.h>
+#include "config.h"
struct bfs_ctx;
struct bfs_expr;
diff --git a/src/exec.c b/src/exec.c
index 6bde1c1..7f22d36 100644
--- a/src/exec.c
+++ b/src/exec.c
@@ -14,7 +14,6 @@
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
-#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/expr.h b/src/expr.h
index 1628cac..356689d 100644
--- a/src/expr.h
+++ b/src/expr.h
@@ -9,9 +9,9 @@
#define BFS_EXPR_H
#include "color.h"
+#include "config.h"
#include "eval.h"
#include "stat.h"
-#include <stdbool.h>
#include <stddef.h>
#include <sys/types.h>
#include <time.h>
diff --git a/src/fsade.h b/src/fsade.h
index 557da26..0d9ecaf 100644
--- a/src/fsade.h
+++ b/src/fsade.h
@@ -10,7 +10,6 @@
#define BFS_FSADE_H
#include "config.h"
-#include <stdbool.h>
#define BFS_CAN_CHECK_ACL BFS_USE_SYS_ACL_H
diff --git a/src/main.c b/src/main.c
index 4f99580..24a5035 100644
--- a/src/main.c
+++ b/src/main.c
@@ -40,13 +40,13 @@
*/
#include "bfstd.h"
+#include "config.h"
#include "ctx.h"
#include "eval.h"
#include "parse.h"
#include <errno.h>
#include <fcntl.h>
#include <locale.h>
-#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
diff --git a/src/mtab.c b/src/mtab.c
index 27f1743..1d1ad94 100644
--- a/src/mtab.c
+++ b/src/mtab.c
@@ -9,7 +9,6 @@
#include "trie.h"
#include <errno.h>
#include <fcntl.h>
-#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
diff --git a/src/mtab.h b/src/mtab.h
index 5dfdf6c..ca4372c 100644
--- a/src/mtab.h
+++ b/src/mtab.h
@@ -8,7 +8,7 @@
#ifndef BFS_MTAB_H
#define BFS_MTAB_H
-#include <stdbool.h>
+#include "config.h"
struct bfs_stat;
diff --git a/src/opt.c b/src/opt.c
index 731dd10..4ce9425 100644
--- a/src/opt.c
+++ b/src/opt.c
@@ -39,7 +39,6 @@
#include <errno.h>
#include <limits.h>
#include <stdarg.h>
-#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
diff --git a/src/parse.c b/src/parse.c
index 15f38a4..55f1e74 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -37,7 +37,6 @@
#include <limits.h>
#include <pwd.h>
#include <stdarg.h>
-#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/printf.c b/src/printf.c
index 454fbee..9ccc216 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -20,7 +20,6 @@
#include <errno.h>
#include <grp.h>
#include <pwd.h>
-#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/src/pwcache.c b/src/pwcache.c
index 5026dee..f52e4e1 100644
--- a/src/pwcache.c
+++ b/src/pwcache.c
@@ -2,12 +2,12 @@
// SPDX-License-Identifier: 0BSD
#include "pwcache.h"
+#include "config.h"
#include "darray.h"
#include "trie.h"
#include <errno.h>
#include <grp.h>
#include <pwd.h>
-#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
diff --git a/src/stat.c b/src/stat.c
index f3d9046..7973d71 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -7,7 +7,6 @@
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
-#include <stdbool.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/src/trie.c b/src/trie.c
index bfe97e6..e0e00ff 100644
--- a/src/trie.c
+++ b/src/trie.c
@@ -86,7 +86,6 @@
#include "list.h"
#include <assert.h>
#include <limits.h>
-#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/trie.h b/src/trie.h
index 58974aa..6bd211e 100644
--- a/src/trie.h
+++ b/src/trie.h
@@ -5,7 +5,6 @@
#define BFS_TRIE_H
#include "config.h"
-#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
diff --git a/src/xspawn.c b/src/xspawn.c
index a6d18a3..00fb76e 100644
--- a/src/xspawn.c
+++ b/src/xspawn.c
@@ -7,7 +7,6 @@
#include "list.h"
#include <errno.h>
#include <fcntl.h>
-#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <sys/resource.h>
diff --git a/src/xtime.c b/src/xtime.c
index 82690d0..406d694 100644
--- a/src/xtime.c
+++ b/src/xtime.c
@@ -2,9 +2,9 @@
// SPDX-License-Identifier: 0BSD
#include "xtime.h"
+#include "config.h"
#include <errno.h>
#include <limits.h>
-#include <stdbool.h>
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
diff --git a/tests/xtimegm.c b/tests/xtimegm.c
index bab64ba..b2479b7 100644
--- a/tests/xtimegm.c
+++ b/tests/xtimegm.c
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: 0BSD
#include "../src/xtime.h"
-#include <stdbool.h>
+#include "../src/config.h"
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/tests/xtouch.c b/tests/xtouch.c
index 7e29547..50416ba 100644
--- a/tests/xtouch.c
+++ b/tests/xtouch.c
@@ -2,10 +2,10 @@
// SPDX-License-Identifier: 0BSD
#include "../src/bfstd.h"
+#include "../src/config.h"
#include "../src/xtime.h"
#include <errno.h>
#include <fcntl.h>
-#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>