summaryrefslogtreecommitdiffstats
path: root/src/prelude.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/prelude.h')
-rw-r--r--src/prelude.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/prelude.h b/src/prelude.h
index 9aaec04..59fa645 100644
--- a/src/prelude.h
+++ b/src/prelude.h
@@ -19,10 +19,24 @@
// Get the static_assert() definition as well as __GLIBC__
#include <assert.h>
+// Get the convenience macros that became standard spellings in C23
#if __STDC_VERSION__ < C23
-# include <stdalign.h>
-# include <stdbool.h>
-#endif
+
+/** _Alignas(), _Alignof() => alignas(), alignof() */
+#include <stdalign.h>
+/** _Bool => bool, true, false */
+#include <stdbool.h>
+
+/**
+ * C23 deprecates `noreturn void` in favour of `[[noreturn]] void`, so we expose
+ * _noreturn instead with the other attributes.
+ */
+// #include <stdnoreturn.h>
+
+/** Part of <threads.h>, but we don't use anything else from it. */
+#define thread_local _Thread_local
+
+#endif // !C23
// bfs packaging configuration