diff --git a/float.h b/float.h index e677f18..b8887ed 100644 --- a/float.h +++ b/float.h @@ -1,6 +1,10 @@ #if !defined(_FLOAT_H) || defined(__LIBC_GUARDLESS_INCLUDE) +#if !defined(__LIBC_GUARDLESS_INCLUDE) +#define _FLOAT_H 1 +#endif -#ifndef _FLOAT_H +#ifndef __FLOAT_H_MACROS +#define __FLOAT_H_MACROS 1 #define FLT_ROUNDS 1 @@ -52,8 +56,4 @@ #endif -#if !defined(__LIBC_GUARDLESS_INCLUDE) -#define _FLOAT_H 1 -#endif - #endif diff --git a/limits.h b/limits.h index b8ae625..0ef495a 100644 --- a/limits.h +++ b/limits.h @@ -1,6 +1,10 @@ #if !defined(_LIMITS_H) || defined(__LIBC_GUARDLESS_INCLUDE) +#if !defined(__LIBC_GUARDLESS_INCLUDE) +#define _LIMITS_H 1 +#endif -#ifndef _LIMITS_H +#ifndef __LIMITS_H_MACROS +#define __LIMITS_H_MACROS 1 #ifndef __LIBC_C_JOIN # define __LIBC_C_EXPAND_JOIN(x, suffix) x ## suffix @@ -46,8 +50,4 @@ #endif -#if !defined(__LIBC_GUARDLESS_INCLUDE) -#define _LIMITS_H 1 -#endif - #endif diff --git a/stdalign.h b/stdalign.h index 72ab984..abdea0c 100644 --- a/stdalign.h +++ b/stdalign.h @@ -1,6 +1,10 @@ #if !defined(_STDALIGN_H) || defined(__LIBC_GUARDLESS_INCLUDE) +#if !defined(__LIBC_GUARDLESS_INCLUDE) +#define _STDALIGN_H 1 +#endif -#ifndef _STDALIGN_H +#ifndef __STDALIGN_H_MACROS +#define __STDALIGN_H_MACROS 1 #ifndef __cplusplus # define alignas _Alignas @@ -13,8 +17,4 @@ #endif -#if !defined(__LIBC_GUARDLESS_INCLUDE) -#define _STDALIGN_H 1 -#endif - #endif diff --git a/stdarg.h b/stdarg.h index cbc064d..e26da00 100644 --- a/stdarg.h +++ b/stdarg.h @@ -1,8 +1,12 @@ #if !defined(_STDARG_H) || defined(__LIBC_GUARDLESS_INCLUDE) +#if !defined(__LIBC_GUARDLESS_INCLUDE) +#define _STDARG_H 1 +#endif typedef __builtin_va_list va_list; -#ifndef _STDARG_H +#ifndef __STDARG_H_MACROS +#define __STDARG_H_MACROS 1 #define va_start(v, l) __builtin_va_start(v, l) #define va_end(v) __builtin_va_end(v) @@ -11,8 +15,4 @@ typedef __builtin_va_list va_list; #endif -#if !defined(__LIBC_GUARDLESS_INCLUDE) -#define _STDARG_H 1 -#endif - #endif diff --git a/stdbool.h b/stdbool.h index 1878fd3..365536c 100644 --- a/stdbool.h +++ b/stdbool.h @@ -1,4 +1,10 @@ #if !defined(_STDBOOL_H) || defined(__LIBC_GUARDLESS_INCLUDE) +#if !defined(__LIBC_GUARDLESS_INCLUDE) +#define _STDBOOL_H 1 +#endif + +#ifndef __STDBOOL_H_MACROS +#define __STDBOOL_H_MACROS 1 #ifndef __cplusplus # define bool _Bool @@ -7,14 +13,8 @@ # define false 0 #endif -#ifndef _STDBOOL_H - #define __bool_true_false_are_defined 1 #endif -#if !defined(__LIBC_GUARDLESS_INCLUDE) -#define _STDBOOL_H 1 -#endif - #endif diff --git a/stddef.h b/stddef.h index 9fe871e..e087eaa 100644 --- a/stddef.h +++ b/stddef.h @@ -1,4 +1,7 @@ #if !defined(_STDDEF_H) || defined(__LIBC_GUARDLESS_INCLUDE) +#if !defined(__LIBC_GUARDLESS_INCLUDE) +#define _STDDEF_H 1 +#endif typedef __SIZE_TYPE__ size_t; typedef __PTRDIFF_TYPE__ ptrdiff_t; @@ -13,7 +16,8 @@ typedef decltype(nullptr) nullptr_t; enum class byte : unsigned char {}; #endif -#ifndef _STDDEF_H +#ifndef __STDDEF_H_MACROS +#define __STDDEF_H_MACROS 1 #ifdef NULL #undef NULL @@ -29,8 +33,4 @@ enum class byte : unsigned char {}; #endif -#if !defined(__LIBC_GUARDLESS_INCLUDE) -#define _STDDEF_H 1 -#endif - #endif diff --git a/stdint.h b/stdint.h index 3050992..6b993a3 100644 --- a/stdint.h +++ b/stdint.h @@ -1,4 +1,7 @@ #if !defined(_STDINT_H) || defined(__LIBC_GUARDLESS_INCLUDE) +#if !defined(__LIBC_GUARDLESS_INCLUDE) +#define _STDINT_H 1 +#endif typedef __UINT8_TYPE__ uint8_t; typedef __UINT16_TYPE__ uint16_t; @@ -36,7 +39,8 @@ typedef __INTPTR_TYPE__ intptr_t; typedef __UINTMAX_TYPE__ uintmax_t; typedef __INTMAX_TYPE__ intmax_t; -#ifndef _STDINT_H +#ifndef __STDINT_H_MACROS +#define __STDINT_H_MACROS 1 /* Clang and GCC have different mechanisms for INT32_C and friends. */ #ifdef __clang__ @@ -139,8 +143,4 @@ typedef __INTMAX_TYPE__ intmax_t; #endif -#if !defined(__LIBC_GUARDLESS_INCLUDE) -#define _STDINT_H 1 -#endif - #endif