mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
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.
This commit is contained in:
parent
c365df495e
commit
dcdbb3613c
1 changed files with 5 additions and 1 deletions
6
char32.c
6
char32.c
|
|
@ -6,8 +6,12 @@
|
|||
|
||||
#include <wctype.h>
|
||||
#include <wchar.h>
|
||||
#include <stdc-predef.h>
|
||||
|
||||
#if defined __has_include
|
||||
#if __has_include (<stdc-predef.h>)
|
||||
#include <stdc-predef.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define LOG_MODULE "char32"
|
||||
#define LOG_ENABLE_DBG 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue