mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-23 20:35:42 +02: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
4daa3d9904
commit
3ff1c95208
1 changed files with 6 additions and 1 deletions
7
char32.c
7
char32.c
|
@ -5,7 +5,12 @@
|
|||
#include <assert.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
Reference in a new issue