summaryrefslogtreecommitdiffstats
path: root/src/bit.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-11-10 09:58:57 -0500
committerTavian Barnes <tavianator@tavianator.com>2023-11-10 09:58:57 -0500
commit4efbe8eca395c90fc0053c7ba1038ccb7bf69e61 (patch)
tree28cb2bc0052df4b3926d72a9da9df8c4ce59258f /src/bit.h
parente25261a90222de75781726a93ab809c660208afd (diff)
downloadbfs-4efbe8eca395c90fc0053c7ba1038ccb7bf69e61.tar.xz
config: Add constants for C standard versions
Diffstat (limited to 'src/bit.h')
-rw-r--r--src/bit.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bit.h b/src/bit.h
index 3f756f6..21a8076 100644
--- a/src/bit.h
+++ b/src/bit.h
@@ -12,7 +12,7 @@
#include <limits.h>
#include <stdint.h>
-#if __STDC_VERSION__ >= 202311L
+#if __STDC_VERSION__ >= C23
# include <stdbit.h>
#endif
@@ -173,7 +173,7 @@
# define ENDIAN_NATIVE 0
#endif
-#if __STDC_VERSION__ >= 202311L
+#if __STDC_VERSION__ >= C23
# define bswap16 stdc_memreverse8u16
# define bswap32 stdc_memreverse8u32
# define bswap64 stdc_memreverse8u64
@@ -236,7 +236,7 @@ static inline uint8_t bswap8(uint8_t n) {
// C23 polyfill: bit utilities
-#if __STDC_VERSION__ >= 202311L
+#if __STDC_VERSION__ >= C23
# define count_ones stdc_count_ones
# define count_zeros stdc_count_zeros
# define rotate_left stdc_rotate_left
@@ -395,6 +395,6 @@ UINT_OVERLOADS(BIT_CEIL)
#define bit_floor(n) UINT_SELECT(n, bit_floor)(n)
#define bit_ceil(n) UINT_SELECT(n, bit_ceil)(n)
-#endif // __STDC_VERSION__ < 202311L
+#endif // __STDC_VERSION__ < C23
#endif // BFS_BIT_H