1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
/*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied this
* source. A copy of the CDDL is also available via the Internet at
* http://www.illumos.org/license/CDDL.
*/
/*
* Copyright 2016 Joyent, Inc.
*/
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other illumos headers.
*
* The contents of this header is limited to identifiers specified in
* the C11 standard and in conflict with the C++ implementation of the
* standard header. The C++ standard may adopt the C11 standard at
* which point it is expected that the symbols included here will
* become part of the C++ std namespace.
*/
#ifndef _ISO_STDLIB_C11_H
#define _ISO_STDLIB_C11_H
#include <sys/feature_tests.h>
#ifdef __cplusplus
extern "C" {
#endif
#if __cplusplus >= 199711L
namespace std {
#endif
/*
* The following have been added as a result of the ISO/IEC 9899:2011
* standard. For a strictly conforming C application, visibility is
* contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
* For non-strictly conforming C applications, there are no restrictions
* on the C namespace.
*/
/*
* Work around fix-includes and other bad actors with using multiple headers.
*/
#if !defined(_NORETURN_KYWD)
#if __STDC_VERSION__ - 0 >= 201112L
#define _NORETURN_KYWD _Noreturn
#else
#define _NORETURN_KYWD
#endif /* __STDC_VERSION__ - 0 >= 201112L */
#endif /* !defined(_NORETURN_KYWD) */
#if !defined(_STRICT_SYMBOLS) || defined(_STDC_C11)
extern void *aligned_alloc(size_t, size_t);
#endif /* !_STRICT_SYMBOLS || _STDC_C11 */
#if !defined(_STRICT_SYMBOLS) || defined(_STDC_C11) || __cplusplus >= 201103L
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
#define _ERRNO_T_DEFINED
typedef int errno_t;
#endif
/* K.3.6 */
typedef void (*constraint_handler_t)(const char *_RESTRICT_KYWD,
void *_RESTRICT_KYWD, errno_t);
/* K.3.6.1.1 */
extern constraint_handler_t set_constraint_handler_s(constraint_handler_t);
/* K.3.6.1.2 */
extern _NORETURN_KYWD void abort_handler_s(const char *_RESTRICT_KYWD,
void *_RESTRICT_KYWD, errno_t);
/* K3.6.1.3 */
extern void ignore_handler_s(const char *_RESTRICT_KYWD, void *_RESTRICT_KYWD,
errno_t);
#endif /* __EXT1_VISIBLE */
#ifdef __cplusplus
}
#endif
#endif /* _ISO_STDLIB_C11_H */
|