diff --git a/libc/include/features.h b/libc/include/features.h index cce373ab..b1cf7c87 100644 --- a/libc/include/features.h +++ b/libc/include/features.h @@ -115,6 +115,14 @@ #define __HAS_RESTRICT 2 #endif +/* Provide the full in all system components. */ +#if __is_sortix_system_component +#undef __STDC_CONSTANT_MACROS +#undef __STDC_LIMIT_MACROS +#define __STDC_CONSTANT_MACROS +#define __STDC_LIMIT_MACROS +#endif + /* TODO: Improve these declarations, perhaps like they are in glibc. */ /*#define __POSIX_NO_OBSOLETE*/ diff --git a/libc/include/stdint.h b/libc/include/stdint.h index 7c690b1d..08554b77 100644 --- a/libc/include/stdint.h +++ b/libc/include/stdint.h @@ -31,8 +31,7 @@ __BEGIN_DECLS /* Only define these constant macros in C++ if requested. */ -#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) || \ - defined(__is_sortix_libc) || defined(__is_sortix_kernel) /* TODO: HACK! */ +#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) #define INT8_C(c) __INT8_C(c) #define INT16_C(c) __INT16_C(c) @@ -50,8 +49,7 @@ __BEGIN_DECLS #endif /* Only define these limit macros in C++ if requested. */ -#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) || \ - defined(__is_sortix_libc) || defined(__is_sortix_kernel) /* TODO: HACK! */ +#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) #define INT8_MIN __INT8_MIN #define INT16_MIN __INT16_MIN