Print this page
9553 C11 functions quick_exit and at_quick_exit should be visible in C++11.
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/head/iso/stdlib_c11.h
+++ new/usr/src/head/iso/stdlib_c11.h
1 1 /*
2 2 * This file and its contents are supplied under the terms of the
3 3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 4 * You may only use this file in accordance with the terms of version
5 5 * 1.0 of the CDDL.
6 6 *
7 7 * A full copy of the text of the CDDL should have accompanied this
8 8 * source. A copy of the CDDL is also available via the Internet at
9 9 * http://www.illumos.org/license/CDDL.
10 10 */
11 11
12 12 /*
13 13 * Copyright 2016 Joyent, Inc.
14 14 */
15 15
16 16 /*
17 17 * An application should not include this header directly. Instead it
18 18 * should be included only through the inclusion of other illumos headers.
19 19 *
20 20 * The contents of this header is limited to identifiers specified in
21 21 * the C11 standard and in conflict with the C++ implementation of the
22 22 * standard header. The C++ standard may adopt the C11 standard at
23 23 * which point it is expected that the symbols included here will
24 24 * become part of the C++ std namespace.
25 25 */
26 26
27 27 #ifndef _ISO_STDLIB_C11_H
28 28 #define _ISO_STDLIB_C11_H
29 29
30 30 #include <sys/feature_tests.h>
31 31
32 32 #ifdef __cplusplus
33 33 extern "C" {
34 34 #endif
35 35
36 36 #if __cplusplus >= 199711L
37 37 namespace std {
38 38 #endif
39 39
40 40 /*
41 41 * The following have been added as a result of the ISO/IEC 9899:2011
42 42 * standard. For a strictly conforming C application, visibility is
43 43 * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
44 44 * For non-strictly conforming C applications, there are no restrictions
45 45 * on the C namespace.
46 46 */
47 47
48 48 /*
49 49 * Work around fix-includes and other bad actors with using multiple headers.
50 50 */
↓ open down ↓ |
50 lines elided |
↑ open up ↑ |
51 51 #if !defined(_NORETURN_KYWD)
52 52 #if __STDC_VERSION__ - 0 >= 201112L
53 53 #define _NORETURN_KYWD _Noreturn
54 54 #else
55 55 #define _NORETURN_KYWD
56 56 #endif /* __STDC_VERSION__ - 0 >= 201112L */
57 57 #endif /* !defined(_NORETURN_KYWD) */
58 58
59 59 #if !defined(_STRICT_SYMBOLS) || defined(_STDC_C11)
60 60 extern void *aligned_alloc(size_t, size_t);
61 +#endif /* !_STRICT_SYMBOLS || _STDC_C11 */
62 +
63 +#if !defined(_STRICT_SYMBOLS) || defined(_STDC_C11) || __cplusplus >= 201103L
61 64 extern int at_quick_exit(void (*)(void));
62 65 extern _NORETURN_KYWD void quick_exit(int);
63 -#endif /* !_STRICT_SYMBOLS || _STDC_C11 */
66 +#endif /* !_STRICT_SYMBOLS || _STDC_C11 || __cplusplus >= 201103L */
64 67
65 68 #if __cplusplus >= 199711L
66 69 }
67 70 #endif
68 71
69 72 #ifdef __cplusplus
70 73 }
71 74 #endif
72 75
73 76 #endif /* _ISO_STDLIB_C11_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX