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