Print this page
5262 libm needs to be carefully unifdef'd
5268 libm doesn't need to hide symbols which are already local
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Gordon Ross <gwr@nexenta.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libm/common/C/libm_protos.h
+++ new/usr/src/lib/libm/common/C/libm_protos.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
↓ open down ↓ |
21 lines elided |
↑ open up ↑ |
22 22 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
23 23 */
24 24 /*
25 25 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
26 26 * Use is subject to license terms.
27 27 */
28 28
29 29 #ifndef _C_LIBM_PROTOS_H
30 30 #define _C_LIBM_PROTOS_H
31 31
32 -#ifdef LIBMOPT_BUILD
33 -#define _TBL_cos __libmopt_TBL_cos
34 -#define _TBL_exp2_512 __libmopt_TBL_exp2_512
35 -#define _TBL_ipio2_inf __libmopt_TBL_ipio2_inf
36 -#define _TBL_jlog_n1 __libmopt_TBL_jlog_n1
37 -#define _TBL_jlog_n2 __libmopt_TBL_jlog_n2
38 -#define _TBL_jlog_p1 __libmopt_TBL_jlog_p1
39 -#define _TBL_jlog_p2 __libmopt_TBL_jlog_p2
40 -#define _TBL_log10 __libmopt_TBL_log10
41 -#define _TBL_log2_14 __libmopt_TBL_log2_14
42 -#define _TBL_log2_9 __libmopt_TBL_log2_9
43 -#define _TBL_sin __libmopt_TBL_sin
44 -#define _TBL_sincosx __libmopt_TBL_sincosx
45 -#define _TBL_xexp __libmopt_TBL_xexp
46 -#define _TBL_xlog __libmopt_TBL_xlog
47 -#define __k_cos_ __libmopt__k_cos_
48 -#define __k_sin_ __libmopt__k_sin_
49 -#define __k_sincos_ __libmopt__k_sincos_
50 -#define __reduction __libmopt__reduction
51 -#define __rem_pio2 __libmopt__rem_pio2
52 -#define __rem_pio2m __libmopt__rem_pio2m
53 -#else /* defined(LIBMOPT_BUILD) */
54 -#ifdef LIBM_BUILD
55 -#define _SVID_libm_err __libm_SVID_libm_err /* not used by -lsunmath */
56 -#define _TBL_atan __libm_TBL_atan
57 -#define _TBL_atan1 __libm_TBL_atan1
58 -#define _TBL_atan_hi __libm_TBL_atan_hi /* not used by -lsunmath */
59 -#define _TBL_atan_lo __libm_TBL_atan_lo /* not used by -lsunmath */
60 -#define _TBL_exp2_hi __libm_TBL_exp2_hi /* not used by -lsunmath */
61 -#define _TBL_exp2_lo __libm_TBL_exp2_lo /* not used by -lsunmath */
62 -#define _TBL_ipio2_inf __libm_TBL_ipio2_inf
63 -#define _TBL_log __libm_TBL_log
64 -#define _TBL_log2_hi __libm_TBL_log2_hi /* not used by -lsunmath */
65 -#define _TBL_log2_lo __libm_TBL_log2_lo /* not used by -lsunmath */
66 -#define _TBL_log_hi __libm_TBL_log_hi /* not used by -lsunmath */
67 -#define _TBL_log_lo __libm_TBL_log_lo /* not used by -lsunmath */
68 -#define _TBL_sincos __libm_TBL_sincos
69 -#define _TBL_sincosx __libm_TBL_sincosx
70 -#define _TBL_tan_hi __libm_TBL_tan_hi /* not used by -lsunmath */
71 -#define _TBL_tan_lo __libm_TBL_tan_lo /* not used by -lsunmath */
72 -#define __k_cexp __libm__k_cexp /* C99 libm */
73 -#define __k_cexpl __libm__k_cexpl /* C99 libm */
74 -#define __k_clog_r __libm__k_clog_r /* C99 libm */
75 -#define __k_clog_rl __libm__k_clog_rl /* C99 libm */
76 -#define __k_atan2 __libm__k_atan2 /* C99 libm */
77 -#define __k_atan2l __libm__k_atan2l /* C99 libm */
78 -#define __k_cos __libm__k_cos
79 -#define __k_lgamma __libm__k_lgamma
80 -#define __k_sin __libm__k_sin
81 -#define __k_sincos __libm__k_sincos
82 -#define __k_tan __libm__k_tan
83 -#define __reduction __libm__reduction /* i386 only */
32 +/*
33 + * Many symbols used to be namespaced with __libm to prevent collisions. All
34 + * but these two were otherwise scoped local and directly bound, so that
35 + * collision could not occur.
36 + *
37 + * For reasons unknown, these two are global (but private).
38 + */
84 39 #define __rem_pio2 __libm__rem_pio2
85 40 #define __rem_pio2m __libm__rem_pio2m
86 -#define __k_cosf __libm__k_cosf /* C99 libm */
87 -#define __k_cosl __libm__k_cosl /* C99 libm */
88 -#define __k_lgammal __libm__k_lgammal /* C99 libm */
89 -#define __k_sincosf __libm__k_sincosf /* C99 libm */
90 -#define __k_sincosl __libm__k_sincosl /* C99 libm */
91 -#define __k_sinf __libm__k_sinf /* C99 libm */
92 -#define __k_sinl __libm__k_sinl /* C99 libm */
93 -#define __k_tanf __libm__k_tanf /* C99 libm */
94 -#define __k_tanl __libm__k_tanl /* C99 libm */
95 -#define __poly_libmq __libm__poly_libmq /* C99 libm */
96 -#define __rem_pio2l __libm__rem_pio2l /* C99 libm */
97 -#define _TBL_atanl_hi __libm_TBL_atanl_hi /* C99 libm */
98 -#define _TBL_atanl_lo __libm_TBL_atanl_lo /* C99 libm */
99 -#define _TBL_cosl_hi __libm_TBL_cosl_hi /* C99 libm */
100 -#define _TBL_cosl_lo __libm_TBL_cosl_lo /* C99 libm */
101 -#define _TBL_expl_hi __libm_TBL_expl_hi /* C99 libm */
102 -#define _TBL_expl_lo __libm_TBL_expl_lo /* C99 libm */
103 -#define _TBL_expm1l __libm_TBL_expm1l /* C99 libm */
104 -#define _TBL_expm1lx __libm_TBL_expm1lx /* C99 libm */
105 -#define _TBL_ipio2l_inf __libm_TBL_ipio2l_inf /* C99 libm */
106 -#define _TBL_logl_hi __libm_TBL_logl_hi /* C99 libm */
107 -#define _TBL_logl_lo __libm_TBL_logl_lo /* C99 libm */
108 -#define _TBL_r_atan_hi __libm_TBL_r_atan_hi /* C99 libm */
109 -#define _TBL_r_atan_lo __libm_TBL_r_atan_lo /* C99 libm */
110 -#define _TBL_sinl_hi __libm_TBL_sinl_hi /* C99 libm */
111 -#define _TBL_sinl_lo __libm_TBL_sinl_lo /* C99 libm */
112 -#define _TBL_tanl_hi __libm_TBL_tanl_hi /* C99 libm */
113 -#define _TBL_tanl_lo __libm_TBL_tanl_lo /* C99 libm */
114 -#endif /* defined(LIBM_BUILD) */
115 -#endif /* defined(LIBMOPT_BUILD) */
116 41
117 42 #ifndef _ASM
118 43 #ifdef __STDC__
119 44 #define __P(p) p
120 45 #else
121 46 #define __P(p) ()
122 47 #endif
123 48
124 49 #include <sys/ieeefp.h>
125 50
126 51 extern double _SVID_libm_err __P((double, double, int));
127 52 extern double __k_cos __P((double, double));
128 53 extern double __k_cos_ __P((double *));
129 54 extern double __k_lgamma __P((double, int *));
130 55 extern double __k_sin __P((double, double));
131 56 extern double __k_sin_ __P((double *));
132 57 extern double __k_sincos __P((double, double, double *));
133 58 extern double __k_sincos_ __P((double *, double *));
134 59 extern double __k_tan __P((double, double, int));
135 60 extern double __k_cexp __P((double, int *));
136 61 extern long double __k_cexpl __P((long double, int *));
137 62 extern double __k_clog_r __P((double, double, double *));
138 63 extern long double __k_clog_rl __P((long double, long double, long double *));
139 64 extern double __k_atan2 __P((double, double, double *));
140 65 extern long double __k_atan2l __P((long double, long double, long double *));
141 66 extern int __rem_pio2 __P((double, double *));
142 67 extern int __rem_pio2m __P((double *, double *, int, int, int, const int *));
143 68
144 69 /*
145 70 * entry points that are in-lined
146 71 */
147 72 extern double copysign __P((double, double));
148 73 extern int finite __P((double));
149 74 extern enum fp_class_type fp_class __P((double));
150 75 extern double infinity __P((void));
151 76 extern int isinf __P((double));
152 77 extern int signbit __P((double));
153 78
154 79 /*
155 80 * new C99 entry points
156 81 */
157 82 extern double fdim __P((double, double));
158 83 extern double fma __P((double, double, double));
159 84 extern double fmax __P((double, double));
160 85 extern double fmin __P((double, double));
161 86 extern double frexp __P((double, int *));
162 87 extern double ldexp __P((double, int));
163 88 extern double modf __P((double, double *));
164 89 extern double nan __P((const char *));
165 90 extern double nearbyint __P((double));
166 91 extern double nexttoward __P((double, long double));
167 92 extern double remquo __P((double, double, int *));
168 93 extern double round __P((double));
169 94 extern double scalbln __P((double, long int));
170 95 extern double tgamma __P((double));
171 96 extern double trunc __P((double));
172 97 extern float fdimf __P((float, float));
173 98 extern float fmaf __P((float, float, float));
174 99 extern float fmaxf __P((float, float));
175 100 extern float fminf __P((float, float));
176 101 extern float frexpf __P((float, int *));
177 102 extern float ldexpf __P((float, int));
178 103 extern float modff __P((float, float *));
179 104 extern float nanf __P((const char *));
180 105 extern float nearbyintf __P((float));
181 106 extern float nextafterf __P((float, float));
182 107 extern float nexttowardf __P((float, long double));
183 108 extern float remquof __P((float, float, int *));
184 109 extern float roundf __P((float));
185 110 extern float scalblnf __P((float, long int));
186 111 extern float tgammaf __P((float));
187 112 extern float truncf __P((float));
188 113 extern long double frexpl(long double, int *);
189 114 extern long double fdiml __P((long double, long double));
190 115 extern long double fmal __P((long double, long double, long double));
191 116 extern long double fmaxl __P((long double, long double));
192 117 extern long double fminl __P((long double, long double));
193 118 extern long double ldexpl __P((long double, int));
194 119 extern long double modfl __P((long double, long double *));
195 120 extern long double nanl __P((const char *));
196 121 extern long double nearbyintl __P((long double));
197 122 extern long double nextafterl __P((long double, long double));
198 123 extern long double nexttowardl __P((long double, long double));
199 124 extern long double remquol __P((long double, long double, int *));
200 125 extern long double roundl __P((long double));
201 126 extern long double scalblnl __P((long double, long int));
202 127 extern long double tgammal __P((long double));
203 128 extern long double truncl __P((long double));
204 129 extern long int lrint __P((double));
205 130 extern long int lrintf __P((float));
206 131 extern long int lrintl __P((long double));
207 132 extern long int lround __P((double));
208 133 extern long int lroundf __P((float));
209 134 extern long int lroundl __P((long double));
210 135 extern long long int llrint __P((double));
211 136 extern long long int llrintf __P((float));
212 137 extern long long int llrintl __P((long double));
213 138 extern long long int llround __P((double));
214 139 extern long long int llroundf __P((float));
215 140 extern long long int llroundl __P((long double));
216 141 #endif /* _ASM */
217 142
218 143 #endif /* _C_LIBM_PROTOS_H */
↓ open down ↓ |
93 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX