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