Page MenuHomeFreeBSD

D29902.id88644.diff
No OneTemporary

D29902.id88644.diff

Index: sys/sys/cdefs.h
===================================================================
--- sys/sys/cdefs.h
+++ sys/sys/cdefs.h
@@ -718,6 +718,18 @@
#define __POSIX_VISIBLE 198808
#define __ISO_C_VISIBLE 0
#endif /* _POSIX_C_SOURCE */
+/*
+ * glibc enables c11 features when _ISOC11_SOURCE is defined, or when compiling
+ * with -stdc=c11. OpenBSD does explicitly as well for both as well. A strict
+ * reading of the standard would suggest doing it only for the former. However,
+ * a strict reading also requires C99 mode only, so C11 is already undefined.
+ * To be maximially useful, we follow glibc's and OpenBSD's lead for this
+ * non-standard configuration.
+ */
+#if _ISOC11_SOURCE || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L)
+#undef __ISO_C_VISIBLE
+#define __ISO_C_VISIBLE 2011
+#endif
#else
/*-
* Deal with _ANSI_SOURCE:

File Metadata

Mime Type
text/plain
Expires
Mon, Feb 9, 7:24 AM (4 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28552859
Default Alt Text
D29902.id88644.diff (864 B)

Event Timeline