summaryrefslogtreecommitdiff
path: root/usr/src/head/iso/string_iso.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/head/iso/string_iso.h')
-rw-r--r--usr/src/head/iso/string_iso.h18
1 files changed, 14 insertions, 4 deletions
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