diff options
Diffstat (limited to 'src/prelude.h')
-rw-r--r-- | src/prelude.h | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/src/prelude.h b/src/prelude.h index ddeacbd..3521fe8 100644 --- a/src/prelude.h +++ b/src/prelude.h @@ -16,7 +16,8 @@ #define C17 201710L #define C23 202311L -#include <stddef.h> +// Get the static_assert() definition as well as __GLIBC__ +#include <assert.h> #if __STDC_VERSION__ < C23 # include <stdalign.h> @@ -127,21 +128,6 @@ extern const char bfs_version[]; # define __has_attribute(attr) false #endif -// Platform detection - -// Get the definition of BSD if available -#if BFS_USE_SYS_PARAM_H -# include <sys/param.h> -#endif - -#ifndef __GLIBC_PREREQ -# define __GLIBC_PREREQ(maj, min) false -#endif - -#ifndef __NetBSD_Prereq__ -# define __NetBSD_Prereq__(maj, min, patch) false -#endif - // Fundamental utilities /** @@ -168,21 +154,6 @@ extern const char bfs_version[]; #endif /** - * Polyfill max_align_t if we don't already have it. - */ -#if !BFS_HAS_MAX_ALIGN_T -typedef union { -# ifdef __BIGGEST_ALIGNMENT__ - alignas(__BIGGEST_ALIGNMENT__) char c; -# else - long double ld; - long long ll; - void *ptr; -# endif -} max_align_t; -#endif - -/** * Alignment specifier that avoids false sharing. */ #define cache_align alignas(FALSE_SHARING_SIZE) |