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