Page MenuHomeFreeBSD

D29902.id87919.diff
No OneTemporary

D29902.id87919.diff

Index: sys/sys/cdefs.h
===================================================================
--- sys/sys/cdefs.h
+++ sys/sys/cdefs.h
@@ -718,6 +718,19 @@
#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. It's not clear that doing this automatically, but defining
+ * _ISOC11_SOURCE is both compatible with glibc, and easy enough to do to enable
+ * this relatively standard extension to POSIX that's not yet been standardized.
+ * The POSIX-1.2018 standard allows enabling additional interfaces when certain
+ * Feature Test Macros are defined, so define C11 interfaces when _ISOC11_SOURCE
+ * is defined.
+ */
+#if _ISOC11_SOURCE
+#undef __ISO_C_VISIBLE
+#define __ISO_C_VISIBLE 2011
+#endif
#else
/*-
* Deal with _ANSI_SOURCE:

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 27, 12:29 AM (12 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15609484
Default Alt Text
D29902.id87919.diff (878 B)

Event Timeline