From dcdbb3613ce66483161e032050c3bed55e7d16b1 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 19 Mar 2022 19:52:21 +0100 Subject: char32: only include stdc-predef.h if it is available Use the (relatively new) macro __has_include() to check if stdc-predef.h exists, and only include it if it does. If stdc-predef.h does not exist, or if the compiler does not implement __has_include(), stdc-predef.h is *not* included. --- char32.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/char32.c b/char32.c index 6bd90e36..e25db3f1 100644 --- a/char32.c +++ b/char32.c @@ -6,8 +6,12 @@ #include #include -#include +#if defined __has_include + #if __has_include () + #include + #endif +#endif #define LOG_MODULE "char32" #define LOG_ENABLE_DBG 0 -- cgit v1.3