xref: /titanic_41/usr/src/head/iso/stdlib_c99.h (revision c138f478d2bc94e73ab8f6a084e323bec25e62f5)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
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 /*
23  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*
28  * An application should not include this header directly.  Instead it
29  * should be included only through the inclusion of other Sun headers.
30  *
31  * The contents of this header is limited to identifiers specified in
32  * the C99 standard and in conflict with the C++ implementation of the
33  * standard header.  The C++ standard may adopt the C99 standard at
34  * which point it is expected that the symbols included here will
35  * become part of the C++ std namespace.
36  */
37 
38 #ifndef _ISO_STDLIB_C99_H
39 #define	_ISO_STDLIB_C99_H
40 
41 #pragma ident	"%Z%%M%	%I%	%E% SMI"
42 
43 #ifdef	__cplusplus
44 extern "C" {
45 #endif
46 
47 /*
48  * The following have been added as a result of the ISO/IEC 9899:1999
49  * standard. For a strictly conforming C application, visibility is
50  * contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
51  * For non-strictly conforming C applications, there are no restrictions
52  * on the C namespace.
53  */
54 
55 #if defined(_LONGLONG_TYPE)
56 typedef struct {
57 	long long	quot;
58 	long long	rem;
59 } lldiv_t;
60 #endif  /* defined(_LONGLONG_TYPE) */
61 
62 #ifdef __STDC__
63 
64 #if (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
65 	defined(_STDC_C99) || defined(__EXTENSIONS__)
66 
67 extern void _Exit(int);
68 extern float strtof(const char *_RESTRICT_KYWD, char **_RESTRICT_KYWD);
69 extern long double strtold(const char *_RESTRICT_KYWD, char **_RESTRICT_KYWD);
70 
71 #if defined(_LONGLONG_TYPE)
72 extern long long atoll(const char *);
73 extern long long llabs(long long);
74 extern lldiv_t lldiv(long long, long long);
75 extern long long strtoll(const char *_RESTRICT_KYWD, char **_RESTRICT_KYWD,
76 	int);
77 extern unsigned long long strtoull(const char *_RESTRICT_KYWD,
78 	char **_RESTRICT_KYWD, int);
79 #endif /* defined(_LONGLONG_TYPE) */
80 
81 #endif  /* (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) ... */
82 
83 #else /* __STDC__ */
84 
85 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__)
86 
87 extern void _Exit();
88 extern float strtof();
89 extern long double strtold();
90 
91 #if defined(_LONGLONG_TYPE)
92 extern long long atoll();
93 extern long long llabs();
94 extern lldiv_t lldiv();
95 extern long long strtoll();
96 extern unsigned long long strtoull();
97 #endif /* defined(_LONGLONG_TYPE) */
98 
99 #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG6)... */
100 
101 #endif /* __STDC__ */
102 
103 #ifdef	__cplusplus
104 }
105 #endif
106 
107 #endif	/* _ISO_STDLIB_C99_H */
108