From: Sascha Wildner Date: Sun, 8 Sep 2019 10:28:54 +0000 (+0200) Subject: : Add a macro to control ISO/IEC TR 24731-1 visibility. X-Git-Tag: v5.8.0rc1~1004 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/2470bb8060915f5afafb687ac351aa705889fafe : Add a macro to control ISO/IEC TR 24731-1 visibility. The __STDC_WANT_LIB_EXT1__ macro controls visibility for code that wants to use it. In addition, visibility is enabled for our default environment that exposes everything. Taken-from: FreeBSD --- diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index e750dff990..fea444908a 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -661,24 +661,38 @@ #define __XSI_VISIBLE 0 #define __BSD_VISIBLE 0 #define __ISO_C_VISIBLE 1990 +#define __EXT1_VISIBLE 0 #elif defined(_C99_SOURCE) /* Localism to specify strict C99 env. */ #define __POSIX_VISIBLE 0 #define __XSI_VISIBLE 0 #define __BSD_VISIBLE 0 #define __ISO_C_VISIBLE 1999 +#define __EXT1_VISIBLE 0 #elif defined(_C11_SOURCE) /* Localism to specify strict C11 env. */ #define __POSIX_VISIBLE 0 #define __XSI_VISIBLE 0 #define __BSD_VISIBLE 0 #define __ISO_C_VISIBLE 2011 +#define __EXT1_VISIBLE 0 #else /* Default environment: show everything. */ #define __POSIX_VISIBLE 200809 #define __XSI_VISIBLE 700 #define __BSD_VISIBLE 1 #define __ISO_C_VISIBLE 2011 +#define __EXT1_VISIBLE 1 #endif #endif +/* User override __EXT1_VISIBLE */ +#if defined(__STDC_WANT_LIB_EXT1__) +#undef __EXT1_VISIBLE +#if __STDC_WANT_LIB_EXT1__ +#define __EXT1_VISIBLE 1 +#else +#define __EXT1_VISIBLE 0 +#endif +#endif /* __STDC_WANT_LIB_EXT1__ */ + /* * GLOBL macro exists to preserve __start_set_* and __stop_set_* sections * of kernel modules which are discarded from binutils 2.17.50+ otherwise.