Commit | Line | Data |
---|---|---|
88b48903 WN |
1 | /* A GNU-like <math.h>. |
2 | ||
9c9d63b1 | 3 | Copyright (C) 2002-2003, 2007-2021 Free Software Foundation, Inc. |
88b48903 WN |
4 | |
5 | This program is free software: you can redistribute it and/or modify | |
6 | it under the terms of the GNU General Public License as published by | |
7 | the Free Software Foundation; either version 3 of the License, or | |
8 | (at your option) any later version. | |
9 | ||
10 | This program is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | GNU General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU General Public License | |
c0c3707f | 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
88b48903 WN |
17 | |
18 | #ifndef _@GUARD_PREFIX@_MATH_H | |
19 | ||
20 | #if __GNUC__ >= 3 | |
21 | @PRAGMA_SYSTEM_HEADER@ | |
22 | #endif | |
23 | @PRAGMA_COLUMNS@ | |
24 | ||
9c9d63b1 PM |
25 | #if defined _GL_INCLUDING_MATH_H |
26 | /* Special invocation convention: | |
27 | - On FreeBSD 12.2 we have a sequence of nested includes | |
28 | <math.h> -> <stdlib.h> -> <sys/wait.h> -> <sys/types.h> -> <sys/select.h> | |
29 | -> <signal.h> -> <pthread.h> -> <stdlib.h> -> <math.h> | |
30 | In this situation, the functions are not yet declared, therefore we cannot | |
31 | provide the C++ aliases. */ | |
32 | ||
33 | #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ | |
34 | ||
35 | #else | |
36 | /* Normal invocation convention. */ | |
37 | ||
88b48903 | 38 | /* The include_next requires a split double-inclusion guard. */ |
9c9d63b1 | 39 | #define _GL_INCLUDING_MATH_H |
88b48903 | 40 | #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ |
9c9d63b1 | 41 | #undef _GL_INCLUDING_MATH_H |
88b48903 WN |
42 | |
43 | #ifndef _@GUARD_PREFIX@_MATH_H | |
44 | #define _@GUARD_PREFIX@_MATH_H | |
45 | ||
c0c3707f CB |
46 | /* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in <fp.h>. */ |
47 | #if defined __VMS && ! defined NAN | |
48 | # include <fp.h> | |
49 | #endif | |
50 | ||
4a626d0a PA |
51 | #ifndef _GL_INLINE_HEADER_BEGIN |
52 | #error "Please include config.h first." | |
53 | #endif | |
88b48903 WN |
54 | _GL_INLINE_HEADER_BEGIN |
55 | #ifndef _GL_MATH_INLINE | |
56 | # define _GL_MATH_INLINE _GL_INLINE | |
57 | #endif | |
58 | ||
59 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ | |
60 | ||
61 | /* The definition of _GL_ARG_NONNULL is copied here. */ | |
62 | ||
63 | /* The definition of _GL_WARN_ON_USE is copied here. */ | |
64 | ||
65 | #ifdef __cplusplus | |
66 | /* Helper macros to define type-generic function FUNC as overloaded functions, | |
67 | rather than as macros like in C. POSIX declares these with an argument of | |
68 | real-floating (that is, one of float, double, or long double). */ | |
69 | # define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \ | |
70 | static inline int \ | |
71 | _gl_cxx_ ## func ## f (float f) \ | |
72 | { \ | |
73 | return func (f); \ | |
74 | } \ | |
75 | static inline int \ | |
76 | _gl_cxx_ ## func ## d (double d) \ | |
77 | { \ | |
78 | return func (d); \ | |
79 | } \ | |
80 | static inline int \ | |
81 | _gl_cxx_ ## func ## l (long double l) \ | |
82 | { \ | |
83 | return func (l); \ | |
84 | } | |
c0c3707f | 85 | # define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func,rpl_func,rettype) \ |
4c62b19f | 86 | _GL_BEGIN_NAMESPACE \ |
c0c3707f CB |
87 | inline rettype \ |
88 | rpl_func (float f) \ | |
88b48903 WN |
89 | { \ |
90 | return _gl_cxx_ ## func ## f (f); \ | |
91 | } \ | |
c0c3707f CB |
92 | inline rettype \ |
93 | rpl_func (double d) \ | |
88b48903 WN |
94 | { \ |
95 | return _gl_cxx_ ## func ## d (d); \ | |
96 | } \ | |
c0c3707f CB |
97 | inline rettype \ |
98 | rpl_func (long double l) \ | |
88b48903 WN |
99 | { \ |
100 | return _gl_cxx_ ## func ## l (l); \ | |
4c62b19f PA |
101 | } \ |
102 | _GL_END_NAMESPACE | |
88b48903 WN |
103 | #endif |
104 | ||
105 | /* Helper macros to define a portability warning for the | |
106 | classification macro FUNC called with VALUE. POSIX declares the | |
107 | classification macros with an argument of real-floating (that is, | |
108 | one of float, double, or long double). */ | |
109 | #define _GL_WARN_REAL_FLOATING_DECL(func) \ | |
c0c3707f CB |
110 | _GL_MATH_INLINE int \ |
111 | _GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ | |
112 | "use gnulib module " #func " for portability") \ | |
113 | rpl_ ## func ## f (float f) \ | |
114 | { \ | |
115 | return func (f); \ | |
116 | } \ | |
117 | _GL_MATH_INLINE int \ | |
118 | _GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ | |
119 | "use gnulib module " #func " for portability") \ | |
120 | rpl_ ## func ## d (double d) \ | |
121 | { \ | |
122 | return func (d); \ | |
123 | } \ | |
124 | _GL_MATH_INLINE int \ | |
125 | _GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ | |
126 | "use gnulib module " #func " for portability") \ | |
127 | rpl_ ## func ## l (long double l) \ | |
128 | { \ | |
129 | return func (l); \ | |
130 | } | |
88b48903 WN |
131 | #define _GL_WARN_REAL_FLOATING_IMPL(func, value) \ |
132 | (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \ | |
133 | : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \ | |
134 | : rpl_ ## func ## l (value)) | |
135 | ||
136 | ||
137 | #if @REPLACE_ITOLD@ | |
138 | /* Pull in a function that fixes the 'int' to 'long double' conversion | |
139 | of glibc 2.7. */ | |
140 | _GL_EXTERN_C void _Qp_itoq (long double *, int); | |
141 | static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq; | |
142 | #endif | |
143 | ||
144 | ||
145 | /* POSIX allows platforms that don't support NAN. But all major | |
146 | machines in the past 15 years have supported something close to | |
147 | IEEE NaN, so we define this unconditionally. We also must define | |
148 | it on platforms like Solaris 10, where NAN is present but defined | |
149 | as a function pointer rather than a floating point constant. */ | |
150 | #if !defined NAN || @REPLACE_NAN@ | |
151 | # if !GNULIB_defined_NAN | |
152 | # undef NAN | |
153 | /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler | |
154 | choke on the expression 0.0 / 0.0. */ | |
155 | # if defined __DECC || defined _MSC_VER | |
156 | _GL_MATH_INLINE float | |
157 | _NaN () | |
158 | { | |
159 | static float zero = 0.0f; | |
160 | return zero / zero; | |
161 | } | |
162 | # define NAN (_NaN()) | |
163 | # else | |
164 | # define NAN (0.0f / 0.0f) | |
165 | # endif | |
166 | # define GNULIB_defined_NAN 1 | |
167 | # endif | |
168 | #endif | |
169 | ||
170 | /* Solaris 10 defines HUGE_VAL, but as a function pointer rather | |
171 | than a floating point constant. */ | |
172 | #if @REPLACE_HUGE_VAL@ | |
173 | # undef HUGE_VALF | |
174 | # define HUGE_VALF (1.0f / 0.0f) | |
175 | # undef HUGE_VAL | |
176 | # define HUGE_VAL (1.0 / 0.0) | |
177 | # undef HUGE_VALL | |
178 | # define HUGE_VALL (1.0L / 0.0L) | |
179 | #endif | |
180 | ||
181 | /* HUGE_VALF is a 'float' Infinity. */ | |
182 | #ifndef HUGE_VALF | |
183 | # if defined _MSC_VER | |
184 | /* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */ | |
185 | # define HUGE_VALF (1e25f * 1e25f) | |
186 | # else | |
187 | # define HUGE_VALF (1.0f / 0.0f) | |
188 | # endif | |
189 | #endif | |
190 | ||
191 | /* HUGE_VAL is a 'double' Infinity. */ | |
192 | #ifndef HUGE_VAL | |
193 | # if defined _MSC_VER | |
194 | /* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */ | |
195 | # define HUGE_VAL (1e250 * 1e250) | |
196 | # else | |
197 | # define HUGE_VAL (1.0 / 0.0) | |
198 | # endif | |
199 | #endif | |
200 | ||
201 | /* HUGE_VALL is a 'long double' Infinity. */ | |
202 | #ifndef HUGE_VALL | |
203 | # if defined _MSC_VER | |
204 | /* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */ | |
205 | # define HUGE_VALL (1e250L * 1e250L) | |
206 | # else | |
207 | # define HUGE_VALL (1.0L / 0.0L) | |
208 | # endif | |
209 | #endif | |
210 | ||
211 | ||
c0c3707f CB |
212 | #if defined FP_ILOGB0 && defined FP_ILOGBNAN |
213 | /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct. */ | |
214 | # if defined __HAIKU__ | |
215 | /* Haiku: match what ilogb() does */ | |
216 | # undef FP_ILOGB0 | |
217 | # undef FP_ILOGBNAN | |
218 | # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ | |
219 | # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ | |
220 | # endif | |
221 | #else | |
222 | /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */ | |
88b48903 WN |
223 | # if defined __NetBSD__ || defined __sgi |
224 | /* NetBSD, IRIX 6.5: match what ilogb() does */ | |
225 | # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ | |
226 | # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ | |
227 | # elif defined _AIX | |
228 | /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */ | |
229 | # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ | |
230 | # define FP_ILOGBNAN 2147483647 /* INT_MAX */ | |
231 | # elif defined __sun | |
232 | /* Solaris 9: match what ilogb() does */ | |
233 | # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ | |
234 | # define FP_ILOGBNAN 2147483647 /* INT_MAX */ | |
235 | # else | |
236 | /* Gnulib defined values. */ | |
237 | # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ | |
238 | # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ | |
239 | # endif | |
240 | #endif | |
241 | ||
242 | ||
243 | #if @GNULIB_ACOSF@ | |
c0c3707f CB |
244 | # if @REPLACE_ACOSF@ |
245 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
246 | # undef acosf | |
247 | # define acosf rpl_acosf | |
248 | # endif | |
249 | _GL_FUNCDECL_RPL (acosf, float, (float x)); | |
250 | _GL_CXXALIAS_RPL (acosf, float, (float x)); | |
251 | # else | |
252 | # if !@HAVE_ACOSF@ | |
253 | # undef acosf | |
88b48903 | 254 | _GL_FUNCDECL_SYS (acosf, float, (float x)); |
c0c3707f | 255 | # endif |
5e8754f9 | 256 | _GL_CXXALIAS_SYS (acosf, float, (float x)); |
c0c3707f | 257 | # endif |
88b48903 WN |
258 | _GL_CXXALIASWARN (acosf); |
259 | #elif defined GNULIB_POSIXCHECK | |
260 | # undef acosf | |
261 | # if HAVE_RAW_DECL_ACOSF | |
262 | _GL_WARN_ON_USE (acosf, "acosf is unportable - " | |
263 | "use gnulib module acosf for portability"); | |
264 | # endif | |
265 | #endif | |
266 | ||
267 | #if @GNULIB_ACOSL@ | |
268 | # if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@ | |
269 | # undef acosl | |
270 | _GL_FUNCDECL_SYS (acosl, long double, (long double x)); | |
271 | # endif | |
272 | _GL_CXXALIAS_SYS (acosl, long double, (long double x)); | |
9c9d63b1 | 273 | # if __GLIBC__ >= 2 |
88b48903 | 274 | _GL_CXXALIASWARN (acosl); |
9c9d63b1 | 275 | # endif |
88b48903 WN |
276 | #elif defined GNULIB_POSIXCHECK |
277 | # undef acosl | |
278 | # if HAVE_RAW_DECL_ACOSL | |
279 | _GL_WARN_ON_USE (acosl, "acosl is unportable - " | |
280 | "use gnulib module acosl for portability"); | |
281 | # endif | |
282 | #endif | |
283 | ||
284 | ||
285 | #if @GNULIB_ASINF@ | |
c0c3707f CB |
286 | # if @REPLACE_ASINF@ |
287 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
288 | # undef asinf | |
289 | # define asinf rpl_asinf | |
290 | # endif | |
291 | _GL_FUNCDECL_RPL (asinf, float, (float x)); | |
292 | _GL_CXXALIAS_RPL (asinf, float, (float x)); | |
293 | # else | |
294 | # if !@HAVE_ASINF@ | |
295 | # undef asinf | |
88b48903 | 296 | _GL_FUNCDECL_SYS (asinf, float, (float x)); |
c0c3707f | 297 | # endif |
5e8754f9 | 298 | _GL_CXXALIAS_SYS (asinf, float, (float x)); |
c0c3707f | 299 | # endif |
88b48903 WN |
300 | _GL_CXXALIASWARN (asinf); |
301 | #elif defined GNULIB_POSIXCHECK | |
302 | # undef asinf | |
303 | # if HAVE_RAW_DECL_ASINF | |
304 | _GL_WARN_ON_USE (asinf, "asinf is unportable - " | |
305 | "use gnulib module asinf for portability"); | |
306 | # endif | |
307 | #endif | |
308 | ||
309 | #if @GNULIB_ASINL@ | |
310 | # if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@ | |
311 | # undef asinl | |
312 | _GL_FUNCDECL_SYS (asinl, long double, (long double x)); | |
313 | # endif | |
314 | _GL_CXXALIAS_SYS (asinl, long double, (long double x)); | |
9c9d63b1 | 315 | # if __GLIBC__ >= 2 |
88b48903 | 316 | _GL_CXXALIASWARN (asinl); |
9c9d63b1 | 317 | # endif |
88b48903 WN |
318 | #elif defined GNULIB_POSIXCHECK |
319 | # undef asinl | |
320 | # if HAVE_RAW_DECL_ASINL | |
321 | _GL_WARN_ON_USE (asinl, "asinl is unportable - " | |
322 | "use gnulib module asinl for portability"); | |
323 | # endif | |
324 | #endif | |
325 | ||
326 | ||
327 | #if @GNULIB_ATANF@ | |
c0c3707f CB |
328 | # if @REPLACE_ATANF@ |
329 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
330 | # undef atanf | |
331 | # define atanf rpl_atanf | |
332 | # endif | |
333 | _GL_FUNCDECL_RPL (atanf, float, (float x)); | |
334 | _GL_CXXALIAS_RPL (atanf, float, (float x)); | |
335 | # else | |
336 | # if !@HAVE_ATANF@ | |
337 | # undef atanf | |
88b48903 | 338 | _GL_FUNCDECL_SYS (atanf, float, (float x)); |
c0c3707f | 339 | # endif |
5e8754f9 | 340 | _GL_CXXALIAS_SYS (atanf, float, (float x)); |
c0c3707f | 341 | # endif |
88b48903 WN |
342 | _GL_CXXALIASWARN (atanf); |
343 | #elif defined GNULIB_POSIXCHECK | |
344 | # undef atanf | |
345 | # if HAVE_RAW_DECL_ATANF | |
346 | _GL_WARN_ON_USE (atanf, "atanf is unportable - " | |
347 | "use gnulib module atanf for portability"); | |
348 | # endif | |
349 | #endif | |
350 | ||
351 | #if @GNULIB_ATANL@ | |
352 | # if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@ | |
353 | # undef atanl | |
354 | _GL_FUNCDECL_SYS (atanl, long double, (long double x)); | |
355 | # endif | |
356 | _GL_CXXALIAS_SYS (atanl, long double, (long double x)); | |
9c9d63b1 | 357 | # if __GLIBC__ >= 2 |
88b48903 | 358 | _GL_CXXALIASWARN (atanl); |
9c9d63b1 | 359 | # endif |
88b48903 WN |
360 | #elif defined GNULIB_POSIXCHECK |
361 | # undef atanl | |
362 | # if HAVE_RAW_DECL_ATANL | |
363 | _GL_WARN_ON_USE (atanl, "atanl is unportable - " | |
364 | "use gnulib module atanl for portability"); | |
365 | # endif | |
366 | #endif | |
367 | ||
368 | ||
369 | #if @GNULIB_ATAN2F@ | |
c0c3707f CB |
370 | # if @REPLACE_ATAN2F@ |
371 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
372 | # undef atan2f | |
373 | # define atan2f rpl_atan2f | |
374 | # endif | |
375 | _GL_FUNCDECL_RPL (atan2f, float, (float y, float x)); | |
376 | _GL_CXXALIAS_RPL (atan2f, float, (float y, float x)); | |
377 | # else | |
378 | # if !@HAVE_ATAN2F@ | |
379 | # undef atan2f | |
88b48903 | 380 | _GL_FUNCDECL_SYS (atan2f, float, (float y, float x)); |
c0c3707f | 381 | # endif |
5e8754f9 | 382 | _GL_CXXALIAS_SYS (atan2f, float, (float y, float x)); |
c0c3707f | 383 | # endif |
88b48903 WN |
384 | _GL_CXXALIASWARN (atan2f); |
385 | #elif defined GNULIB_POSIXCHECK | |
386 | # undef atan2f | |
387 | # if HAVE_RAW_DECL_ATAN2F | |
388 | _GL_WARN_ON_USE (atan2f, "atan2f is unportable - " | |
389 | "use gnulib module atan2f for portability"); | |
390 | # endif | |
391 | #endif | |
392 | ||
393 | ||
394 | #if @GNULIB_CBRTF@ | |
395 | # if @REPLACE_CBRTF@ | |
396 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
397 | # undef cbrtf | |
398 | # define cbrtf rpl_cbrtf | |
399 | # endif | |
400 | _GL_FUNCDECL_RPL (cbrtf, float, (float x)); | |
401 | _GL_CXXALIAS_RPL (cbrtf, float, (float x)); | |
402 | # else | |
403 | # if !@HAVE_DECL_CBRTF@ | |
404 | _GL_FUNCDECL_SYS (cbrtf, float, (float x)); | |
405 | # endif | |
406 | _GL_CXXALIAS_SYS (cbrtf, float, (float x)); | |
407 | # endif | |
408 | _GL_CXXALIASWARN (cbrtf); | |
409 | #elif defined GNULIB_POSIXCHECK | |
410 | # undef cbrtf | |
411 | # if HAVE_RAW_DECL_CBRTF | |
412 | _GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - " | |
413 | "use gnulib module cbrtf for portability"); | |
414 | # endif | |
415 | #endif | |
416 | ||
417 | #if @GNULIB_CBRT@ | |
418 | # if !@HAVE_CBRT@ | |
419 | _GL_FUNCDECL_SYS (cbrt, double, (double x)); | |
420 | # endif | |
421 | _GL_CXXALIAS_SYS (cbrt, double, (double x)); | |
c0c3707f | 422 | # if __GLIBC__ >= 2 |
9c9d63b1 | 423 | _GL_CXXALIASWARN1 (cbrt, double, (double x)); |
c0c3707f | 424 | # endif |
88b48903 WN |
425 | #elif defined GNULIB_POSIXCHECK |
426 | # undef cbrt | |
427 | # if HAVE_RAW_DECL_CBRT | |
428 | _GL_WARN_ON_USE (cbrt, "cbrt is unportable - " | |
429 | "use gnulib module cbrt for portability"); | |
430 | # endif | |
431 | #endif | |
432 | ||
433 | #if @GNULIB_CBRTL@ | |
434 | # if @REPLACE_CBRTL@ | |
435 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
436 | # undef cbrtl | |
437 | # define cbrtl rpl_cbrtl | |
438 | # endif | |
439 | _GL_FUNCDECL_RPL (cbrtl, long double, (long double x)); | |
440 | _GL_CXXALIAS_RPL (cbrtl, long double, (long double x)); | |
441 | # else | |
442 | # if !@HAVE_DECL_CBRTL@ | |
443 | _GL_FUNCDECL_SYS (cbrtl, long double, (long double x)); | |
444 | # endif | |
445 | _GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); | |
446 | # endif | |
447 | _GL_CXXALIASWARN (cbrtl); | |
448 | #elif defined GNULIB_POSIXCHECK | |
449 | # undef cbrtl | |
450 | # if HAVE_RAW_DECL_CBRTL | |
451 | _GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - " | |
452 | "use gnulib module cbrtl for portability"); | |
453 | # endif | |
454 | #endif | |
455 | ||
456 | ||
457 | #if @GNULIB_CEILF@ | |
458 | # if @REPLACE_CEILF@ | |
459 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
460 | # undef ceilf | |
461 | # define ceilf rpl_ceilf | |
462 | # endif | |
463 | _GL_FUNCDECL_RPL (ceilf, float, (float x)); | |
464 | _GL_CXXALIAS_RPL (ceilf, float, (float x)); | |
465 | # else | |
466 | # if !@HAVE_DECL_CEILF@ | |
467 | # undef ceilf | |
468 | _GL_FUNCDECL_SYS (ceilf, float, (float x)); | |
469 | # endif | |
470 | _GL_CXXALIAS_SYS (ceilf, float, (float x)); | |
471 | # endif | |
472 | _GL_CXXALIASWARN (ceilf); | |
473 | #elif defined GNULIB_POSIXCHECK | |
474 | # undef ceilf | |
475 | # if HAVE_RAW_DECL_CEILF | |
476 | _GL_WARN_ON_USE (ceilf, "ceilf is unportable - " | |
477 | "use gnulib module ceilf for portability"); | |
478 | # endif | |
479 | #endif | |
480 | ||
481 | #if @GNULIB_CEIL@ | |
482 | # if @REPLACE_CEIL@ | |
483 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
49e4877c | 484 | # undef ceil |
88b48903 WN |
485 | # define ceil rpl_ceil |
486 | # endif | |
487 | _GL_FUNCDECL_RPL (ceil, double, (double x)); | |
488 | _GL_CXXALIAS_RPL (ceil, double, (double x)); | |
489 | # else | |
490 | _GL_CXXALIAS_SYS (ceil, double, (double x)); | |
491 | # endif | |
c0c3707f | 492 | # if __GLIBC__ >= 2 |
9c9d63b1 | 493 | _GL_CXXALIASWARN1 (ceil, double, (double x)); |
c0c3707f | 494 | # endif |
88b48903 WN |
495 | #endif |
496 | ||
497 | #if @GNULIB_CEILL@ | |
498 | # if @REPLACE_CEILL@ | |
499 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
500 | # undef ceill | |
501 | # define ceill rpl_ceill | |
502 | # endif | |
503 | _GL_FUNCDECL_RPL (ceill, long double, (long double x)); | |
504 | _GL_CXXALIAS_RPL (ceill, long double, (long double x)); | |
505 | # else | |
506 | # if !@HAVE_DECL_CEILL@ | |
507 | # undef ceill | |
508 | _GL_FUNCDECL_SYS (ceill, long double, (long double x)); | |
509 | # endif | |
510 | _GL_CXXALIAS_SYS (ceill, long double, (long double x)); | |
511 | # endif | |
9c9d63b1 | 512 | # if __GLIBC__ >= 2 |
88b48903 | 513 | _GL_CXXALIASWARN (ceill); |
9c9d63b1 | 514 | # endif |
88b48903 WN |
515 | #elif defined GNULIB_POSIXCHECK |
516 | # undef ceill | |
517 | # if HAVE_RAW_DECL_CEILL | |
518 | _GL_WARN_ON_USE (ceill, "ceill is unportable - " | |
519 | "use gnulib module ceill for portability"); | |
520 | # endif | |
521 | #endif | |
522 | ||
523 | ||
524 | #if @GNULIB_COPYSIGNF@ | |
525 | # if !@HAVE_DECL_COPYSIGNF@ | |
c0c3707f | 526 | # undef copysignf |
88b48903 WN |
527 | _GL_FUNCDECL_SYS (copysignf, float, (float x, float y)); |
528 | # endif | |
529 | _GL_CXXALIAS_SYS (copysignf, float, (float x, float y)); | |
530 | _GL_CXXALIASWARN (copysignf); | |
531 | #elif defined GNULIB_POSIXCHECK | |
532 | # undef copysignf | |
533 | # if HAVE_RAW_DECL_COPYSIGNF | |
534 | _GL_WARN_ON_USE (copysignf, "copysignf is unportable - " | |
535 | "use gnulib module copysignf for portability"); | |
536 | # endif | |
537 | #endif | |
538 | ||
539 | #if @GNULIB_COPYSIGN@ | |
540 | # if !@HAVE_COPYSIGN@ | |
541 | _GL_FUNCDECL_SYS (copysign, double, (double x, double y)); | |
542 | # endif | |
543 | _GL_CXXALIAS_SYS (copysign, double, (double x, double y)); | |
c0c3707f | 544 | # if __GLIBC__ >= 2 |
9c9d63b1 | 545 | _GL_CXXALIASWARN1 (copysign, double, (double x, double y)); |
c0c3707f | 546 | # endif |
88b48903 WN |
547 | #elif defined GNULIB_POSIXCHECK |
548 | # undef copysign | |
549 | # if HAVE_RAW_DECL_COPYSIGN | |
550 | _GL_WARN_ON_USE (copysign, "copysign is unportable - " | |
551 | "use gnulib module copysign for portability"); | |
552 | # endif | |
553 | #endif | |
554 | ||
555 | #if @GNULIB_COPYSIGNL@ | |
556 | # if !@HAVE_COPYSIGNL@ | |
557 | _GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y)); | |
558 | # endif | |
559 | _GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y)); | |
560 | _GL_CXXALIASWARN (copysignl); | |
561 | #elif defined GNULIB_POSIXCHECK | |
562 | # undef copysignl | |
563 | # if HAVE_RAW_DECL_COPYSIGNL | |
564 | _GL_WARN_ON_USE (copysign, "copysignl is unportable - " | |
565 | "use gnulib module copysignl for portability"); | |
566 | # endif | |
567 | #endif | |
568 | ||
569 | ||
570 | #if @GNULIB_COSF@ | |
c0c3707f CB |
571 | # if @REPLACE_COSF@ |
572 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
573 | # undef cosf | |
574 | # define cosf rpl_cosf | |
575 | # endif | |
576 | _GL_FUNCDECL_RPL (cosf, float, (float x)); | |
577 | _GL_CXXALIAS_RPL (cosf, float, (float x)); | |
578 | # else | |
579 | # if !@HAVE_COSF@ | |
580 | # undef cosf | |
88b48903 | 581 | _GL_FUNCDECL_SYS (cosf, float, (float x)); |
c0c3707f | 582 | # endif |
5e8754f9 | 583 | _GL_CXXALIAS_SYS (cosf, float, (float x)); |
c0c3707f | 584 | # endif |
88b48903 WN |
585 | _GL_CXXALIASWARN (cosf); |
586 | #elif defined GNULIB_POSIXCHECK | |
587 | # undef cosf | |
588 | # if HAVE_RAW_DECL_COSF | |
589 | _GL_WARN_ON_USE (cosf, "cosf is unportable - " | |
590 | "use gnulib module cosf for portability"); | |
591 | # endif | |
592 | #endif | |
593 | ||
594 | #if @GNULIB_COSL@ | |
595 | # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@ | |
596 | # undef cosl | |
597 | _GL_FUNCDECL_SYS (cosl, long double, (long double x)); | |
598 | # endif | |
599 | _GL_CXXALIAS_SYS (cosl, long double, (long double x)); | |
9c9d63b1 | 600 | # if __GLIBC__ >= 2 |
88b48903 | 601 | _GL_CXXALIASWARN (cosl); |
9c9d63b1 | 602 | # endif |
88b48903 WN |
603 | #elif defined GNULIB_POSIXCHECK |
604 | # undef cosl | |
605 | # if HAVE_RAW_DECL_COSL | |
606 | _GL_WARN_ON_USE (cosl, "cosl is unportable - " | |
607 | "use gnulib module cosl for portability"); | |
608 | # endif | |
609 | #endif | |
610 | ||
611 | ||
612 | #if @GNULIB_COSHF@ | |
c0c3707f CB |
613 | # if @REPLACE_COSHF@ |
614 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
615 | # undef coshf | |
616 | # define coshf rpl_coshf | |
617 | # endif | |
618 | _GL_FUNCDECL_RPL (coshf, float, (float x)); | |
619 | _GL_CXXALIAS_RPL (coshf, float, (float x)); | |
620 | # else | |
621 | # if !@HAVE_COSHF@ | |
622 | # undef coshf | |
88b48903 | 623 | _GL_FUNCDECL_SYS (coshf, float, (float x)); |
c0c3707f | 624 | # endif |
5e8754f9 | 625 | _GL_CXXALIAS_SYS (coshf, float, (float x)); |
c0c3707f | 626 | # endif |
88b48903 WN |
627 | _GL_CXXALIASWARN (coshf); |
628 | #elif defined GNULIB_POSIXCHECK | |
629 | # undef coshf | |
630 | # if HAVE_RAW_DECL_COSHF | |
631 | _GL_WARN_ON_USE (coshf, "coshf is unportable - " | |
632 | "use gnulib module coshf for portability"); | |
633 | # endif | |
634 | #endif | |
635 | ||
636 | ||
637 | #if @GNULIB_EXPF@ | |
c0c3707f CB |
638 | # if @REPLACE_EXPF@ |
639 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
640 | # undef expf | |
641 | # define expf rpl_expf | |
642 | # endif | |
643 | _GL_FUNCDECL_RPL (expf, float, (float x)); | |
644 | _GL_CXXALIAS_RPL (expf, float, (float x)); | |
645 | # else | |
646 | # if !@HAVE_EXPF@ | |
647 | # undef expf | |
88b48903 | 648 | _GL_FUNCDECL_SYS (expf, float, (float x)); |
c0c3707f | 649 | # endif |
5e8754f9 | 650 | _GL_CXXALIAS_SYS (expf, float, (float x)); |
c0c3707f | 651 | # endif |
88b48903 WN |
652 | _GL_CXXALIASWARN (expf); |
653 | #elif defined GNULIB_POSIXCHECK | |
654 | # undef expf | |
655 | # if HAVE_RAW_DECL_EXPF | |
656 | _GL_WARN_ON_USE (expf, "expf is unportable - " | |
657 | "use gnulib module expf for portability"); | |
658 | # endif | |
659 | #endif | |
660 | ||
661 | #if @GNULIB_EXPL@ | |
c0c3707f CB |
662 | # if @REPLACE_EXPL@ |
663 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
664 | # undef expl | |
665 | # define expl rpl_expl | |
666 | # endif | |
667 | _GL_FUNCDECL_RPL (expl, long double, (long double x)); | |
668 | _GL_CXXALIAS_RPL (expl, long double, (long double x)); | |
669 | # else | |
670 | # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@ | |
671 | # undef expl | |
88b48903 | 672 | _GL_FUNCDECL_SYS (expl, long double, (long double x)); |
c0c3707f | 673 | # endif |
88b48903 | 674 | _GL_CXXALIAS_SYS (expl, long double, (long double x)); |
c0c3707f | 675 | # endif |
9c9d63b1 | 676 | # if __GLIBC__ >= 2 |
88b48903 | 677 | _GL_CXXALIASWARN (expl); |
9c9d63b1 | 678 | # endif |
88b48903 WN |
679 | #elif defined GNULIB_POSIXCHECK |
680 | # undef expl | |
681 | # if HAVE_RAW_DECL_EXPL | |
682 | _GL_WARN_ON_USE (expl, "expl is unportable - " | |
683 | "use gnulib module expl for portability"); | |
684 | # endif | |
685 | #endif | |
686 | ||
687 | ||
688 | #if @GNULIB_EXP2F@ | |
689 | # if !@HAVE_DECL_EXP2F@ | |
690 | _GL_FUNCDECL_SYS (exp2f, float, (float x)); | |
691 | # endif | |
692 | _GL_CXXALIAS_SYS (exp2f, float, (float x)); | |
693 | _GL_CXXALIASWARN (exp2f); | |
694 | #elif defined GNULIB_POSIXCHECK | |
695 | # undef exp2f | |
696 | # if HAVE_RAW_DECL_EXP2F | |
697 | _GL_WARN_ON_USE (exp2f, "exp2f is unportable - " | |
698 | "use gnulib module exp2f for portability"); | |
699 | # endif | |
700 | #endif | |
701 | ||
702 | #if @GNULIB_EXP2@ | |
703 | # if @REPLACE_EXP2@ | |
704 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
705 | # undef exp2 | |
706 | # define exp2 rpl_exp2 | |
707 | # endif | |
708 | _GL_FUNCDECL_RPL (exp2, double, (double x)); | |
709 | _GL_CXXALIAS_RPL (exp2, double, (double x)); | |
710 | # else | |
711 | # if !@HAVE_DECL_EXP2@ | |
712 | _GL_FUNCDECL_SYS (exp2, double, (double x)); | |
713 | # endif | |
714 | _GL_CXXALIAS_SYS (exp2, double, (double x)); | |
715 | # endif | |
c0c3707f | 716 | # if __GLIBC__ >= 2 |
9c9d63b1 | 717 | _GL_CXXALIASWARN1 (exp2, double, (double x)); |
c0c3707f | 718 | # endif |
88b48903 WN |
719 | #elif defined GNULIB_POSIXCHECK |
720 | # undef exp2 | |
721 | # if HAVE_RAW_DECL_EXP2 | |
722 | _GL_WARN_ON_USE (exp2, "exp2 is unportable - " | |
723 | "use gnulib module exp2 for portability"); | |
724 | # endif | |
725 | #endif | |
726 | ||
727 | #if @GNULIB_EXP2L@ | |
728 | # if @REPLACE_EXP2L@ | |
729 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
730 | # undef exp2l | |
731 | # define exp2l rpl_exp2l | |
732 | # endif | |
733 | _GL_FUNCDECL_RPL (exp2l, long double, (long double x)); | |
734 | _GL_CXXALIAS_RPL (exp2l, long double, (long double x)); | |
735 | # else | |
736 | # if !@HAVE_DECL_EXP2L@ | |
737 | # undef exp2l | |
738 | _GL_FUNCDECL_SYS (exp2l, long double, (long double x)); | |
739 | # endif | |
740 | _GL_CXXALIAS_SYS (exp2l, long double, (long double x)); | |
741 | # endif | |
742 | _GL_CXXALIASWARN (exp2l); | |
743 | #elif defined GNULIB_POSIXCHECK | |
744 | # undef exp2l | |
745 | # if HAVE_RAW_DECL_EXP2L | |
746 | _GL_WARN_ON_USE (exp2l, "exp2l is unportable - " | |
747 | "use gnulib module exp2l for portability"); | |
748 | # endif | |
749 | #endif | |
750 | ||
751 | ||
752 | #if @GNULIB_EXPM1F@ | |
753 | # if @REPLACE_EXPM1F@ | |
754 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
755 | # undef expm1f | |
756 | # define expm1f rpl_expm1f | |
757 | # endif | |
758 | _GL_FUNCDECL_RPL (expm1f, float, (float x)); | |
759 | _GL_CXXALIAS_RPL (expm1f, float, (float x)); | |
760 | # else | |
761 | # if !@HAVE_EXPM1F@ | |
762 | _GL_FUNCDECL_SYS (expm1f, float, (float x)); | |
763 | # endif | |
764 | _GL_CXXALIAS_SYS (expm1f, float, (float x)); | |
765 | # endif | |
766 | _GL_CXXALIASWARN (expm1f); | |
767 | #elif defined GNULIB_POSIXCHECK | |
768 | # undef expm1f | |
769 | # if HAVE_RAW_DECL_EXPM1F | |
770 | _GL_WARN_ON_USE (expm1f, "expm1f is unportable - " | |
771 | "use gnulib module expm1f for portability"); | |
772 | # endif | |
773 | #endif | |
774 | ||
775 | #if @GNULIB_EXPM1@ | |
776 | # if @REPLACE_EXPM1@ | |
777 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
778 | # undef expm1 | |
779 | # define expm1 rpl_expm1 | |
780 | # endif | |
781 | _GL_FUNCDECL_RPL (expm1, double, (double x)); | |
782 | _GL_CXXALIAS_RPL (expm1, double, (double x)); | |
783 | # else | |
784 | # if !@HAVE_EXPM1@ | |
785 | _GL_FUNCDECL_SYS (expm1, double, (double x)); | |
786 | # endif | |
787 | _GL_CXXALIAS_SYS (expm1, double, (double x)); | |
788 | # endif | |
c0c3707f | 789 | # if __GLIBC__ >= 2 |
9c9d63b1 | 790 | _GL_CXXALIASWARN1 (expm1, double, (double x)); |
c0c3707f | 791 | # endif |
88b48903 WN |
792 | #elif defined GNULIB_POSIXCHECK |
793 | # undef expm1 | |
794 | # if HAVE_RAW_DECL_EXPM1 | |
795 | _GL_WARN_ON_USE (expm1, "expm1 is unportable - " | |
796 | "use gnulib module expm1 for portability"); | |
797 | # endif | |
798 | #endif | |
799 | ||
800 | #if @GNULIB_EXPM1L@ | |
c0c3707f CB |
801 | # if @REPLACE_EXPM1L@ |
802 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
803 | # undef expm1l | |
804 | # define expm1l rpl_expm1l | |
805 | # endif | |
806 | _GL_FUNCDECL_RPL (expm1l, long double, (long double x)); | |
807 | _GL_CXXALIAS_RPL (expm1l, long double, (long double x)); | |
808 | # else | |
809 | # if !@HAVE_DECL_EXPM1L@ | |
810 | # undef expm1l | |
811 | # if !(defined __cplusplus && defined _AIX) | |
88b48903 | 812 | _GL_FUNCDECL_SYS (expm1l, long double, (long double x)); |
c0c3707f CB |
813 | # endif |
814 | # endif | |
88b48903 | 815 | _GL_CXXALIAS_SYS (expm1l, long double, (long double x)); |
c0c3707f | 816 | # endif |
88b48903 WN |
817 | _GL_CXXALIASWARN (expm1l); |
818 | #elif defined GNULIB_POSIXCHECK | |
819 | # undef expm1l | |
820 | # if HAVE_RAW_DECL_EXPM1L | |
821 | _GL_WARN_ON_USE (expm1l, "expm1l is unportable - " | |
822 | "use gnulib module expm1l for portability"); | |
823 | # endif | |
824 | #endif | |
825 | ||
826 | ||
827 | #if @GNULIB_FABSF@ | |
828 | # if !@HAVE_FABSF@ | |
829 | # undef fabsf | |
830 | _GL_FUNCDECL_SYS (fabsf, float, (float x)); | |
831 | # endif | |
832 | _GL_CXXALIAS_SYS (fabsf, float, (float x)); | |
9c9d63b1 | 833 | # if __GLIBC__ >= 2 |
88b48903 | 834 | _GL_CXXALIASWARN (fabsf); |
9c9d63b1 | 835 | # endif |
88b48903 WN |
836 | #elif defined GNULIB_POSIXCHECK |
837 | # undef fabsf | |
838 | # if HAVE_RAW_DECL_FABSF | |
839 | _GL_WARN_ON_USE (fabsf, "fabsf is unportable - " | |
840 | "use gnulib module fabsf for portability"); | |
841 | # endif | |
842 | #endif | |
843 | ||
844 | #if @GNULIB_FABSL@ | |
845 | # if @REPLACE_FABSL@ | |
846 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
847 | # undef fabsl | |
848 | # define fabsl rpl_fabsl | |
849 | # endif | |
850 | _GL_FUNCDECL_RPL (fabsl, long double, (long double x)); | |
851 | _GL_CXXALIAS_RPL (fabsl, long double, (long double x)); | |
852 | # else | |
853 | # if !@HAVE_FABSL@ | |
854 | # undef fabsl | |
855 | _GL_FUNCDECL_SYS (fabsl, long double, (long double x)); | |
856 | # endif | |
857 | _GL_CXXALIAS_SYS (fabsl, long double, (long double x)); | |
858 | # endif | |
9c9d63b1 | 859 | # if __GLIBC__ >= 2 |
88b48903 | 860 | _GL_CXXALIASWARN (fabsl); |
9c9d63b1 | 861 | # endif |
88b48903 WN |
862 | #elif defined GNULIB_POSIXCHECK |
863 | # undef fabsl | |
864 | # if HAVE_RAW_DECL_FABSL | |
865 | _GL_WARN_ON_USE (fabsl, "fabsl is unportable - " | |
866 | "use gnulib module fabsl for portability"); | |
867 | # endif | |
868 | #endif | |
869 | ||
870 | ||
871 | #if @GNULIB_FLOORF@ | |
872 | # if @REPLACE_FLOORF@ | |
873 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
874 | # undef floorf | |
875 | # define floorf rpl_floorf | |
876 | # endif | |
877 | _GL_FUNCDECL_RPL (floorf, float, (float x)); | |
878 | _GL_CXXALIAS_RPL (floorf, float, (float x)); | |
879 | # else | |
880 | # if !@HAVE_DECL_FLOORF@ | |
881 | # undef floorf | |
882 | _GL_FUNCDECL_SYS (floorf, float, (float x)); | |
883 | # endif | |
884 | _GL_CXXALIAS_SYS (floorf, float, (float x)); | |
885 | # endif | |
886 | _GL_CXXALIASWARN (floorf); | |
887 | #elif defined GNULIB_POSIXCHECK | |
888 | # undef floorf | |
889 | # if HAVE_RAW_DECL_FLOORF | |
890 | _GL_WARN_ON_USE (floorf, "floorf is unportable - " | |
891 | "use gnulib module floorf for portability"); | |
892 | # endif | |
893 | #endif | |
894 | ||
895 | #if @GNULIB_FLOOR@ | |
896 | # if @REPLACE_FLOOR@ | |
897 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
49e4877c | 898 | # undef floor |
88b48903 WN |
899 | # define floor rpl_floor |
900 | # endif | |
901 | _GL_FUNCDECL_RPL (floor, double, (double x)); | |
902 | _GL_CXXALIAS_RPL (floor, double, (double x)); | |
903 | # else | |
904 | _GL_CXXALIAS_SYS (floor, double, (double x)); | |
905 | # endif | |
c0c3707f | 906 | # if __GLIBC__ >= 2 |
9c9d63b1 | 907 | _GL_CXXALIASWARN1 (floor, double, (double x)); |
c0c3707f | 908 | # endif |
88b48903 WN |
909 | #endif |
910 | ||
911 | #if @GNULIB_FLOORL@ | |
912 | # if @REPLACE_FLOORL@ | |
913 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
914 | # undef floorl | |
915 | # define floorl rpl_floorl | |
916 | # endif | |
917 | _GL_FUNCDECL_RPL (floorl, long double, (long double x)); | |
918 | _GL_CXXALIAS_RPL (floorl, long double, (long double x)); | |
919 | # else | |
920 | # if !@HAVE_DECL_FLOORL@ | |
921 | # undef floorl | |
922 | _GL_FUNCDECL_SYS (floorl, long double, (long double x)); | |
923 | # endif | |
924 | _GL_CXXALIAS_SYS (floorl, long double, (long double x)); | |
925 | # endif | |
9c9d63b1 | 926 | # if __GLIBC__ >= 2 |
88b48903 | 927 | _GL_CXXALIASWARN (floorl); |
9c9d63b1 | 928 | # endif |
88b48903 WN |
929 | #elif defined GNULIB_POSIXCHECK |
930 | # undef floorl | |
931 | # if HAVE_RAW_DECL_FLOORL | |
932 | _GL_WARN_ON_USE (floorl, "floorl is unportable - " | |
933 | "use gnulib module floorl for portability"); | |
934 | # endif | |
935 | #endif | |
936 | ||
937 | ||
938 | #if @GNULIB_FMAF@ | |
939 | # if @REPLACE_FMAF@ | |
940 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
941 | # undef fmaf | |
942 | # define fmaf rpl_fmaf | |
943 | # endif | |
944 | _GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z)); | |
945 | _GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z)); | |
946 | # else | |
947 | # if !@HAVE_FMAF@ | |
c0c3707f | 948 | # undef fmaf |
88b48903 WN |
949 | _GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z)); |
950 | # endif | |
951 | _GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z)); | |
952 | # endif | |
953 | _GL_CXXALIASWARN (fmaf); | |
954 | #elif defined GNULIB_POSIXCHECK | |
955 | # undef fmaf | |
956 | # if HAVE_RAW_DECL_FMAF | |
957 | _GL_WARN_ON_USE (fmaf, "fmaf is unportable - " | |
958 | "use gnulib module fmaf for portability"); | |
959 | # endif | |
960 | #endif | |
961 | ||
962 | #if @GNULIB_FMA@ | |
963 | # if @REPLACE_FMA@ | |
964 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
965 | # undef fma | |
966 | # define fma rpl_fma | |
967 | # endif | |
968 | _GL_FUNCDECL_RPL (fma, double, (double x, double y, double z)); | |
969 | _GL_CXXALIAS_RPL (fma, double, (double x, double y, double z)); | |
970 | # else | |
971 | # if !@HAVE_FMA@ | |
c0c3707f | 972 | # undef fma |
88b48903 WN |
973 | _GL_FUNCDECL_SYS (fma, double, (double x, double y, double z)); |
974 | # endif | |
975 | _GL_CXXALIAS_SYS (fma, double, (double x, double y, double z)); | |
976 | # endif | |
c0c3707f | 977 | # if __GLIBC__ >= 2 |
9c9d63b1 | 978 | _GL_CXXALIASWARN1 (fma, double, (double x, double y, double z)); |
c0c3707f | 979 | # endif |
88b48903 WN |
980 | #elif defined GNULIB_POSIXCHECK |
981 | # undef fma | |
982 | # if HAVE_RAW_DECL_FMA | |
983 | _GL_WARN_ON_USE (fma, "fma is unportable - " | |
984 | "use gnulib module fma for portability"); | |
985 | # endif | |
986 | #endif | |
987 | ||
988 | #if @GNULIB_FMAL@ | |
989 | # if @REPLACE_FMAL@ | |
990 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
991 | # undef fmal | |
992 | # define fmal rpl_fmal | |
993 | # endif | |
994 | _GL_FUNCDECL_RPL (fmal, long double, | |
995 | (long double x, long double y, long double z)); | |
996 | _GL_CXXALIAS_RPL (fmal, long double, | |
997 | (long double x, long double y, long double z)); | |
998 | # else | |
999 | # if !@HAVE_FMAL@ | |
1000 | # undef fmal | |
c0c3707f | 1001 | # if !(defined __cplusplus && defined _AIX) |
88b48903 WN |
1002 | _GL_FUNCDECL_SYS (fmal, long double, |
1003 | (long double x, long double y, long double z)); | |
c0c3707f | 1004 | # endif |
88b48903 WN |
1005 | # endif |
1006 | _GL_CXXALIAS_SYS (fmal, long double, | |
1007 | (long double x, long double y, long double z)); | |
1008 | # endif | |
1009 | _GL_CXXALIASWARN (fmal); | |
1010 | #elif defined GNULIB_POSIXCHECK | |
1011 | # undef fmal | |
1012 | # if HAVE_RAW_DECL_FMAL | |
1013 | _GL_WARN_ON_USE (fmal, "fmal is unportable - " | |
1014 | "use gnulib module fmal for portability"); | |
1015 | # endif | |
1016 | #endif | |
1017 | ||
1018 | ||
1019 | #if @GNULIB_FMODF@ | |
1020 | # if @REPLACE_FMODF@ | |
1021 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1022 | # undef fmodf | |
1023 | # define fmodf rpl_fmodf | |
1024 | # endif | |
1025 | _GL_FUNCDECL_RPL (fmodf, float, (float x, float y)); | |
1026 | _GL_CXXALIAS_RPL (fmodf, float, (float x, float y)); | |
1027 | # else | |
1028 | # if !@HAVE_FMODF@ | |
1029 | # undef fmodf | |
1030 | _GL_FUNCDECL_SYS (fmodf, float, (float x, float y)); | |
1031 | # endif | |
1032 | _GL_CXXALIAS_SYS (fmodf, float, (float x, float y)); | |
1033 | # endif | |
1034 | _GL_CXXALIASWARN (fmodf); | |
1035 | #elif defined GNULIB_POSIXCHECK | |
1036 | # undef fmodf | |
1037 | # if HAVE_RAW_DECL_FMODF | |
1038 | _GL_WARN_ON_USE (fmodf, "fmodf is unportable - " | |
1039 | "use gnulib module fmodf for portability"); | |
1040 | # endif | |
1041 | #endif | |
1042 | ||
1043 | #if @GNULIB_FMOD@ | |
1044 | # if @REPLACE_FMOD@ | |
1045 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1046 | # undef fmod | |
1047 | # define fmod rpl_fmod | |
1048 | # endif | |
1049 | _GL_FUNCDECL_RPL (fmod, double, (double x, double y)); | |
1050 | _GL_CXXALIAS_RPL (fmod, double, (double x, double y)); | |
1051 | # else | |
1052 | _GL_CXXALIAS_SYS (fmod, double, (double x, double y)); | |
1053 | # endif | |
c0c3707f | 1054 | # if __GLIBC__ >= 2 |
9c9d63b1 | 1055 | _GL_CXXALIASWARN1 (fmod, double, (double x, double y)); |
c0c3707f | 1056 | # endif |
88b48903 WN |
1057 | #elif defined GNULIB_POSIXCHECK |
1058 | # undef fmod | |
1059 | # if HAVE_RAW_DECL_FMOD | |
1060 | _GL_WARN_ON_USE (fmod, "fmod has portability problems - " | |
1061 | "use gnulib module fmod for portability"); | |
1062 | # endif | |
1063 | #endif | |
1064 | ||
1065 | #if @GNULIB_FMODL@ | |
1066 | # if @REPLACE_FMODL@ | |
1067 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1068 | # undef fmodl | |
1069 | # define fmodl rpl_fmodl | |
1070 | # endif | |
1071 | _GL_FUNCDECL_RPL (fmodl, long double, (long double x, long double y)); | |
1072 | _GL_CXXALIAS_RPL (fmodl, long double, (long double x, long double y)); | |
1073 | # else | |
1074 | # if !@HAVE_FMODL@ | |
1075 | # undef fmodl | |
1076 | _GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y)); | |
1077 | # endif | |
1078 | _GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y)); | |
1079 | # endif | |
9c9d63b1 | 1080 | # if __GLIBC__ >= 2 |
88b48903 | 1081 | _GL_CXXALIASWARN (fmodl); |
9c9d63b1 | 1082 | # endif |
88b48903 WN |
1083 | #elif defined GNULIB_POSIXCHECK |
1084 | # undef fmodl | |
1085 | # if HAVE_RAW_DECL_FMODL | |
1086 | _GL_WARN_ON_USE (fmodl, "fmodl is unportable - " | |
1087 | "use gnulib module fmodl for portability"); | |
1088 | # endif | |
1089 | #endif | |
1090 | ||
1091 | ||
1092 | /* Write x as | |
1093 | x = mantissa * 2^exp | |
1094 | where | |
1095 | If x finite and nonzero: 0.5 <= |mantissa| < 1.0. | |
1096 | If x is zero: mantissa = x, exp = 0. | |
1097 | If x is infinite or NaN: mantissa = x, exp unspecified. | |
1098 | Store exp in *EXPPTR and return mantissa. */ | |
1099 | #if @GNULIB_FREXPF@ | |
1100 | # if @REPLACE_FREXPF@ | |
1101 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1102 | # undef frexpf | |
1103 | # define frexpf rpl_frexpf | |
1104 | # endif | |
1105 | _GL_FUNCDECL_RPL (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); | |
1106 | _GL_CXXALIAS_RPL (frexpf, float, (float x, int *expptr)); | |
1107 | # else | |
1108 | # if !@HAVE_FREXPF@ | |
1109 | # undef frexpf | |
1110 | _GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); | |
1111 | # endif | |
1112 | _GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr)); | |
1113 | # endif | |
9c9d63b1 | 1114 | # if __GLIBC__ >= 2 |
88b48903 | 1115 | _GL_CXXALIASWARN (frexpf); |
9c9d63b1 | 1116 | # endif |
88b48903 WN |
1117 | #elif defined GNULIB_POSIXCHECK |
1118 | # undef frexpf | |
1119 | # if HAVE_RAW_DECL_FREXPF | |
1120 | _GL_WARN_ON_USE (frexpf, "frexpf is unportable - " | |
1121 | "use gnulib module frexpf for portability"); | |
1122 | # endif | |
1123 | #endif | |
1124 | ||
1125 | /* Write x as | |
1126 | x = mantissa * 2^exp | |
1127 | where | |
1128 | If x finite and nonzero: 0.5 <= |mantissa| < 1.0. | |
1129 | If x is zero: mantissa = x, exp = 0. | |
1130 | If x is infinite or NaN: mantissa = x, exp unspecified. | |
1131 | Store exp in *EXPPTR and return mantissa. */ | |
1132 | #if @GNULIB_FREXP@ | |
1133 | # if @REPLACE_FREXP@ | |
1134 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
49e4877c | 1135 | # undef frexp |
88b48903 WN |
1136 | # define frexp rpl_frexp |
1137 | # endif | |
1138 | _GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2))); | |
1139 | _GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr)); | |
1140 | # else | |
1141 | _GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr)); | |
1142 | # endif | |
c0c3707f | 1143 | # if __GLIBC__ >= 2 |
4c62b19f | 1144 | _GL_CXXALIASWARN1 (frexp, double, (double x, int *expptr)); |
c0c3707f | 1145 | # endif |
88b48903 WN |
1146 | #elif defined GNULIB_POSIXCHECK |
1147 | # undef frexp | |
1148 | /* Assume frexp is always declared. */ | |
1149 | _GL_WARN_ON_USE (frexp, "frexp is unportable - " | |
1150 | "use gnulib module frexp for portability"); | |
1151 | #endif | |
1152 | ||
1153 | /* Write x as | |
1154 | x = mantissa * 2^exp | |
1155 | where | |
1156 | If x finite and nonzero: 0.5 <= |mantissa| < 1.0. | |
1157 | If x is zero: mantissa = x, exp = 0. | |
1158 | If x is infinite or NaN: mantissa = x, exp unspecified. | |
1159 | Store exp in *EXPPTR and return mantissa. */ | |
1160 | #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@ | |
1161 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1162 | # undef frexpl | |
1163 | # define frexpl rpl_frexpl | |
1164 | # endif | |
1165 | _GL_FUNCDECL_RPL (frexpl, long double, | |
1166 | (long double x, int *expptr) _GL_ARG_NONNULL ((2))); | |
1167 | _GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr)); | |
1168 | #else | |
1169 | # if !@HAVE_DECL_FREXPL@ | |
1170 | _GL_FUNCDECL_SYS (frexpl, long double, | |
1171 | (long double x, int *expptr) _GL_ARG_NONNULL ((2))); | |
1172 | # endif | |
1173 | # if @GNULIB_FREXPL@ | |
1174 | _GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr)); | |
1175 | # endif | |
1176 | #endif | |
1177 | #if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@) | |
9c9d63b1 | 1178 | # if __GLIBC__ >= 2 |
88b48903 | 1179 | _GL_CXXALIASWARN (frexpl); |
9c9d63b1 | 1180 | # endif |
88b48903 WN |
1181 | #endif |
1182 | #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK | |
1183 | # undef frexpl | |
1184 | # if HAVE_RAW_DECL_FREXPL | |
1185 | _GL_WARN_ON_USE (frexpl, "frexpl is unportable - " | |
1186 | "use gnulib module frexpl for portability"); | |
1187 | # endif | |
1188 | #endif | |
1189 | ||
1190 | ||
1191 | /* Return sqrt(x^2+y^2). */ | |
1192 | #if @GNULIB_HYPOTF@ | |
1193 | # if @REPLACE_HYPOTF@ | |
1194 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1195 | # undef hypotf | |
1196 | # define hypotf rpl_hypotf | |
1197 | # endif | |
1198 | _GL_FUNCDECL_RPL (hypotf, float, (float x, float y)); | |
1199 | _GL_CXXALIAS_RPL (hypotf, float, (float x, float y)); | |
1200 | # else | |
1201 | # if !@HAVE_HYPOTF@ | |
1202 | _GL_FUNCDECL_SYS (hypotf, float, (float x, float y)); | |
1203 | # endif | |
1204 | _GL_CXXALIAS_SYS (hypotf, float, (float x, float y)); | |
1205 | # endif | |
9c9d63b1 | 1206 | # if __GLIBC__ >= 2 |
88b48903 | 1207 | _GL_CXXALIASWARN (hypotf); |
9c9d63b1 | 1208 | # endif |
88b48903 WN |
1209 | #elif defined GNULIB_POSIXCHECK |
1210 | # undef hypotf | |
1211 | # if HAVE_RAW_DECL_HYPOTF | |
1212 | _GL_WARN_ON_USE (hypotf, "hypotf is unportable - " | |
1213 | "use gnulib module hypotf for portability"); | |
1214 | # endif | |
1215 | #endif | |
1216 | ||
1217 | /* Return sqrt(x^2+y^2). */ | |
1218 | #if @GNULIB_HYPOT@ | |
1219 | # if @REPLACE_HYPOT@ | |
1220 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1221 | # undef hypot | |
1222 | # define hypot rpl_hypot | |
1223 | # endif | |
1224 | _GL_FUNCDECL_RPL (hypot, double, (double x, double y)); | |
1225 | _GL_CXXALIAS_RPL (hypot, double, (double x, double y)); | |
1226 | # else | |
1227 | _GL_CXXALIAS_SYS (hypot, double, (double x, double y)); | |
1228 | # endif | |
c0c3707f | 1229 | # if __GLIBC__ >= 2 |
9c9d63b1 | 1230 | _GL_CXXALIASWARN1 (hypot, double, (double x, double y)); |
c0c3707f | 1231 | # endif |
88b48903 WN |
1232 | #elif defined GNULIB_POSIXCHECK |
1233 | # undef hypot | |
1234 | # if HAVE_RAW_DECL_HYPOT | |
1235 | _GL_WARN_ON_USE (hypotf, "hypot has portability problems - " | |
1236 | "use gnulib module hypot for portability"); | |
1237 | # endif | |
1238 | #endif | |
1239 | ||
1240 | /* Return sqrt(x^2+y^2). */ | |
1241 | #if @GNULIB_HYPOTL@ | |
1242 | # if @REPLACE_HYPOTL@ | |
1243 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1244 | # undef hypotl | |
1245 | # define hypotl rpl_hypotl | |
1246 | # endif | |
1247 | _GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y)); | |
1248 | _GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y)); | |
1249 | # else | |
1250 | # if !@HAVE_HYPOTL@ | |
1251 | _GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y)); | |
1252 | # endif | |
1253 | _GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y)); | |
1254 | # endif | |
9c9d63b1 | 1255 | # if __GLIBC__ >= 2 |
88b48903 | 1256 | _GL_CXXALIASWARN (hypotl); |
9c9d63b1 | 1257 | # endif |
88b48903 WN |
1258 | #elif defined GNULIB_POSIXCHECK |
1259 | # undef hypotl | |
1260 | # if HAVE_RAW_DECL_HYPOTL | |
1261 | _GL_WARN_ON_USE (hypotl, "hypotl is unportable - " | |
1262 | "use gnulib module hypotl for portability"); | |
1263 | # endif | |
1264 | #endif | |
1265 | ||
1266 | ||
1267 | #if @GNULIB_ILOGBF@ | |
1268 | # if @REPLACE_ILOGBF@ | |
1269 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1270 | # undef ilogbf | |
1271 | # define ilogbf rpl_ilogbf | |
1272 | # endif | |
1273 | _GL_FUNCDECL_RPL (ilogbf, int, (float x)); | |
1274 | _GL_CXXALIAS_RPL (ilogbf, int, (float x)); | |
1275 | # else | |
1276 | # if !@HAVE_ILOGBF@ | |
1277 | _GL_FUNCDECL_SYS (ilogbf, int, (float x)); | |
1278 | # endif | |
1279 | _GL_CXXALIAS_SYS (ilogbf, int, (float x)); | |
1280 | # endif | |
1281 | _GL_CXXALIASWARN (ilogbf); | |
1282 | #elif defined GNULIB_POSIXCHECK | |
1283 | # undef ilogbf | |
1284 | # if HAVE_RAW_DECL_ILOGBF | |
1285 | _GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - " | |
1286 | "use gnulib module ilogbf for portability"); | |
1287 | # endif | |
1288 | #endif | |
1289 | ||
1290 | #if @GNULIB_ILOGB@ | |
1291 | # if @REPLACE_ILOGB@ | |
1292 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1293 | # undef ilogb | |
1294 | # define ilogb rpl_ilogb | |
1295 | # endif | |
1296 | _GL_FUNCDECL_RPL (ilogb, int, (double x)); | |
1297 | _GL_CXXALIAS_RPL (ilogb, int, (double x)); | |
1298 | # else | |
1299 | # if !@HAVE_ILOGB@ | |
1300 | _GL_FUNCDECL_SYS (ilogb, int, (double x)); | |
1301 | # endif | |
1302 | _GL_CXXALIAS_SYS (ilogb, int, (double x)); | |
1303 | # endif | |
c0c3707f | 1304 | # if __GLIBC__ >= 2 |
9c9d63b1 | 1305 | _GL_CXXALIASWARN1 (ilogb, int, (double x)); |
c0c3707f | 1306 | # endif |
88b48903 WN |
1307 | #elif defined GNULIB_POSIXCHECK |
1308 | # undef ilogb | |
1309 | # if HAVE_RAW_DECL_ILOGB | |
1310 | _GL_WARN_ON_USE (ilogb, "ilogb is unportable - " | |
1311 | "use gnulib module ilogb for portability"); | |
1312 | # endif | |
1313 | #endif | |
1314 | ||
1315 | #if @GNULIB_ILOGBL@ | |
c0c3707f CB |
1316 | # if @REPLACE_ILOGBL@ |
1317 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1318 | # undef ilogbl | |
1319 | # define ilogbl rpl_ilogbl | |
1320 | # endif | |
1321 | _GL_FUNCDECL_RPL (ilogbl, int, (long double x)); | |
1322 | _GL_CXXALIAS_RPL (ilogbl, int, (long double x)); | |
1323 | # else | |
1324 | # if !@HAVE_ILOGBL@ | |
88b48903 | 1325 | _GL_FUNCDECL_SYS (ilogbl, int, (long double x)); |
c0c3707f | 1326 | # endif |
5e8754f9 | 1327 | _GL_CXXALIAS_SYS (ilogbl, int, (long double x)); |
c0c3707f | 1328 | # endif |
88b48903 WN |
1329 | _GL_CXXALIASWARN (ilogbl); |
1330 | #elif defined GNULIB_POSIXCHECK | |
1331 | # undef ilogbl | |
1332 | # if HAVE_RAW_DECL_ILOGBL | |
1333 | _GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " | |
1334 | "use gnulib module ilogbl for portability"); | |
1335 | # endif | |
1336 | #endif | |
1337 | ||
1338 | ||
9c9d63b1 PM |
1339 | #if @GNULIB_MDA_J0@ |
1340 | /* On native Windows, map 'j0' to '_j0', so that -loldnames is not | |
1341 | required. In C++ with GNULIB_NAMESPACE, avoid differences between | |
1342 | platforms by defining GNULIB_NAMESPACE::j0 always. */ | |
1343 | # if defined _WIN32 && !defined __CYGWIN__ | |
1344 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1345 | # undef j0 | |
1346 | # define j0 _j0 | |
1347 | # endif | |
1348 | _GL_CXXALIAS_MDA (j0, double, (double x)); | |
1349 | # else | |
1350 | _GL_CXXALIAS_SYS (j0, double, (double x)); | |
1351 | # endif | |
1352 | _GL_CXXALIASWARN (j0); | |
1353 | #endif | |
1354 | ||
1355 | #if @GNULIB_MDA_J1@ | |
1356 | /* On native Windows, map 'j1' to '_j1', so that -loldnames is not | |
1357 | required. In C++ with GNULIB_NAMESPACE, avoid differences between | |
1358 | platforms by defining GNULIB_NAMESPACE::j1 always. */ | |
1359 | # if defined _WIN32 && !defined __CYGWIN__ | |
1360 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1361 | # undef j1 | |
1362 | # define j1 _j1 | |
1363 | # endif | |
1364 | _GL_CXXALIAS_MDA (j1, double, (double x)); | |
1365 | # else | |
1366 | _GL_CXXALIAS_SYS (j1, double, (double x)); | |
1367 | # endif | |
1368 | _GL_CXXALIASWARN (j1); | |
1369 | #endif | |
1370 | ||
1371 | #if @GNULIB_MDA_JN@ | |
1372 | /* On native Windows, map 'jn' to '_jn', so that -loldnames is not | |
1373 | required. In C++ with GNULIB_NAMESPACE, avoid differences between | |
1374 | platforms by defining GNULIB_NAMESPACE::jn always. */ | |
1375 | # if defined _WIN32 && !defined __CYGWIN__ | |
1376 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1377 | # undef jn | |
1378 | # define jn _jn | |
1379 | # endif | |
1380 | _GL_CXXALIAS_MDA (jn, double, (int n, double x)); | |
1381 | # else | |
1382 | _GL_CXXALIAS_SYS (jn, double, (int n, double x)); | |
1383 | # endif | |
1384 | _GL_CXXALIASWARN (jn); | |
1385 | #endif | |
1386 | ||
1387 | ||
88b48903 WN |
1388 | /* Return x * 2^exp. */ |
1389 | #if @GNULIB_LDEXPF@ | |
1390 | # if !@HAVE_LDEXPF@ | |
1391 | # undef ldexpf | |
1392 | _GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp)); | |
1393 | # endif | |
1394 | _GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp)); | |
9c9d63b1 | 1395 | # if __GLIBC__ >= 2 |
88b48903 | 1396 | _GL_CXXALIASWARN (ldexpf); |
9c9d63b1 | 1397 | # endif |
88b48903 WN |
1398 | #elif defined GNULIB_POSIXCHECK |
1399 | # undef ldexpf | |
1400 | # if HAVE_RAW_DECL_LDEXPF | |
1401 | _GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " | |
1402 | "use gnulib module ldexpf for portability"); | |
1403 | # endif | |
1404 | #endif | |
1405 | ||
1406 | /* Return x * 2^exp. */ | |
1407 | #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@ | |
1408 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1409 | # undef ldexpl | |
1410 | # define ldexpl rpl_ldexpl | |
1411 | # endif | |
1412 | _GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp)); | |
1413 | _GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp)); | |
1414 | #else | |
1415 | # if !@HAVE_DECL_LDEXPL@ | |
1416 | _GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp)); | |
1417 | # endif | |
1418 | # if @GNULIB_LDEXPL@ | |
1419 | _GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp)); | |
1420 | # endif | |
1421 | #endif | |
1422 | #if @GNULIB_LDEXPL@ | |
9c9d63b1 | 1423 | # if __GLIBC__ >= 2 |
88b48903 | 1424 | _GL_CXXALIASWARN (ldexpl); |
9c9d63b1 | 1425 | # endif |
88b48903 WN |
1426 | #endif |
1427 | #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK | |
1428 | # undef ldexpl | |
1429 | # if HAVE_RAW_DECL_LDEXPL | |
1430 | _GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " | |
1431 | "use gnulib module ldexpl for portability"); | |
1432 | # endif | |
1433 | #endif | |
1434 | ||
1435 | ||
1436 | #if @GNULIB_LOGF@ | |
1437 | # if @REPLACE_LOGF@ | |
1438 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1439 | # undef logf | |
1440 | # define logf rpl_logf | |
1441 | # endif | |
1442 | _GL_FUNCDECL_RPL (logf, float, (float x)); | |
1443 | _GL_CXXALIAS_RPL (logf, float, (float x)); | |
1444 | # else | |
1445 | # if !@HAVE_LOGF@ | |
1446 | # undef logf | |
1447 | _GL_FUNCDECL_SYS (logf, float, (float x)); | |
1448 | # endif | |
1449 | _GL_CXXALIAS_SYS (logf, float, (float x)); | |
1450 | # endif | |
1451 | _GL_CXXALIASWARN (logf); | |
1452 | #elif defined GNULIB_POSIXCHECK | |
1453 | # undef logf | |
1454 | # if HAVE_RAW_DECL_LOGF | |
1455 | _GL_WARN_ON_USE (logf, "logf is unportable - " | |
1456 | "use gnulib module logf for portability"); | |
1457 | # endif | |
1458 | #endif | |
1459 | ||
1460 | #if @GNULIB_LOG@ | |
1461 | # if @REPLACE_LOG@ | |
1462 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1463 | # undef log | |
1464 | # define log rpl_log | |
1465 | # endif | |
1466 | _GL_FUNCDECL_RPL (log, double, (double x)); | |
1467 | _GL_CXXALIAS_RPL (log, double, (double x)); | |
1468 | # else | |
1469 | _GL_CXXALIAS_SYS (log, double, (double x)); | |
1470 | # endif | |
c0c3707f | 1471 | # if __GLIBC__ >= 2 |
9c9d63b1 | 1472 | _GL_CXXALIASWARN1 (log, double, (double x)); |
c0c3707f | 1473 | # endif |
88b48903 WN |
1474 | #elif defined GNULIB_POSIXCHECK |
1475 | # undef log | |
1476 | # if HAVE_RAW_DECL_LOG | |
1477 | _GL_WARN_ON_USE (log, "log has portability problems - " | |
1478 | "use gnulib module log for portability"); | |
1479 | # endif | |
1480 | #endif | |
1481 | ||
1482 | #if @GNULIB_LOGL@ | |
1483 | # if @REPLACE_LOGL@ | |
1484 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1485 | # undef logl | |
1486 | # define logl rpl_logl | |
1487 | # endif | |
1488 | _GL_FUNCDECL_RPL (logl, long double, (long double x)); | |
1489 | _GL_CXXALIAS_RPL (logl, long double, (long double x)); | |
1490 | # else | |
1491 | # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@ | |
1492 | # undef logl | |
1493 | _GL_FUNCDECL_SYS (logl, long double, (long double x)); | |
1494 | # endif | |
1495 | _GL_CXXALIAS_SYS (logl, long double, (long double x)); | |
1496 | # endif | |
9c9d63b1 | 1497 | # if __GLIBC__ >= 2 |
88b48903 | 1498 | _GL_CXXALIASWARN (logl); |
9c9d63b1 | 1499 | # endif |
88b48903 WN |
1500 | #elif defined GNULIB_POSIXCHECK |
1501 | # undef logl | |
1502 | # if HAVE_RAW_DECL_LOGL | |
1503 | _GL_WARN_ON_USE (logl, "logl is unportable - " | |
1504 | "use gnulib module logl for portability"); | |
1505 | # endif | |
1506 | #endif | |
1507 | ||
1508 | ||
1509 | #if @GNULIB_LOG10F@ | |
1510 | # if @REPLACE_LOG10F@ | |
1511 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1512 | # undef log10f | |
1513 | # define log10f rpl_log10f | |
1514 | # endif | |
1515 | _GL_FUNCDECL_RPL (log10f, float, (float x)); | |
1516 | _GL_CXXALIAS_RPL (log10f, float, (float x)); | |
1517 | # else | |
1518 | # if !@HAVE_LOG10F@ | |
1519 | # undef log10f | |
1520 | _GL_FUNCDECL_SYS (log10f, float, (float x)); | |
1521 | # endif | |
1522 | _GL_CXXALIAS_SYS (log10f, float, (float x)); | |
1523 | # endif | |
1524 | _GL_CXXALIASWARN (log10f); | |
1525 | #elif defined GNULIB_POSIXCHECK | |
1526 | # undef log10f | |
1527 | # if HAVE_RAW_DECL_LOG10F | |
1528 | _GL_WARN_ON_USE (log10f, "log10f is unportable - " | |
1529 | "use gnulib module log10f for portability"); | |
1530 | # endif | |
1531 | #endif | |
1532 | ||
1533 | #if @GNULIB_LOG10@ | |
1534 | # if @REPLACE_LOG10@ | |
1535 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1536 | # undef log10 | |
1537 | # define log10 rpl_log10 | |
1538 | # endif | |
1539 | _GL_FUNCDECL_RPL (log10, double, (double x)); | |
1540 | _GL_CXXALIAS_RPL (log10, double, (double x)); | |
1541 | # else | |
1542 | _GL_CXXALIAS_SYS (log10, double, (double x)); | |
1543 | # endif | |
c0c3707f | 1544 | # if __GLIBC__ >= 2 |
9c9d63b1 | 1545 | _GL_CXXALIASWARN1 (log10, double, (double x)); |
c0c3707f | 1546 | # endif |
88b48903 WN |
1547 | #elif defined GNULIB_POSIXCHECK |
1548 | # undef log10 | |
1549 | # if HAVE_RAW_DECL_LOG10 | |
1550 | _GL_WARN_ON_USE (log10, "log10 has portability problems - " | |
1551 | "use gnulib module log10 for portability"); | |
1552 | # endif | |
1553 | #endif | |
1554 | ||
1555 | #if @GNULIB_LOG10L@ | |
1556 | # if @REPLACE_LOG10L@ | |
1557 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1558 | # undef log10l | |
1559 | # define log10l rpl_log10l | |
1560 | # endif | |
1561 | _GL_FUNCDECL_RPL (log10l, long double, (long double x)); | |
1562 | _GL_CXXALIAS_RPL (log10l, long double, (long double x)); | |
1563 | # else | |
1564 | # if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@ | |
1565 | # undef log10l | |
1566 | _GL_FUNCDECL_SYS (log10l, long double, (long double x)); | |
1567 | # endif | |
1568 | _GL_CXXALIAS_SYS (log10l, long double, (long double x)); | |
1569 | # endif | |
9c9d63b1 | 1570 | # if __GLIBC__ >= 2 |
88b48903 | 1571 | _GL_CXXALIASWARN (log10l); |
9c9d63b1 | 1572 | # endif |
88b48903 WN |
1573 | #elif defined GNULIB_POSIXCHECK |
1574 | # undef log10l | |
1575 | # if HAVE_RAW_DECL_LOG10L | |
1576 | _GL_WARN_ON_USE (log10l, "log10l is unportable - " | |
1577 | "use gnulib module log10l for portability"); | |
1578 | # endif | |
1579 | #endif | |
1580 | ||
1581 | ||
1582 | #if @GNULIB_LOG1PF@ | |
1583 | # if @REPLACE_LOG1PF@ | |
1584 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1585 | # undef log1pf | |
1586 | # define log1pf rpl_log1pf | |
1587 | # endif | |
1588 | _GL_FUNCDECL_RPL (log1pf, float, (float x)); | |
1589 | _GL_CXXALIAS_RPL (log1pf, float, (float x)); | |
1590 | # else | |
1591 | # if !@HAVE_LOG1PF@ | |
1592 | _GL_FUNCDECL_SYS (log1pf, float, (float x)); | |
1593 | # endif | |
1594 | _GL_CXXALIAS_SYS (log1pf, float, (float x)); | |
1595 | # endif | |
1596 | _GL_CXXALIASWARN (log1pf); | |
1597 | #elif defined GNULIB_POSIXCHECK | |
1598 | # undef log1pf | |
1599 | # if HAVE_RAW_DECL_LOG1PF | |
1600 | _GL_WARN_ON_USE (log1pf, "log1pf is unportable - " | |
1601 | "use gnulib module log1pf for portability"); | |
1602 | # endif | |
1603 | #endif | |
1604 | ||
1605 | #if @GNULIB_LOG1P@ | |
1606 | # if @REPLACE_LOG1P@ | |
1607 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1608 | # undef log1p | |
1609 | # define log1p rpl_log1p | |
1610 | # endif | |
1611 | _GL_FUNCDECL_RPL (log1p, double, (double x)); | |
1612 | _GL_CXXALIAS_RPL (log1p, double, (double x)); | |
1613 | # else | |
1614 | # if !@HAVE_LOG1P@ | |
1615 | _GL_FUNCDECL_SYS (log1p, double, (double x)); | |
1616 | # endif | |
1617 | _GL_CXXALIAS_SYS (log1p, double, (double x)); | |
1618 | # endif | |
c0c3707f | 1619 | # if __GLIBC__ >= 2 |
9c9d63b1 | 1620 | _GL_CXXALIASWARN1 (log1p, double, (double x)); |
c0c3707f | 1621 | # endif |
88b48903 WN |
1622 | #elif defined GNULIB_POSIXCHECK |
1623 | # undef log1p | |
1624 | # if HAVE_RAW_DECL_LOG1P | |
1625 | _GL_WARN_ON_USE (log1p, "log1p has portability problems - " | |
1626 | "use gnulib module log1p for portability"); | |
1627 | # endif | |
1628 | #endif | |
1629 | ||
1630 | #if @GNULIB_LOG1PL@ | |
1631 | # if @REPLACE_LOG1PL@ | |
1632 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1633 | # undef log1pl | |
1634 | # define log1pl rpl_log1pl | |
1635 | # endif | |
1636 | _GL_FUNCDECL_RPL (log1pl, long double, (long double x)); | |
1637 | _GL_CXXALIAS_RPL (log1pl, long double, (long double x)); | |
1638 | # else | |
1639 | # if !@HAVE_LOG1PL@ | |
1640 | _GL_FUNCDECL_SYS (log1pl, long double, (long double x)); | |
1641 | # endif | |
1642 | _GL_CXXALIAS_SYS (log1pl, long double, (long double x)); | |
1643 | # endif | |
1644 | _GL_CXXALIASWARN (log1pl); | |
1645 | #elif defined GNULIB_POSIXCHECK | |
1646 | # undef log1pl | |
1647 | # if HAVE_RAW_DECL_LOG1PL | |
1648 | _GL_WARN_ON_USE (log1pl, "log1pl has portability problems - " | |
1649 | "use gnulib module log1pl for portability"); | |
1650 | # endif | |
1651 | #endif | |
1652 | ||
1653 | ||
1654 | #if @GNULIB_LOG2F@ | |
1655 | # if @REPLACE_LOG2F@ | |
1656 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1657 | # undef log2f | |
1658 | # define log2f rpl_log2f | |
1659 | # endif | |
1660 | _GL_FUNCDECL_RPL (log2f, float, (float x)); | |
1661 | _GL_CXXALIAS_RPL (log2f, float, (float x)); | |
1662 | # else | |
1663 | # if !@HAVE_DECL_LOG2F@ | |
1664 | # undef log2f | |
1665 | _GL_FUNCDECL_SYS (log2f, float, (float x)); | |
1666 | # endif | |
1667 | _GL_CXXALIAS_SYS (log2f, float, (float x)); | |
1668 | # endif | |
1669 | _GL_CXXALIASWARN (log2f); | |
1670 | #elif defined GNULIB_POSIXCHECK | |
1671 | # undef log2f | |
1672 | # if HAVE_RAW_DECL_LOG2F | |
1673 | _GL_WARN_ON_USE (log2f, "log2f is unportable - " | |
1674 | "use gnulib module log2f for portability"); | |
1675 | # endif | |
1676 | #endif | |
1677 | ||
1678 | #if @GNULIB_LOG2@ | |
1679 | # if @REPLACE_LOG2@ | |
1680 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1681 | # undef log2 | |
1682 | # define log2 rpl_log2 | |
1683 | # endif | |
1684 | _GL_FUNCDECL_RPL (log2, double, (double x)); | |
1685 | _GL_CXXALIAS_RPL (log2, double, (double x)); | |
1686 | # else | |
1687 | # if !@HAVE_DECL_LOG2@ | |
1688 | # undef log2 | |
1689 | _GL_FUNCDECL_SYS (log2, double, (double x)); | |
1690 | # endif | |
1691 | _GL_CXXALIAS_SYS (log2, double, (double x)); | |
1692 | # endif | |
c0c3707f | 1693 | # if __GLIBC__ >= 2 |
9c9d63b1 | 1694 | _GL_CXXALIASWARN1 (log2, double, (double x)); |
c0c3707f | 1695 | # endif |
88b48903 WN |
1696 | #elif defined GNULIB_POSIXCHECK |
1697 | # undef log2 | |
1698 | # if HAVE_RAW_DECL_LOG2 | |
1699 | _GL_WARN_ON_USE (log2, "log2 is unportable - " | |
1700 | "use gnulib module log2 for portability"); | |
1701 | # endif | |
1702 | #endif | |
1703 | ||
1704 | #if @GNULIB_LOG2L@ | |
1705 | # if @REPLACE_LOG2L@ | |
1706 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1707 | # undef log2l | |
1708 | # define log2l rpl_log2l | |
1709 | # endif | |
1710 | _GL_FUNCDECL_RPL (log2l, long double, (long double x)); | |
1711 | _GL_CXXALIAS_RPL (log2l, long double, (long double x)); | |
1712 | # else | |
1713 | # if !@HAVE_DECL_LOG2L@ | |
1714 | _GL_FUNCDECL_SYS (log2l, long double, (long double x)); | |
1715 | # endif | |
1716 | _GL_CXXALIAS_SYS (log2l, long double, (long double x)); | |
1717 | # endif | |
1718 | _GL_CXXALIASWARN (log2l); | |
1719 | #elif defined GNULIB_POSIXCHECK | |
1720 | # undef log2l | |
1721 | # if HAVE_RAW_DECL_LOG2L | |
1722 | _GL_WARN_ON_USE (log2l, "log2l is unportable - " | |
1723 | "use gnulib module log2l for portability"); | |
1724 | # endif | |
1725 | #endif | |
1726 | ||
1727 | ||
1728 | #if @GNULIB_LOGBF@ | |
1729 | # if @REPLACE_LOGBF@ | |
1730 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1731 | # undef logbf | |
1732 | # define logbf rpl_logbf | |
1733 | # endif | |
1734 | _GL_FUNCDECL_RPL (logbf, float, (float x)); | |
1735 | _GL_CXXALIAS_RPL (logbf, float, (float x)); | |
1736 | # else | |
1737 | # if !@HAVE_LOGBF@ | |
1738 | _GL_FUNCDECL_SYS (logbf, float, (float x)); | |
1739 | # endif | |
1740 | _GL_CXXALIAS_SYS (logbf, float, (float x)); | |
1741 | # endif | |
1742 | _GL_CXXALIASWARN (logbf); | |
1743 | #elif defined GNULIB_POSIXCHECK | |
1744 | # undef logbf | |
1745 | # if HAVE_RAW_DECL_LOGBF | |
1746 | _GL_WARN_ON_USE (logbf, "logbf is unportable - " | |
1747 | "use gnulib module logbf for portability"); | |
1748 | # endif | |
1749 | #endif | |
1750 | ||
1751 | #if @GNULIB_LOGB@ | |
1752 | # if @REPLACE_LOGB@ | |
1753 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1754 | # undef logb | |
1755 | # define logb rpl_logb | |
1756 | # endif | |
1757 | _GL_FUNCDECL_RPL (logb, double, (double x)); | |
1758 | _GL_CXXALIAS_RPL (logb, double, (double x)); | |
1759 | # else | |
1760 | # if !@HAVE_DECL_LOGB@ | |
1761 | _GL_FUNCDECL_SYS (logb, double, (double x)); | |
1762 | # endif | |
1763 | _GL_CXXALIAS_SYS (logb, double, (double x)); | |
1764 | # endif | |
c0c3707f | 1765 | # if __GLIBC__ >= 2 |
9c9d63b1 | 1766 | _GL_CXXALIASWARN1 (logb, double, (double x)); |
c0c3707f | 1767 | # endif |
88b48903 WN |
1768 | #elif defined GNULIB_POSIXCHECK |
1769 | # undef logb | |
1770 | # if HAVE_RAW_DECL_LOGB | |
1771 | _GL_WARN_ON_USE (logb, "logb is unportable - " | |
1772 | "use gnulib module logb for portability"); | |
1773 | # endif | |
1774 | #endif | |
1775 | ||
1776 | #if @GNULIB_LOGBL@ | |
1777 | # if @REPLACE_LOGBL@ | |
1778 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1779 | # undef logbl | |
1780 | # define logbl rpl_logbl | |
1781 | # endif | |
1782 | _GL_FUNCDECL_RPL (logbl, long double, (long double x)); | |
1783 | _GL_CXXALIAS_RPL (logbl, long double, (long double x)); | |
1784 | # else | |
1785 | # if !@HAVE_LOGBL@ | |
1786 | _GL_FUNCDECL_SYS (logbl, long double, (long double x)); | |
1787 | # endif | |
1788 | _GL_CXXALIAS_SYS (logbl, long double, (long double x)); | |
1789 | # endif | |
1790 | _GL_CXXALIASWARN (logbl); | |
1791 | #elif defined GNULIB_POSIXCHECK | |
1792 | # undef logbl | |
1793 | # if HAVE_RAW_DECL_LOGBL | |
1794 | _GL_WARN_ON_USE (logbl, "logbl is unportable - " | |
1795 | "use gnulib module logbl for portability"); | |
1796 | # endif | |
1797 | #endif | |
1798 | ||
1799 | ||
1800 | #if @GNULIB_MODFF@ | |
1801 | # if @REPLACE_MODFF@ | |
1802 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1803 | # undef modff | |
1804 | # define modff rpl_modff | |
1805 | # endif | |
1806 | _GL_FUNCDECL_RPL (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); | |
1807 | _GL_CXXALIAS_RPL (modff, float, (float x, float *iptr)); | |
1808 | # else | |
1809 | # if !@HAVE_MODFF@ | |
1810 | # undef modff | |
1811 | _GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); | |
1812 | # endif | |
1813 | _GL_CXXALIAS_SYS (modff, float, (float x, float *iptr)); | |
1814 | # endif | |
1815 | _GL_CXXALIASWARN (modff); | |
1816 | #elif defined GNULIB_POSIXCHECK | |
1817 | # undef modff | |
1818 | # if HAVE_RAW_DECL_MODFF | |
1819 | _GL_WARN_ON_USE (modff, "modff is unportable - " | |
1820 | "use gnulib module modff for portability"); | |
1821 | # endif | |
1822 | #endif | |
1823 | ||
1824 | #if @GNULIB_MODF@ | |
1825 | # if @REPLACE_MODF@ | |
1826 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1827 | # undef modf | |
1828 | # define modf rpl_modf | |
1829 | # endif | |
1830 | _GL_FUNCDECL_RPL (modf, double, (double x, double *iptr) _GL_ARG_NONNULL ((2))); | |
1831 | _GL_CXXALIAS_RPL (modf, double, (double x, double *iptr)); | |
1832 | # else | |
1833 | _GL_CXXALIAS_SYS (modf, double, (double x, double *iptr)); | |
1834 | # endif | |
c0c3707f | 1835 | # if __GLIBC__ >= 2 |
9c9d63b1 | 1836 | _GL_CXXALIASWARN1 (modf, double, (double x, double *iptr)); |
c0c3707f | 1837 | # endif |
88b48903 WN |
1838 | #elif defined GNULIB_POSIXCHECK |
1839 | # undef modf | |
1840 | # if HAVE_RAW_DECL_MODF | |
1841 | _GL_WARN_ON_USE (modf, "modf has portability problems - " | |
1842 | "use gnulib module modf for portability"); | |
1843 | # endif | |
1844 | #endif | |
1845 | ||
1846 | #if @GNULIB_MODFL@ | |
1847 | # if @REPLACE_MODFL@ | |
1848 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1849 | # undef modfl | |
1850 | # define modfl rpl_modfl | |
1851 | # endif | |
1852 | _GL_FUNCDECL_RPL (modfl, long double, (long double x, long double *iptr) | |
1853 | _GL_ARG_NONNULL ((2))); | |
1854 | _GL_CXXALIAS_RPL (modfl, long double, (long double x, long double *iptr)); | |
1855 | # else | |
1856 | # if !@HAVE_MODFL@ | |
1857 | # undef modfl | |
1858 | _GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr) | |
1859 | _GL_ARG_NONNULL ((2))); | |
1860 | # endif | |
1861 | _GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr)); | |
1862 | # endif | |
9c9d63b1 | 1863 | # if __GLIBC__ >= 2 |
88b48903 | 1864 | _GL_CXXALIASWARN (modfl); |
9c9d63b1 | 1865 | # endif |
88b48903 WN |
1866 | #elif defined GNULIB_POSIXCHECK |
1867 | # undef modfl | |
1868 | # if HAVE_RAW_DECL_MODFL | |
1869 | _GL_WARN_ON_USE (modfl, "modfl is unportable - " | |
1870 | "use gnulib module modfl for portability"); | |
1871 | # endif | |
1872 | #endif | |
1873 | ||
1874 | ||
1875 | #if @GNULIB_POWF@ | |
1876 | # if !@HAVE_POWF@ | |
1877 | # undef powf | |
1878 | _GL_FUNCDECL_SYS (powf, float, (float x, float y)); | |
1879 | # endif | |
1880 | _GL_CXXALIAS_SYS (powf, float, (float x, float y)); | |
1881 | _GL_CXXALIASWARN (powf); | |
1882 | #elif defined GNULIB_POSIXCHECK | |
1883 | # undef powf | |
1884 | # if HAVE_RAW_DECL_POWF | |
1885 | _GL_WARN_ON_USE (powf, "powf is unportable - " | |
1886 | "use gnulib module powf for portability"); | |
1887 | # endif | |
1888 | #endif | |
1889 | ||
1890 | ||
1891 | #if @GNULIB_REMAINDERF@ | |
1892 | # if @REPLACE_REMAINDERF@ | |
1893 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1894 | # undef remainderf | |
1895 | # define remainderf rpl_remainderf | |
1896 | # endif | |
1897 | _GL_FUNCDECL_RPL (remainderf, float, (float x, float y)); | |
1898 | _GL_CXXALIAS_RPL (remainderf, float, (float x, float y)); | |
1899 | # else | |
1900 | # if !@HAVE_REMAINDERF@ | |
1901 | _GL_FUNCDECL_SYS (remainderf, float, (float x, float y)); | |
1902 | # endif | |
1903 | _GL_CXXALIAS_SYS (remainderf, float, (float x, float y)); | |
1904 | # endif | |
1905 | _GL_CXXALIASWARN (remainderf); | |
1906 | #elif defined GNULIB_POSIXCHECK | |
1907 | # undef remainderf | |
1908 | # if HAVE_RAW_DECL_REMAINDERF | |
1909 | _GL_WARN_ON_USE (remainderf, "remainderf is unportable - " | |
1910 | "use gnulib module remainderf for portability"); | |
1911 | # endif | |
1912 | #endif | |
1913 | ||
1914 | #if @GNULIB_REMAINDER@ | |
1915 | # if @REPLACE_REMAINDER@ | |
1916 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1917 | # undef remainder | |
1918 | # define remainder rpl_remainder | |
1919 | # endif | |
1920 | _GL_FUNCDECL_RPL (remainder, double, (double x, double y)); | |
1921 | _GL_CXXALIAS_RPL (remainder, double, (double x, double y)); | |
1922 | # else | |
1923 | # if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@ | |
1924 | _GL_FUNCDECL_SYS (remainder, double, (double x, double y)); | |
1925 | # endif | |
1926 | _GL_CXXALIAS_SYS (remainder, double, (double x, double y)); | |
1927 | # endif | |
c0c3707f | 1928 | # if __GLIBC__ >= 2 |
9c9d63b1 | 1929 | _GL_CXXALIASWARN1 (remainder, double, (double x, double y)); |
c0c3707f | 1930 | # endif |
88b48903 WN |
1931 | #elif defined GNULIB_POSIXCHECK |
1932 | # undef remainder | |
1933 | # if HAVE_RAW_DECL_REMAINDER | |
1934 | _GL_WARN_ON_USE (remainder, "remainder is unportable - " | |
1935 | "use gnulib module remainder for portability"); | |
1936 | # endif | |
1937 | #endif | |
1938 | ||
1939 | #if @GNULIB_REMAINDERL@ | |
1940 | # if @REPLACE_REMAINDERL@ | |
1941 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1942 | # undef remainderl | |
1943 | # define remainderl rpl_remainderl | |
1944 | # endif | |
1945 | _GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y)); | |
1946 | _GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y)); | |
1947 | # else | |
1948 | # if !@HAVE_DECL_REMAINDERL@ | |
1949 | # undef remainderl | |
c0c3707f | 1950 | # if !(defined __cplusplus && defined _AIX) |
88b48903 | 1951 | _GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y)); |
c0c3707f | 1952 | # endif |
88b48903 WN |
1953 | # endif |
1954 | _GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y)); | |
1955 | # endif | |
1956 | _GL_CXXALIASWARN (remainderl); | |
1957 | #elif defined GNULIB_POSIXCHECK | |
1958 | # undef remainderl | |
1959 | # if HAVE_RAW_DECL_REMAINDERL | |
1960 | _GL_WARN_ON_USE (remainderl, "remainderl is unportable - " | |
1961 | "use gnulib module remainderl for portability"); | |
1962 | # endif | |
1963 | #endif | |
1964 | ||
1965 | ||
1966 | #if @GNULIB_RINTF@ | |
1967 | # if !@HAVE_DECL_RINTF@ | |
1968 | _GL_FUNCDECL_SYS (rintf, float, (float x)); | |
1969 | # endif | |
1970 | _GL_CXXALIAS_SYS (rintf, float, (float x)); | |
1971 | _GL_CXXALIASWARN (rintf); | |
1972 | #elif defined GNULIB_POSIXCHECK | |
1973 | # undef rintf | |
1974 | # if HAVE_RAW_DECL_RINTF | |
1975 | _GL_WARN_ON_USE (rintf, "rintf is unportable - " | |
1976 | "use gnulib module rintf for portability"); | |
1977 | # endif | |
1978 | #endif | |
1979 | ||
1980 | #if @GNULIB_RINT@ | |
1981 | # if !@HAVE_RINT@ | |
1982 | _GL_FUNCDECL_SYS (rint, double, (double x)); | |
1983 | # endif | |
1984 | _GL_CXXALIAS_SYS (rint, double, (double x)); | |
c0c3707f | 1985 | # if __GLIBC__ >= 2 |
9c9d63b1 | 1986 | _GL_CXXALIASWARN1 (rint, double, (double x)); |
c0c3707f | 1987 | # endif |
88b48903 WN |
1988 | #elif defined GNULIB_POSIXCHECK |
1989 | # undef rint | |
1990 | # if HAVE_RAW_DECL_RINT | |
1991 | _GL_WARN_ON_USE (rint, "rint is unportable - " | |
1992 | "use gnulib module rint for portability"); | |
1993 | # endif | |
1994 | #endif | |
1995 | ||
1996 | #if @GNULIB_RINTL@ | |
c0c3707f CB |
1997 | # if @REPLACE_RINTL@ |
1998 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
1999 | # undef rintl | |
2000 | # define rintl rpl_rintl | |
2001 | # endif | |
2002 | _GL_FUNCDECL_RPL (rintl, long double, (long double x)); | |
2003 | _GL_CXXALIAS_RPL (rintl, long double, (long double x)); | |
2004 | # else | |
2005 | # if !@HAVE_RINTL@ | |
88b48903 | 2006 | _GL_FUNCDECL_SYS (rintl, long double, (long double x)); |
c0c3707f | 2007 | # endif |
88b48903 | 2008 | _GL_CXXALIAS_SYS (rintl, long double, (long double x)); |
c0c3707f | 2009 | # endif |
88b48903 WN |
2010 | _GL_CXXALIASWARN (rintl); |
2011 | #elif defined GNULIB_POSIXCHECK | |
2012 | # undef rintl | |
2013 | # if HAVE_RAW_DECL_RINTL | |
2014 | _GL_WARN_ON_USE (rintl, "rintl is unportable - " | |
2015 | "use gnulib module rintl for portability"); | |
2016 | # endif | |
2017 | #endif | |
2018 | ||
2019 | ||
2020 | #if @GNULIB_ROUNDF@ | |
2021 | # if @REPLACE_ROUNDF@ | |
2022 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2023 | # undef roundf | |
2024 | # define roundf rpl_roundf | |
2025 | # endif | |
2026 | _GL_FUNCDECL_RPL (roundf, float, (float x)); | |
2027 | _GL_CXXALIAS_RPL (roundf, float, (float x)); | |
2028 | # else | |
2029 | # if !@HAVE_DECL_ROUNDF@ | |
2030 | _GL_FUNCDECL_SYS (roundf, float, (float x)); | |
2031 | # endif | |
2032 | _GL_CXXALIAS_SYS (roundf, float, (float x)); | |
2033 | # endif | |
2034 | _GL_CXXALIASWARN (roundf); | |
2035 | #elif defined GNULIB_POSIXCHECK | |
2036 | # undef roundf | |
2037 | # if HAVE_RAW_DECL_ROUNDF | |
2038 | _GL_WARN_ON_USE (roundf, "roundf is unportable - " | |
2039 | "use gnulib module roundf for portability"); | |
2040 | # endif | |
2041 | #endif | |
2042 | ||
2043 | #if @GNULIB_ROUND@ | |
2044 | # if @REPLACE_ROUND@ | |
2045 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2046 | # undef round | |
2047 | # define round rpl_round | |
2048 | # endif | |
2049 | _GL_FUNCDECL_RPL (round, double, (double x)); | |
2050 | _GL_CXXALIAS_RPL (round, double, (double x)); | |
2051 | # else | |
2052 | # if !@HAVE_DECL_ROUND@ | |
2053 | _GL_FUNCDECL_SYS (round, double, (double x)); | |
2054 | # endif | |
2055 | _GL_CXXALIAS_SYS (round, double, (double x)); | |
2056 | # endif | |
c0c3707f | 2057 | # if __GLIBC__ >= 2 |
9c9d63b1 | 2058 | _GL_CXXALIASWARN1 (round, double, (double x)); |
c0c3707f | 2059 | # endif |
88b48903 WN |
2060 | #elif defined GNULIB_POSIXCHECK |
2061 | # undef round | |
2062 | # if HAVE_RAW_DECL_ROUND | |
2063 | _GL_WARN_ON_USE (round, "round is unportable - " | |
2064 | "use gnulib module round for portability"); | |
2065 | # endif | |
2066 | #endif | |
2067 | ||
2068 | #if @GNULIB_ROUNDL@ | |
2069 | # if @REPLACE_ROUNDL@ | |
2070 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2071 | # undef roundl | |
2072 | # define roundl rpl_roundl | |
2073 | # endif | |
2074 | _GL_FUNCDECL_RPL (roundl, long double, (long double x)); | |
2075 | _GL_CXXALIAS_RPL (roundl, long double, (long double x)); | |
2076 | # else | |
2077 | # if !@HAVE_DECL_ROUNDL@ | |
2078 | # undef roundl | |
c0c3707f | 2079 | # if !(defined __cplusplus && defined _AIX) |
88b48903 | 2080 | _GL_FUNCDECL_SYS (roundl, long double, (long double x)); |
c0c3707f | 2081 | # endif |
88b48903 WN |
2082 | # endif |
2083 | _GL_CXXALIAS_SYS (roundl, long double, (long double x)); | |
2084 | # endif | |
2085 | _GL_CXXALIASWARN (roundl); | |
2086 | #elif defined GNULIB_POSIXCHECK | |
2087 | # undef roundl | |
2088 | # if HAVE_RAW_DECL_ROUNDL | |
2089 | _GL_WARN_ON_USE (roundl, "roundl is unportable - " | |
2090 | "use gnulib module roundl for portability"); | |
2091 | # endif | |
2092 | #endif | |
2093 | ||
2094 | ||
2095 | #if @GNULIB_SINF@ | |
c0c3707f CB |
2096 | # if @REPLACE_SINF@ |
2097 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2098 | # undef sinf | |
2099 | # define sinf rpl_sinf | |
2100 | # endif | |
2101 | _GL_FUNCDECL_RPL (sinf, float, (float x)); | |
2102 | _GL_CXXALIAS_RPL (sinf, float, (float x)); | |
2103 | # else | |
2104 | # if !@HAVE_SINF@ | |
2105 | # undef sinf | |
88b48903 | 2106 | _GL_FUNCDECL_SYS (sinf, float, (float x)); |
c0c3707f | 2107 | # endif |
5e8754f9 | 2108 | _GL_CXXALIAS_SYS (sinf, float, (float x)); |
c0c3707f | 2109 | # endif |
88b48903 WN |
2110 | _GL_CXXALIASWARN (sinf); |
2111 | #elif defined GNULIB_POSIXCHECK | |
2112 | # undef sinf | |
2113 | # if HAVE_RAW_DECL_SINF | |
2114 | _GL_WARN_ON_USE (sinf, "sinf is unportable - " | |
2115 | "use gnulib module sinf for portability"); | |
2116 | # endif | |
2117 | #endif | |
2118 | ||
2119 | #if @GNULIB_SINL@ | |
2120 | # if !@HAVE_SINL@ || !@HAVE_DECL_SINL@ | |
2121 | # undef sinl | |
2122 | _GL_FUNCDECL_SYS (sinl, long double, (long double x)); | |
2123 | # endif | |
2124 | _GL_CXXALIAS_SYS (sinl, long double, (long double x)); | |
9c9d63b1 | 2125 | # if __GLIBC__ >= 2 |
88b48903 | 2126 | _GL_CXXALIASWARN (sinl); |
9c9d63b1 | 2127 | # endif |
88b48903 WN |
2128 | #elif defined GNULIB_POSIXCHECK |
2129 | # undef sinl | |
2130 | # if HAVE_RAW_DECL_SINL | |
2131 | _GL_WARN_ON_USE (sinl, "sinl is unportable - " | |
2132 | "use gnulib module sinl for portability"); | |
2133 | # endif | |
2134 | #endif | |
2135 | ||
2136 | ||
2137 | #if @GNULIB_SINHF@ | |
c0c3707f CB |
2138 | # if @REPLACE_SINHF@ |
2139 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2140 | # undef sinhf | |
2141 | # define sinhf rpl_sinhf | |
2142 | # endif | |
2143 | _GL_FUNCDECL_RPL (sinhf, float, (float x)); | |
2144 | _GL_CXXALIAS_RPL (sinhf, float, (float x)); | |
2145 | # else | |
2146 | # if !@HAVE_SINHF@ | |
2147 | # undef sinhf | |
88b48903 | 2148 | _GL_FUNCDECL_SYS (sinhf, float, (float x)); |
c0c3707f | 2149 | # endif |
5e8754f9 | 2150 | _GL_CXXALIAS_SYS (sinhf, float, (float x)); |
c0c3707f | 2151 | # endif |
88b48903 WN |
2152 | _GL_CXXALIASWARN (sinhf); |
2153 | #elif defined GNULIB_POSIXCHECK | |
2154 | # undef sinhf | |
2155 | # if HAVE_RAW_DECL_SINHF | |
2156 | _GL_WARN_ON_USE (sinhf, "sinhf is unportable - " | |
2157 | "use gnulib module sinhf for portability"); | |
2158 | # endif | |
2159 | #endif | |
2160 | ||
2161 | ||
2162 | #if @GNULIB_SQRTF@ | |
c0c3707f CB |
2163 | # if @REPLACE_SQRTF@ |
2164 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2165 | # undef sqrtf | |
2166 | # define sqrtf rpl_sqrtf | |
2167 | # endif | |
2168 | _GL_FUNCDECL_RPL (sqrtf, float, (float x)); | |
2169 | _GL_CXXALIAS_RPL (sqrtf, float, (float x)); | |
2170 | # else | |
2171 | # if !@HAVE_SQRTF@ | |
2172 | # undef sqrtf | |
88b48903 | 2173 | _GL_FUNCDECL_SYS (sqrtf, float, (float x)); |
c0c3707f | 2174 | # endif |
5e8754f9 | 2175 | _GL_CXXALIAS_SYS (sqrtf, float, (float x)); |
c0c3707f | 2176 | # endif |
88b48903 WN |
2177 | _GL_CXXALIASWARN (sqrtf); |
2178 | #elif defined GNULIB_POSIXCHECK | |
2179 | # undef sqrtf | |
2180 | # if HAVE_RAW_DECL_SQRTF | |
2181 | _GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - " | |
2182 | "use gnulib module sqrtf for portability"); | |
2183 | # endif | |
2184 | #endif | |
2185 | ||
2186 | #if @GNULIB_SQRTL@ | |
2187 | # if @REPLACE_SQRTL@ | |
2188 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2189 | # undef sqrtl | |
2190 | # define sqrtl rpl_sqrtl | |
2191 | # endif | |
2192 | _GL_FUNCDECL_RPL (sqrtl, long double, (long double x)); | |
2193 | _GL_CXXALIAS_RPL (sqrtl, long double, (long double x)); | |
2194 | # else | |
2195 | # if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@ | |
2196 | # undef sqrtl | |
2197 | _GL_FUNCDECL_SYS (sqrtl, long double, (long double x)); | |
2198 | # endif | |
2199 | _GL_CXXALIAS_SYS (sqrtl, long double, (long double x)); | |
2200 | # endif | |
9c9d63b1 | 2201 | # if __GLIBC__ >= 2 |
88b48903 | 2202 | _GL_CXXALIASWARN (sqrtl); |
9c9d63b1 | 2203 | # endif |
88b48903 WN |
2204 | #elif defined GNULIB_POSIXCHECK |
2205 | # undef sqrtl | |
2206 | # if HAVE_RAW_DECL_SQRTL | |
2207 | _GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " | |
2208 | "use gnulib module sqrtl for portability"); | |
2209 | # endif | |
2210 | #endif | |
2211 | ||
2212 | ||
2213 | #if @GNULIB_TANF@ | |
c0c3707f CB |
2214 | # if @REPLACE_TANF@ |
2215 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2216 | # undef tanf | |
2217 | # define tanf rpl_tanf | |
2218 | # endif | |
2219 | _GL_FUNCDECL_RPL (tanf, float, (float x)); | |
2220 | _GL_CXXALIAS_RPL (tanf, float, (float x)); | |
2221 | # else | |
2222 | # if !@HAVE_TANF@ | |
2223 | # undef tanf | |
88b48903 | 2224 | _GL_FUNCDECL_SYS (tanf, float, (float x)); |
c0c3707f | 2225 | # endif |
5e8754f9 | 2226 | _GL_CXXALIAS_SYS (tanf, float, (float x)); |
c0c3707f | 2227 | # endif |
88b48903 WN |
2228 | _GL_CXXALIASWARN (tanf); |
2229 | #elif defined GNULIB_POSIXCHECK | |
2230 | # undef tanf | |
2231 | # if HAVE_RAW_DECL_TANF | |
2232 | _GL_WARN_ON_USE (tanf, "tanf is unportable - " | |
2233 | "use gnulib module tanf for portability"); | |
2234 | # endif | |
2235 | #endif | |
2236 | ||
2237 | #if @GNULIB_TANL@ | |
2238 | # if !@HAVE_TANL@ || !@HAVE_DECL_TANL@ | |
2239 | # undef tanl | |
2240 | _GL_FUNCDECL_SYS (tanl, long double, (long double x)); | |
2241 | # endif | |
2242 | _GL_CXXALIAS_SYS (tanl, long double, (long double x)); | |
9c9d63b1 | 2243 | # if __GLIBC__ >= 2 |
88b48903 | 2244 | _GL_CXXALIASWARN (tanl); |
9c9d63b1 | 2245 | # endif |
88b48903 WN |
2246 | #elif defined GNULIB_POSIXCHECK |
2247 | # undef tanl | |
2248 | # if HAVE_RAW_DECL_TANL | |
2249 | _GL_WARN_ON_USE (tanl, "tanl is unportable - " | |
2250 | "use gnulib module tanl for portability"); | |
2251 | # endif | |
2252 | #endif | |
2253 | ||
2254 | ||
2255 | #if @GNULIB_TANHF@ | |
c0c3707f CB |
2256 | # if @REPLACE_TANHF@ |
2257 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2258 | # undef tanhf | |
2259 | # define tanhf rpl_tanhf | |
2260 | # endif | |
2261 | _GL_FUNCDECL_RPL (tanhf, float, (float x)); | |
2262 | _GL_CXXALIAS_RPL (tanhf, float, (float x)); | |
2263 | # else | |
2264 | # if !@HAVE_TANHF@ | |
2265 | # undef tanhf | |
88b48903 | 2266 | _GL_FUNCDECL_SYS (tanhf, float, (float x)); |
c0c3707f | 2267 | # endif |
5e8754f9 | 2268 | _GL_CXXALIAS_SYS (tanhf, float, (float x)); |
c0c3707f | 2269 | # endif |
88b48903 WN |
2270 | _GL_CXXALIASWARN (tanhf); |
2271 | #elif defined GNULIB_POSIXCHECK | |
2272 | # undef tanhf | |
2273 | # if HAVE_RAW_DECL_TANHF | |
2274 | _GL_WARN_ON_USE (tanhf, "tanhf is unportable - " | |
2275 | "use gnulib module tanhf for portability"); | |
2276 | # endif | |
2277 | #endif | |
2278 | ||
2279 | ||
2280 | #if @GNULIB_TRUNCF@ | |
2281 | # if @REPLACE_TRUNCF@ | |
2282 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
49e4877c | 2283 | # undef truncf |
88b48903 WN |
2284 | # define truncf rpl_truncf |
2285 | # endif | |
2286 | _GL_FUNCDECL_RPL (truncf, float, (float x)); | |
2287 | _GL_CXXALIAS_RPL (truncf, float, (float x)); | |
2288 | # else | |
2289 | # if !@HAVE_DECL_TRUNCF@ | |
2290 | _GL_FUNCDECL_SYS (truncf, float, (float x)); | |
2291 | # endif | |
2292 | _GL_CXXALIAS_SYS (truncf, float, (float x)); | |
2293 | # endif | |
2294 | _GL_CXXALIASWARN (truncf); | |
2295 | #elif defined GNULIB_POSIXCHECK | |
2296 | # undef truncf | |
2297 | # if HAVE_RAW_DECL_TRUNCF | |
2298 | _GL_WARN_ON_USE (truncf, "truncf is unportable - " | |
2299 | "use gnulib module truncf for portability"); | |
2300 | # endif | |
2301 | #endif | |
2302 | ||
2303 | #if @GNULIB_TRUNC@ | |
2304 | # if @REPLACE_TRUNC@ | |
2305 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
49e4877c | 2306 | # undef trunc |
88b48903 WN |
2307 | # define trunc rpl_trunc |
2308 | # endif | |
2309 | _GL_FUNCDECL_RPL (trunc, double, (double x)); | |
2310 | _GL_CXXALIAS_RPL (trunc, double, (double x)); | |
2311 | # else | |
2312 | # if !@HAVE_DECL_TRUNC@ | |
2313 | _GL_FUNCDECL_SYS (trunc, double, (double x)); | |
2314 | # endif | |
2315 | _GL_CXXALIAS_SYS (trunc, double, (double x)); | |
2316 | # endif | |
c0c3707f | 2317 | # if __GLIBC__ >= 2 |
9c9d63b1 | 2318 | _GL_CXXALIASWARN1 (trunc, double, (double x)); |
c0c3707f | 2319 | # endif |
88b48903 WN |
2320 | #elif defined GNULIB_POSIXCHECK |
2321 | # undef trunc | |
2322 | # if HAVE_RAW_DECL_TRUNC | |
2323 | _GL_WARN_ON_USE (trunc, "trunc is unportable - " | |
2324 | "use gnulib module trunc for portability"); | |
2325 | # endif | |
2326 | #endif | |
2327 | ||
2328 | #if @GNULIB_TRUNCL@ | |
2329 | # if @REPLACE_TRUNCL@ | |
2330 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2331 | # undef truncl | |
2332 | # define truncl rpl_truncl | |
2333 | # endif | |
2334 | _GL_FUNCDECL_RPL (truncl, long double, (long double x)); | |
2335 | _GL_CXXALIAS_RPL (truncl, long double, (long double x)); | |
2336 | # else | |
2337 | # if !@HAVE_DECL_TRUNCL@ | |
2338 | _GL_FUNCDECL_SYS (truncl, long double, (long double x)); | |
2339 | # endif | |
2340 | _GL_CXXALIAS_SYS (truncl, long double, (long double x)); | |
2341 | # endif | |
2342 | _GL_CXXALIASWARN (truncl); | |
2343 | #elif defined GNULIB_POSIXCHECK | |
2344 | # undef truncl | |
2345 | # if HAVE_RAW_DECL_TRUNCL | |
2346 | _GL_WARN_ON_USE (truncl, "truncl is unportable - " | |
2347 | "use gnulib module truncl for portability"); | |
2348 | # endif | |
2349 | #endif | |
2350 | ||
2351 | ||
9c9d63b1 PM |
2352 | #if @GNULIB_MDA_Y0@ |
2353 | /* On native Windows, map 'y0' to '_y0', so that -loldnames is not | |
2354 | required. In C++ with GNULIB_NAMESPACE, avoid differences between | |
2355 | platforms by defining GNULIB_NAMESPACE::y0 always. */ | |
2356 | # if defined _WIN32 && !defined __CYGWIN__ | |
2357 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2358 | # undef y0 | |
2359 | # define y0 _y0 | |
2360 | # endif | |
2361 | _GL_CXXALIAS_MDA (y0, double, (double x)); | |
2362 | # else | |
2363 | _GL_CXXALIAS_SYS (y0, double, (double x)); | |
2364 | # endif | |
2365 | _GL_CXXALIASWARN (y0); | |
2366 | #endif | |
2367 | ||
2368 | #if @GNULIB_MDA_Y1@ | |
2369 | /* On native Windows, map 'y1' to '_y1', so that -loldnames is not | |
2370 | required. In C++ with GNULIB_NAMESPACE, avoid differences between | |
2371 | platforms by defining GNULIB_NAMESPACE::y1 always. */ | |
2372 | # if defined _WIN32 && !defined __CYGWIN__ | |
2373 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2374 | # undef y1 | |
2375 | # define y1 _y1 | |
2376 | # endif | |
2377 | _GL_CXXALIAS_MDA (y1, double, (double x)); | |
2378 | # else | |
2379 | _GL_CXXALIAS_SYS (y1, double, (double x)); | |
2380 | # endif | |
2381 | _GL_CXXALIASWARN (y1); | |
2382 | #endif | |
2383 | ||
2384 | #if @GNULIB_MDA_YN@ | |
2385 | /* On native Windows, map 'yn' to '_yn', so that -loldnames is not | |
2386 | required. In C++ with GNULIB_NAMESPACE, avoid differences between | |
2387 | platforms by defining GNULIB_NAMESPACE::yn always. */ | |
2388 | # if defined _WIN32 && !defined __CYGWIN__ | |
2389 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | |
2390 | # undef yn | |
2391 | # define yn _yn | |
2392 | # endif | |
2393 | _GL_CXXALIAS_MDA (yn, double, (int n, double x)); | |
2394 | # else | |
2395 | _GL_CXXALIAS_SYS (yn, double, (int n, double x)); | |
2396 | # endif | |
2397 | _GL_CXXALIASWARN (yn); | |
2398 | #endif | |
2399 | ||
2400 | ||
88b48903 WN |
2401 | /* Definitions of function-like macros come here, after the function |
2402 | declarations. */ | |
2403 | ||
2404 | ||
2405 | #if @GNULIB_ISFINITE@ | |
2406 | # if @REPLACE_ISFINITE@ | |
2407 | _GL_EXTERN_C int gl_isfinitef (float x); | |
2408 | _GL_EXTERN_C int gl_isfinited (double x); | |
2409 | _GL_EXTERN_C int gl_isfinitel (long double x); | |
2410 | # undef isfinite | |
2411 | # define isfinite(x) \ | |
2412 | (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \ | |
2413 | sizeof (x) == sizeof (double) ? gl_isfinited (x) : \ | |
2414 | gl_isfinitef (x)) | |
2415 | # endif | |
2416 | # ifdef __cplusplus | |
4c62b19f | 2417 | # if defined isfinite || defined GNULIB_NAMESPACE |
88b48903 WN |
2418 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) |
2419 | # undef isfinite | |
9c9d63b1 | 2420 | # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__))) |
c0c3707f CB |
2421 | /* This platform's <cmath> possibly defines isfinite through a set of inline |
2422 | functions. */ | |
2423 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool) | |
2424 | # define isfinite rpl_isfinite | |
2425 | # else | |
2426 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool) | |
2427 | # endif | |
88b48903 WN |
2428 | # endif |
2429 | # endif | |
2430 | #elif defined GNULIB_POSIXCHECK | |
2431 | # if defined isfinite | |
2432 | _GL_WARN_REAL_FLOATING_DECL (isfinite); | |
2433 | # undef isfinite | |
2434 | # define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x) | |
2435 | # endif | |
2436 | #endif | |
2437 | ||
2438 | ||
2439 | #if @GNULIB_ISINF@ | |
2440 | # if @REPLACE_ISINF@ | |
2441 | _GL_EXTERN_C int gl_isinff (float x); | |
2442 | _GL_EXTERN_C int gl_isinfd (double x); | |
2443 | _GL_EXTERN_C int gl_isinfl (long double x); | |
2444 | # undef isinf | |
2445 | # define isinf(x) \ | |
2446 | (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \ | |
2447 | sizeof (x) == sizeof (double) ? gl_isinfd (x) : \ | |
2448 | gl_isinff (x)) | |
2449 | # endif | |
2450 | # ifdef __cplusplus | |
4c62b19f | 2451 | # if defined isinf || defined GNULIB_NAMESPACE |
88b48903 WN |
2452 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) |
2453 | # undef isinf | |
9c9d63b1 | 2454 | # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__))) |
c0c3707f CB |
2455 | /* This platform's <cmath> possibly defines isinf through a set of inline |
2456 | functions. */ | |
2457 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool) | |
2458 | # define isinf rpl_isinf | |
2459 | # else | |
2460 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool) | |
2461 | # endif | |
88b48903 WN |
2462 | # endif |
2463 | # endif | |
2464 | #elif defined GNULIB_POSIXCHECK | |
2465 | # if defined isinf | |
2466 | _GL_WARN_REAL_FLOATING_DECL (isinf); | |
2467 | # undef isinf | |
2468 | # define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x) | |
2469 | # endif | |
2470 | #endif | |
2471 | ||
2472 | ||
2473 | #if @GNULIB_ISNANF@ | |
2474 | /* Test for NaN for 'float' numbers. */ | |
2475 | # if @HAVE_ISNANF@ | |
2476 | /* The original <math.h> included above provides a declaration of isnan macro | |
2477 | or (older) isnanf function. */ | |
9c9d63b1 PM |
2478 | # if (__GNUC__ >= 4) || (__clang_major__ >= 4) |
2479 | /* GCC >= 4.0 and clang provide a type-generic built-in for isnan. | |
2480 | GCC >= 4.0 also provides __builtin_isnanf, but clang doesn't. */ | |
88b48903 | 2481 | # undef isnanf |
9c9d63b1 | 2482 | # define isnanf(x) __builtin_isnan ((float)(x)) |
88b48903 WN |
2483 | # elif defined isnan |
2484 | # undef isnanf | |
2485 | # define isnanf(x) isnan ((float)(x)) | |
2486 | # endif | |
2487 | # else | |
2488 | /* Test whether X is a NaN. */ | |
2489 | # undef isnanf | |
2490 | # define isnanf rpl_isnanf | |
2491 | _GL_EXTERN_C int isnanf (float x); | |
2492 | # endif | |
2493 | #endif | |
2494 | ||
2495 | #if @GNULIB_ISNAND@ | |
2496 | /* Test for NaN for 'double' numbers. | |
2497 | This function is a gnulib extension, unlike isnan() which applied only | |
2498 | to 'double' numbers earlier but now is a type-generic macro. */ | |
2499 | # if @HAVE_ISNAND@ | |
2500 | /* The original <math.h> included above provides a declaration of isnan | |
2501 | macro. */ | |
9c9d63b1 PM |
2502 | # if (__GNUC__ >= 4) || (__clang_major__ >= 4) |
2503 | /* GCC >= 4.0 and clang provide a type-generic built-in for isnan. */ | |
88b48903 WN |
2504 | # undef isnand |
2505 | # define isnand(x) __builtin_isnan ((double)(x)) | |
2506 | # else | |
2507 | # undef isnand | |
2508 | # define isnand(x) isnan ((double)(x)) | |
2509 | # endif | |
2510 | # else | |
2511 | /* Test whether X is a NaN. */ | |
2512 | # undef isnand | |
2513 | # define isnand rpl_isnand | |
2514 | _GL_EXTERN_C int isnand (double x); | |
2515 | # endif | |
2516 | #endif | |
2517 | ||
2518 | #if @GNULIB_ISNANL@ | |
2519 | /* Test for NaN for 'long double' numbers. */ | |
2520 | # if @HAVE_ISNANL@ | |
2521 | /* The original <math.h> included above provides a declaration of isnan | |
2522 | macro or (older) isnanl function. */ | |
9c9d63b1 PM |
2523 | # if (__GNUC__ >= 4) || (__clang_major__ >= 4) |
2524 | /* GCC >= 4.0 and clang provide a type-generic built-in for isnan. | |
2525 | GCC >= 4.0 also provides __builtin_isnanl, but clang doesn't. */ | |
88b48903 | 2526 | # undef isnanl |
9c9d63b1 | 2527 | # define isnanl(x) __builtin_isnan ((long double)(x)) |
88b48903 WN |
2528 | # elif defined isnan |
2529 | # undef isnanl | |
2530 | # define isnanl(x) isnan ((long double)(x)) | |
2531 | # endif | |
2532 | # else | |
2533 | /* Test whether X is a NaN. */ | |
2534 | # undef isnanl | |
2535 | # define isnanl rpl_isnanl | |
2536 | _GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; | |
2537 | # endif | |
2538 | #endif | |
2539 | ||
2540 | /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ | |
2541 | #if @GNULIB_ISNAN@ | |
2542 | # if @REPLACE_ISNAN@ | |
2543 | /* We can't just use the isnanf macro (e.g.) as exposed by | |
2544 | isnanf.h (e.g.) here, because those may end up being macros | |
2545 | that recursively expand back to isnan. So use the gnulib | |
2546 | replacements for them directly. */ | |
9c9d63b1 PM |
2547 | # if @HAVE_ISNANF@ && (__GNUC__ >= 4) || (__clang_major__ >= 4) |
2548 | # define gl_isnan_f(x) __builtin_isnan ((float)(x)) | |
88b48903 WN |
2549 | # else |
2550 | _GL_EXTERN_C int rpl_isnanf (float x); | |
2551 | # define gl_isnan_f(x) rpl_isnanf (x) | |
2552 | # endif | |
9c9d63b1 | 2553 | # if @HAVE_ISNAND@ && (__GNUC__ >= 4) || (__clang_major__ >= 4) |
88b48903 WN |
2554 | # define gl_isnan_d(x) __builtin_isnan ((double)(x)) |
2555 | # else | |
2556 | _GL_EXTERN_C int rpl_isnand (double x); | |
2557 | # define gl_isnan_d(x) rpl_isnand (x) | |
2558 | # endif | |
9c9d63b1 PM |
2559 | # if @HAVE_ISNANL@ && (__GNUC__ >= 4) || (__clang_major__ >= 4) |
2560 | # define gl_isnan_l(x) __builtin_isnan ((long double)(x)) | |
88b48903 WN |
2561 | # else |
2562 | _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; | |
2563 | # define gl_isnan_l(x) rpl_isnanl (x) | |
2564 | # endif | |
2565 | # undef isnan | |
2566 | # define isnan(x) \ | |
2567 | (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ | |
2568 | sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ | |
2569 | gl_isnan_f (x)) | |
9c9d63b1 | 2570 | # elif (__GNUC__ >= 4) || (__clang_major__ >= 4) |
88b48903 WN |
2571 | # undef isnan |
2572 | # define isnan(x) \ | |
9c9d63b1 | 2573 | (sizeof (x) == sizeof (long double) ? __builtin_isnan ((long double)(x)) : \ |
88b48903 | 2574 | sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ |
9c9d63b1 | 2575 | __builtin_isnan ((float)(x))) |
88b48903 WN |
2576 | # endif |
2577 | # ifdef __cplusplus | |
4c62b19f | 2578 | # if defined isnan || defined GNULIB_NAMESPACE |
88b48903 WN |
2579 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) |
2580 | # undef isnan | |
9c9d63b1 | 2581 | # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || (defined __FreeBSD__ && __clang_major__ < 7) || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__))) |
c0c3707f CB |
2582 | /* This platform's <cmath> possibly defines isnan through a set of inline |
2583 | functions. */ | |
2584 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool) | |
2585 | # define isnan rpl_isnan | |
2586 | # else | |
2587 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool) | |
2588 | # endif | |
88b48903 WN |
2589 | # endif |
2590 | # else | |
2591 | /* Ensure isnan is a macro. */ | |
2592 | # ifndef isnan | |
2593 | # define isnan isnan | |
2594 | # endif | |
2595 | # endif | |
2596 | #elif defined GNULIB_POSIXCHECK | |
2597 | # if defined isnan | |
2598 | _GL_WARN_REAL_FLOATING_DECL (isnan); | |
2599 | # undef isnan | |
2600 | # define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x) | |
2601 | # endif | |
2602 | #endif | |
2603 | ||
2604 | ||
2605 | #if @GNULIB_SIGNBIT@ | |
9c9d63b1 | 2606 | # if (@REPLACE_SIGNBIT_USING_BUILTINS@ \ |
49e4877c | 2607 | && (!defined __cplusplus || __cplusplus < 201103)) |
88b48903 | 2608 | # undef signbit |
9c9d63b1 | 2609 | /* GCC >= 4.0 and clang provide three built-ins for signbit. */ |
88b48903 WN |
2610 | # define signbit(x) \ |
2611 | (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ | |
2612 | sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ | |
2613 | __builtin_signbitf (x)) | |
2614 | # endif | |
c0c3707f | 2615 | # if @REPLACE_SIGNBIT@ && !GNULIB_defined_signbit |
88b48903 WN |
2616 | # undef signbit |
2617 | _GL_EXTERN_C int gl_signbitf (float arg); | |
2618 | _GL_EXTERN_C int gl_signbitd (double arg); | |
2619 | _GL_EXTERN_C int gl_signbitl (long double arg); | |
9c9d63b1 | 2620 | # if (__GNUC__ >= 2 || defined __clang__) && !defined __STRICT_ANSI__ |
88b48903 WN |
2621 | # define _GL_NUM_UINT_WORDS(type) \ |
2622 | ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) | |
2623 | # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf | |
2624 | # define gl_signbitf_OPTIMIZED_MACRO | |
2625 | # define gl_signbitf(arg) \ | |
2626 | ({ union { float _value; \ | |
2627 | unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \ | |
2628 | } _m; \ | |
2629 | _m._value = (arg); \ | |
2630 | (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \ | |
2631 | }) | |
2632 | # endif | |
2633 | # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd | |
2634 | # define gl_signbitd_OPTIMIZED_MACRO | |
2635 | # define gl_signbitd(arg) \ | |
2636 | ({ union { double _value; \ | |
2637 | unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \ | |
2638 | } _m; \ | |
2639 | _m._value = (arg); \ | |
2640 | (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \ | |
2641 | }) | |
2642 | # endif | |
2643 | # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl | |
2644 | # define gl_signbitl_OPTIMIZED_MACRO | |
2645 | # define gl_signbitl(arg) \ | |
2646 | ({ union { long double _value; \ | |
2647 | unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \ | |
2648 | } _m; \ | |
2649 | _m._value = (arg); \ | |
2650 | (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \ | |
2651 | }) | |
2652 | # endif | |
2653 | # endif | |
2654 | # define signbit(x) \ | |
2655 | (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ | |
2656 | sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ | |
2657 | gl_signbitf (x)) | |
c0c3707f | 2658 | # define GNULIB_defined_signbit 1 |
88b48903 WN |
2659 | # endif |
2660 | # ifdef __cplusplus | |
4c62b19f | 2661 | # if defined signbit || defined GNULIB_NAMESPACE |
88b48903 WN |
2662 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) |
2663 | # undef signbit | |
9c9d63b1 | 2664 | # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__))) |
c0c3707f CB |
2665 | /* This platform's <cmath> possibly defines signbit through a set of inline |
2666 | functions. */ | |
2667 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool) | |
2668 | # define signbit rpl_signbit | |
2669 | # else | |
2670 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool) | |
2671 | # endif | |
88b48903 WN |
2672 | # endif |
2673 | # endif | |
2674 | #elif defined GNULIB_POSIXCHECK | |
2675 | # if defined signbit | |
2676 | _GL_WARN_REAL_FLOATING_DECL (signbit); | |
2677 | # undef signbit | |
2678 | # define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x) | |
2679 | # endif | |
2680 | #endif | |
2681 | ||
2682 | _GL_INLINE_HEADER_END | |
2683 | ||
2684 | #endif /* _@GUARD_PREFIX@_MATH_H */ | |
9c9d63b1 | 2685 | #endif /* _GL_INCLUDING_MATH_H */ |
88b48903 | 2686 | #endif /* _@GUARD_PREFIX@_MATH_H */ |