diff options
author | Alexander Pyhalov <apyhalov@gmail.com> | 2019-01-15 07:26:33 +0300 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2019-01-17 21:16:47 -0500 |
commit | 50971960b7b1866cdd785b20a4df98c90c231638 (patch) | |
tree | f28d58574d41fb0c5986a4c9197292a1a2464cdb /usr/src/head | |
parent | 7c9ce9e029489432cc8d45437d8ecd0b9750d68d (diff) | |
download | illumos-gate-50971960b7b1866cdd785b20a4df98c90c231638.tar.gz |
10224 memset_s() is not visible in global C++ namespace
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/head')
-rw-r--r-- | usr/src/head/iso/stdlib_c11.h | 14 | ||||
-rw-r--r-- | usr/src/head/iso/string_iso.h | 18 |
2 files changed, 24 insertions, 8 deletions
diff --git a/usr/src/head/iso/stdlib_c11.h b/usr/src/head/iso/stdlib_c11.h index 5648ca4083..fe3a1e98b1 100644 --- a/usr/src/head/iso/stdlib_c11.h +++ b/usr/src/head/iso/stdlib_c11.h @@ -65,6 +65,16 @@ extern int at_quick_exit(void (*)(void)); extern _NORETURN_KYWD void quick_exit(int); #endif /* !_STRICT_SYMBOLS || _STDC_C11 || __cplusplus >= 201103L */ +#if __cplusplus >= 199711L +} +#endif + +/* + * ISO C11 Annex K functions are not allowed to be in the standard + * namespace; however, it is implementation-defined as to whether or + * not they are in the global namespace and we opt to make them + * available to software. + */ #if __EXT1_VISIBLE #ifndef _ERRNO_T_DEFINED @@ -85,10 +95,6 @@ extern void ignore_handler_s(const char *_RESTRICT_KYWD, void *_RESTRICT_KYWD, errno_t); #endif /* __EXT1_VISIBLE */ -#if __cplusplus >= 199711L -} -#endif - #ifdef __cplusplus } #endif diff --git a/usr/src/head/iso/string_iso.h b/usr/src/head/iso/string_iso.h index d493e13008..6c068101f1 100644 --- a/usr/src/head/iso/string_iso.h +++ b/usr/src/head/iso/string_iso.h @@ -143,12 +143,26 @@ extern char *strrchr(const char *, int); extern char *strstr(const char *, const char *); #endif /* __cplusplus >= 199711L */ +#if __cplusplus >= 199711L +} +#endif /* end of namespace std */ + +/* + * ISO C11 Annex K functions are not allowed to be in the standard + * namespace; however, it is implementation-defined as to whether or + * not they are in the global namespace and we opt to make them + * available to software. + */ #if __EXT1_VISIBLE #ifndef _RSIZE_T_DEFINED #define _RSIZE_T_DEFINED +#if __cplusplus >= 199711L +typedef std::size_t rsize_t; +#else typedef size_t rsize_t; #endif +#endif #ifndef _ERRNO_T_DEFINED #define _ERRNO_T_DEFINED @@ -159,10 +173,6 @@ typedef int errno_t; extern errno_t memset_s(void *, rsize_t, int, rsize_t); #endif /* __EXT1_VISIBLE */ -#if __cplusplus >= 199711L -} -#endif /* end of namespace std */ - #ifdef __cplusplus } #endif |