Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/cdefs.h
Show First 20 Lines • Show All 712 Lines • ▼ Show 20 Lines | |||||||||
#define __ISO_C_VISIBLE 1990 | #define __ISO_C_VISIBLE 1990 | ||||||||
#elif _POSIX_C_SOURCE >= 199009 | #elif _POSIX_C_SOURCE >= 199009 | ||||||||
#define __POSIX_VISIBLE 199009 | #define __POSIX_VISIBLE 199009 | ||||||||
#define __ISO_C_VISIBLE 1990 | #define __ISO_C_VISIBLE 1990 | ||||||||
#else | #else | ||||||||
#define __POSIX_VISIBLE 198808 | #define __POSIX_VISIBLE 198808 | ||||||||
#define __ISO_C_VISIBLE 0 | #define __ISO_C_VISIBLE 0 | ||||||||
#endif /* _POSIX_C_SOURCE */ | #endif /* _POSIX_C_SOURCE */ | ||||||||
/* | |||||||||
* glibc enables c11 features when _ISOC11_SOURCE is defined, or when compiling | |||||||||
* with -stdc=c11. It's not clear that doing this automatically is standard | |||||||||
olceUnsubmitted Not Done Inline Actions
olce: | |||||||||
* compliant. However, defining _ISOC11_SOURCE to enable is compatible with | |||||||||
Not Done Inline ActionsSome typos: olce: Some typos:
`complaint` => `compliant`
`definning` => `defining` | |||||||||
Not Done Inline Actions
arichardson: | |||||||||
* glibc; standards compliant; and easy enough to do to enable in a Makefile | |||||||||
Not Done Inline ActionsAlso: olce: Also:
`complaint` => `compliant` | |||||||||
Not Done Inline Actions
arichardson: | |||||||||
* when porting. We implement this glibc extension, though it has not yet been | |||||||||
Not Done Inline Actions
olce: | |||||||||
* standardized. The various POSIX-1 standard issues allow enabling additional | |||||||||
* interfaces only when certain feature test macros are defined, which is why | |||||||||
* it's not clear that doing so automatically when in C11 mode is correct, | |||||||||
* especially if that's the compiler default. | |||||||||
*/ | |||||||||
#if _ISOC11_SOURCE | |||||||||
#undef __ISO_C_VISIBLE | |||||||||
#define __ISO_C_VISIBLE 2011 | |||||||||
#endif | |||||||||
#else | #else | ||||||||
Not Done Inline Actionsglibc compatibility is good. What about _C99_SOURCE, used below in the _ANSI_SOURCE block? I could not relate it to any standard. Shouldn't it be taken into account as well? olce: glibc compatibility is good.
What about _C99_SOURCE, used below in the _ANSI_SOURCE block? I… | |||||||||
Not Done Inline ActionsSorry, obviously, I meant _C11_SOURCE. olce: Sorry, obviously, I meant `_C11_SOURCE`. | |||||||||
Not Done Inline ActionsIt's already handled below. It's the default. imp: It's already handled below. It's the default.
| |||||||||
Not Done Inline ActionsIt's not, because the case below is not parsed when _POSIX_C_SOURCE is defined. I was talking about _POSIX_C_SOURCE and _C11_SOURCE both defined. olce: It's not, because the case below is not parsed when _POSIX_C_SOURCE is defined. I was talking… | |||||||||
Done Inline Actions_C11_SOURCE is a private FreeBSD for the source tree only, and we don't need this there. imp: _C11_SOURCE is a private FreeBSD for the source tree only, and we don't need this there. | |||||||||
/*- | /*- | ||||||||
* Deal with _ANSI_SOURCE: | * Deal with _ANSI_SOURCE: | ||||||||
* If it is defined, and no other compilation environment is explicitly | * If it is defined, and no other compilation environment is explicitly | ||||||||
* requested, then define our internal feature-test macros to zero. This | * requested, then define our internal feature-test macros to zero. This | ||||||||
* makes no difference to the preprocessor (undefined symbols in preprocessing | * makes no difference to the preprocessor (undefined symbols in preprocessing | ||||||||
* expressions are defined to have value zero), but makes it more convenient for | * expressions are defined to have value zero), but makes it more convenient for | ||||||||
* a test program to print out the values. | * a test program to print out the values. | ||||||||
* | * | ||||||||
▲ Show 20 Lines • Show All 172 Lines • Show Last 20 Lines |