5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /* Copyright (c) 1988 AT&T */
23 /* All Rights Reserved */
24
25
26 /*
27 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
28 * Use is subject to license terms.
29 */
30
31 /*
32 * An application should not include this header directly. Instead it
33 * should be included only through the inclusion of other Sun headers.
34 *
35 * The contents of this header is limited to identifiers specified in the
36 * C Standard. Any new identifiers specified in future amendments to the
37 * C Standard must be placed in this header. If these new identifiers
38 * are required to also be in the C++ Standard "std" namespace, then for
39 * anything other than macro definitions, corresponding "using" directives
40 * must also be added to <setjmp.h>.
41 */
42
43 #ifndef _ISO_SETJMP_ISO_H
44 #define _ISO_SETJMP_ISO_H
45
46 #include <sys/feature_tests.h>
70 #define _SIGJBLEN 19 /* ABI value */
71 #else
72 #error "ISA not supported"
73 #endif
74
75 #if __cplusplus >= 199711L
76 namespace std {
77 #endif
78
79 #if defined(__i386) || defined(__amd64) || \
80 defined(__sparc) || defined(__sparcv9)
81 #if defined(_LP64) || defined(_I32LPx)
82 typedef long jmp_buf[_JBLEN];
83 #else
84 typedef int jmp_buf[_JBLEN];
85 #endif
86 #else
87 #error "ISA not supported"
88 #endif
89
90 #if defined(__STDC__)
91
92 extern int setjmp(jmp_buf) __RETURNS_TWICE;
93 #pragma unknown_control_flow(setjmp)
94 extern int _setjmp(jmp_buf) __RETURNS_TWICE;
95 #pragma unknown_control_flow(_setjmp)
96 extern void longjmp(jmp_buf, int) __NORETURN;
97 extern void _longjmp(jmp_buf, int) __NORETURN;
98
99 #else
100
101 extern int setjmp() __RETURNS_TWICE;
102 #pragma unknown_control_flow(setjmp)
103 extern int _setjmp() __RETURNS_TWICE;
104 #pragma unknown_control_flow(_setjmp)
105 extern void longjmp();
106 extern void _longjmp();
107
108 #endif /* __STDC__ */
109
110 #if __cplusplus >= 199711L
111 }
112 #endif /* end of namespace std */
113
114 #if __cplusplus >= 199711L
115 using std::setjmp;
116 #endif
117
118 #if defined(_STRICT_STDC) || __cplusplus >= 199711L
119 #define setjmp(env) setjmp(env)
120 #endif
121
122 #endif /* _JBLEN */
123
124 #ifdef __cplusplus
125 }
126 #endif
127
128 #endif /* _ISO_SETJMP_ISO_H */
|
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /* Copyright (c) 1988 AT&T */
23 /* All Rights Reserved */
24
25 /*
26 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
27 *
28 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
29 * Use is subject to license terms.
30 */
31
32 /*
33 * An application should not include this header directly. Instead it
34 * should be included only through the inclusion of other Sun headers.
35 *
36 * The contents of this header is limited to identifiers specified in the
37 * C Standard. Any new identifiers specified in future amendments to the
38 * C Standard must be placed in this header. If these new identifiers
39 * are required to also be in the C++ Standard "std" namespace, then for
40 * anything other than macro definitions, corresponding "using" directives
41 * must also be added to <setjmp.h>.
42 */
43
44 #ifndef _ISO_SETJMP_ISO_H
45 #define _ISO_SETJMP_ISO_H
46
47 #include <sys/feature_tests.h>
71 #define _SIGJBLEN 19 /* ABI value */
72 #else
73 #error "ISA not supported"
74 #endif
75
76 #if __cplusplus >= 199711L
77 namespace std {
78 #endif
79
80 #if defined(__i386) || defined(__amd64) || \
81 defined(__sparc) || defined(__sparcv9)
82 #if defined(_LP64) || defined(_I32LPx)
83 typedef long jmp_buf[_JBLEN];
84 #else
85 typedef int jmp_buf[_JBLEN];
86 #endif
87 #else
88 #error "ISA not supported"
89 #endif
90
91 extern int setjmp(jmp_buf) __RETURNS_TWICE;
92 #pragma unknown_control_flow(setjmp)
93 extern int _setjmp(jmp_buf) __RETURNS_TWICE;
94 #pragma unknown_control_flow(_setjmp)
95 extern void longjmp(jmp_buf, int) __NORETURN;
96 extern void _longjmp(jmp_buf, int) __NORETURN;
97
98 #if __cplusplus >= 199711L
99 }
100 #endif /* end of namespace std */
101
102 #if __cplusplus >= 199711L
103 using std::setjmp;
104 #endif
105
106 #if defined(_STRICT_STDC) || __cplusplus >= 199711L
107 #define setjmp(env) setjmp(env)
108 #endif
109
110 #endif /* _JBLEN */
111
112 #ifdef __cplusplus
113 }
114 #endif
115
116 #endif /* _ISO_SETJMP_ISO_H */
|