add stdc-predef.h for library-level predefined macros

modern compilers (for gcc, versions 4.8 and later) automatically
pre-include <stdc-predef.h> to obtain the values of certain predefined
macros specified by ISO C but which reflect properties of the library
implementation, not just the compiler. provide values indicating that
wchar_t is Unicode-encoded and that Annex F (IEEE floating point) is
supported unless the compiler indicates otherwise.

based on patch by Masanori Ogino.
This commit is contained in:
Rich Felker 2016-07-03 20:03:30 -04:00
parent 0c8bc102f2
commit 0f47367751
1 changed files with 10 additions and 0 deletions

10
include/stdc-predef.h Normal file
View File

@ -0,0 +1,10 @@
#ifndef _STDC_PREDEF_H
#define _STDC_PREDEF_H
#define __STDC_ISO_10646__ 201206L
#if !defined(__GCC_IEC_559) || __GCC_IEC_559 > 0
#define __STDC_IEC_559__ 1
#endif
#endif