summaryrefslogtreecommitdiffstats
path: root/gl/math.in.h
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2021-11-17 01:05:54 +0100
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2022-07-24 19:35:11 +0200
commita405fc138596f552581d2011fd6de02d5c8186c4 (patch)
tree4c084700b5cb5e9fcedf982a2d921bbc41d9935a /gl/math.in.h
parent9f2a9ca3d72023ff9b5707d1872c54d65edc9017 (diff)
downloadmonitoring-plugins-a405fc138596f552581d2011fd6de02d5c8186c4.tar.gz
Sync with the latest Gnulib code (1a268176f)
Diffstat (limited to 'gl/math.in.h')
-rw-r--r--gl/math.in.h692
1 files changed, 557 insertions, 135 deletions
diff --git a/gl/math.in.h b/gl/math.in.h
index 7189819b..c87cc12f 100644
--- a/gl/math.in.h
+++ b/gl/math.in.h
@@ -1,19 +1,19 @@
1/* A GNU-like <math.h>. 1/* A GNU-like <math.h>.
2 2
3 Copyright (C) 2002-2003, 2007-2013 Free Software Foundation, Inc. 3 Copyright (C) 2002-2003, 2007-2021 Free Software Foundation, Inc.
4 4
5 This program is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU Lesser General Public License as
7 the Free Software Foundation; either version 3 of the License, or 7 published by the Free Software Foundation; either version 2.1 of the
8 (at your option) any later version. 8 License, or (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This file is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU Lesser General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 16 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17 17
18#ifndef _@GUARD_PREFIX@_MATH_H 18#ifndef _@GUARD_PREFIX@_MATH_H
19 19
@@ -22,17 +22,50 @@
22#endif 22#endif
23@PRAGMA_COLUMNS@ 23@PRAGMA_COLUMNS@
24 24
25#if defined _GL_INCLUDING_MATH_H
26/* Special invocation convention:
27 - On FreeBSD 12.2 we have a sequence of nested includes
28 <math.h> -> <stdlib.h> -> <sys/wait.h> -> <sys/types.h> -> <sys/select.h>
29 -> <signal.h> -> <pthread.h> -> <stdlib.h> -> <math.h>
30 In this situation, the functions are not yet declared, therefore we cannot
31 provide the C++ aliases. */
32
33#@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
34
35#else
36/* Normal invocation convention. */
37
25/* The include_next requires a split double-inclusion guard. */ 38/* The include_next requires a split double-inclusion guard. */
39#define _GL_INCLUDING_MATH_H
26#@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ 40#@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
41#undef _GL_INCLUDING_MATH_H
27 42
28#ifndef _@GUARD_PREFIX@_MATH_H 43#ifndef _@GUARD_PREFIX@_MATH_H
29#define _@GUARD_PREFIX@_MATH_H 44#define _@GUARD_PREFIX@_MATH_H
30 45
46/* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in <fp.h>. */
47#if defined __VMS && ! defined NAN
48# include <fp.h>
49#endif
50
51#ifndef _GL_INLINE_HEADER_BEGIN
52 #error "Please include config.h first."
53#endif
31_GL_INLINE_HEADER_BEGIN 54_GL_INLINE_HEADER_BEGIN
32#ifndef _GL_MATH_INLINE 55#ifndef _GL_MATH_INLINE
33# define _GL_MATH_INLINE _GL_INLINE 56# define _GL_MATH_INLINE _GL_INLINE
34#endif 57#endif
35 58
59/* The __attribute__ feature is available in gcc versions 2.5 and later.
60 The attribute __const__ was added in gcc 2.95. */
61#ifndef _GL_ATTRIBUTE_CONST
62# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) || defined __clang__
63# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
64# else
65# define _GL_ATTRIBUTE_CONST /* empty */
66# endif
67#endif
68
36/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ 69/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
37 70
38/* The definition of _GL_ARG_NONNULL is copied here. */ 71/* The definition of _GL_ARG_NONNULL is copied here. */
@@ -59,22 +92,24 @@ _gl_cxx_ ## func ## l (long double l) \
59{ \ 92{ \
60 return func (l); \ 93 return func (l); \
61} 94}
62# define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func) \ 95# define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func,rpl_func,rettype) \
63inline int \ 96_GL_BEGIN_NAMESPACE \
64func (float f) \ 97inline rettype \
98rpl_func (float f) \
65{ \ 99{ \
66 return _gl_cxx_ ## func ## f (f); \ 100 return _gl_cxx_ ## func ## f (f); \
67} \ 101} \
68inline int \ 102inline rettype \
69func (double d) \ 103rpl_func (double d) \
70{ \ 104{ \
71 return _gl_cxx_ ## func ## d (d); \ 105 return _gl_cxx_ ## func ## d (d); \
72} \ 106} \
73inline int \ 107inline rettype \
74func (long double l) \ 108rpl_func (long double l) \
75{ \ 109{ \
76 return _gl_cxx_ ## func ## l (l); \ 110 return _gl_cxx_ ## func ## l (l); \
77} 111} \
112_GL_END_NAMESPACE
78#endif 113#endif
79 114
80/* Helper macros to define a portability warning for the 115/* Helper macros to define a portability warning for the
@@ -82,27 +117,27 @@ func (long double l) \
82 classification macros with an argument of real-floating (that is, 117 classification macros with an argument of real-floating (that is,
83 one of float, double, or long double). */ 118 one of float, double, or long double). */
84#define _GL_WARN_REAL_FLOATING_DECL(func) \ 119#define _GL_WARN_REAL_FLOATING_DECL(func) \
85_GL_MATH_INLINE int \ 120_GL_MATH_INLINE int \
86rpl_ ## func ## f (float f) \ 121_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
87{ \ 122 "use gnulib module " #func " for portability") \
88 return func (f); \ 123rpl_ ## func ## f (float f) \
89} \ 124{ \
90_GL_MATH_INLINE int \ 125 return func (f); \
91rpl_ ## func ## d (double d) \ 126} \
92{ \ 127_GL_MATH_INLINE int \
93 return func (d); \ 128_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
94} \ 129 "use gnulib module " #func " for portability") \
95_GL_MATH_INLINE int \ 130rpl_ ## func ## d (double d) \
96rpl_ ## func ## l (long double l) \ 131{ \
97{ \ 132 return func (d); \
98 return func (l); \ 133} \
99} \ 134_GL_MATH_INLINE int \
100_GL_WARN_ON_USE (rpl_ ## func ## f, #func " is unportable - " \ 135_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
101 "use gnulib module " #func " for portability"); \ 136 "use gnulib module " #func " for portability") \
102_GL_WARN_ON_USE (rpl_ ## func ## d, #func " is unportable - " \ 137rpl_ ## func ## l (long double l) \
103 "use gnulib module " #func " for portability"); \ 138{ \
104_GL_WARN_ON_USE (rpl_ ## func ## l, #func " is unportable - " \ 139 return func (l); \
105 "use gnulib module " #func " for portability") 140}
106#define _GL_WARN_REAL_FLOATING_IMPL(func, value) \ 141#define _GL_WARN_REAL_FLOATING_IMPL(func, value) \
107 (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \ 142 (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \
108 : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \ 143 : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \
@@ -184,8 +219,17 @@ _NaN ()
184#endif 219#endif
185 220
186 221
187/* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */ 222#if defined FP_ILOGB0 && defined FP_ILOGBNAN
188#if !(defined FP_ILOGB0 && defined FP_ILOGBNAN) 223 /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct. */
224# if defined __HAIKU__
225 /* Haiku: match what ilogb() does */
226# undef FP_ILOGB0
227# undef FP_ILOGBNAN
228# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
229# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
230# endif
231#else
232 /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */
189# if defined __NetBSD__ || defined __sgi 233# if defined __NetBSD__ || defined __sgi
190 /* NetBSD, IRIX 6.5: match what ilogb() does */ 234 /* NetBSD, IRIX 6.5: match what ilogb() does */
191# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ 235# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
@@ -207,11 +251,20 @@ _NaN ()
207 251
208 252
209#if @GNULIB_ACOSF@ 253#if @GNULIB_ACOSF@
210# if !@HAVE_ACOSF@ 254# if @REPLACE_ACOSF@
211# undef acosf 255# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
256# undef acosf
257# define acosf rpl_acosf
258# endif
259_GL_FUNCDECL_RPL (acosf, float, (float x));
260_GL_CXXALIAS_RPL (acosf, float, (float x));
261# else
262# if !@HAVE_ACOSF@
263# undef acosf
212_GL_FUNCDECL_SYS (acosf, float, (float x)); 264_GL_FUNCDECL_SYS (acosf, float, (float x));
213# endif 265# endif
214_GL_CXXALIAS_SYS (acosf, float, (float x)); 266_GL_CXXALIAS_SYS (acosf, float, (float x));
267# endif
215_GL_CXXALIASWARN (acosf); 268_GL_CXXALIASWARN (acosf);
216#elif defined GNULIB_POSIXCHECK 269#elif defined GNULIB_POSIXCHECK
217# undef acosf 270# undef acosf
@@ -227,7 +280,9 @@ _GL_WARN_ON_USE (acosf, "acosf is unportable - "
227_GL_FUNCDECL_SYS (acosl, long double, (long double x)); 280_GL_FUNCDECL_SYS (acosl, long double, (long double x));
228# endif 281# endif
229_GL_CXXALIAS_SYS (acosl, long double, (long double x)); 282_GL_CXXALIAS_SYS (acosl, long double, (long double x));
283# if __GLIBC__ >= 2
230_GL_CXXALIASWARN (acosl); 284_GL_CXXALIASWARN (acosl);
285# endif
231#elif defined GNULIB_POSIXCHECK 286#elif defined GNULIB_POSIXCHECK
232# undef acosl 287# undef acosl
233# if HAVE_RAW_DECL_ACOSL 288# if HAVE_RAW_DECL_ACOSL
@@ -238,11 +293,20 @@ _GL_WARN_ON_USE (acosl, "acosl is unportable - "
238 293
239 294
240#if @GNULIB_ASINF@ 295#if @GNULIB_ASINF@
241# if !@HAVE_ASINF@ 296# if @REPLACE_ASINF@
242# undef asinf 297# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
298# undef asinf
299# define asinf rpl_asinf
300# endif
301_GL_FUNCDECL_RPL (asinf, float, (float x));
302_GL_CXXALIAS_RPL (asinf, float, (float x));
303# else
304# if !@HAVE_ASINF@
305# undef asinf
243_GL_FUNCDECL_SYS (asinf, float, (float x)); 306_GL_FUNCDECL_SYS (asinf, float, (float x));
244# endif 307# endif
245_GL_CXXALIAS_SYS (asinf, float, (float x)); 308_GL_CXXALIAS_SYS (asinf, float, (float x));
309# endif
246_GL_CXXALIASWARN (asinf); 310_GL_CXXALIASWARN (asinf);
247#elif defined GNULIB_POSIXCHECK 311#elif defined GNULIB_POSIXCHECK
248# undef asinf 312# undef asinf
@@ -258,7 +322,9 @@ _GL_WARN_ON_USE (asinf, "asinf is unportable - "
258_GL_FUNCDECL_SYS (asinl, long double, (long double x)); 322_GL_FUNCDECL_SYS (asinl, long double, (long double x));
259# endif 323# endif
260_GL_CXXALIAS_SYS (asinl, long double, (long double x)); 324_GL_CXXALIAS_SYS (asinl, long double, (long double x));
325# if __GLIBC__ >= 2
261_GL_CXXALIASWARN (asinl); 326_GL_CXXALIASWARN (asinl);
327# endif
262#elif defined GNULIB_POSIXCHECK 328#elif defined GNULIB_POSIXCHECK
263# undef asinl 329# undef asinl
264# if HAVE_RAW_DECL_ASINL 330# if HAVE_RAW_DECL_ASINL
@@ -269,11 +335,20 @@ _GL_WARN_ON_USE (asinl, "asinl is unportable - "
269 335
270 336
271#if @GNULIB_ATANF@ 337#if @GNULIB_ATANF@
272# if !@HAVE_ATANF@ 338# if @REPLACE_ATANF@
273# undef atanf 339# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
340# undef atanf
341# define atanf rpl_atanf
342# endif
343_GL_FUNCDECL_RPL (atanf, float, (float x));
344_GL_CXXALIAS_RPL (atanf, float, (float x));
345# else
346# if !@HAVE_ATANF@
347# undef atanf
274_GL_FUNCDECL_SYS (atanf, float, (float x)); 348_GL_FUNCDECL_SYS (atanf, float, (float x));
275# endif 349# endif
276_GL_CXXALIAS_SYS (atanf, float, (float x)); 350_GL_CXXALIAS_SYS (atanf, float, (float x));
351# endif
277_GL_CXXALIASWARN (atanf); 352_GL_CXXALIASWARN (atanf);
278#elif defined GNULIB_POSIXCHECK 353#elif defined GNULIB_POSIXCHECK
279# undef atanf 354# undef atanf
@@ -289,7 +364,9 @@ _GL_WARN_ON_USE (atanf, "atanf is unportable - "
289_GL_FUNCDECL_SYS (atanl, long double, (long double x)); 364_GL_FUNCDECL_SYS (atanl, long double, (long double x));
290# endif 365# endif
291_GL_CXXALIAS_SYS (atanl, long double, (long double x)); 366_GL_CXXALIAS_SYS (atanl, long double, (long double x));
367# if __GLIBC__ >= 2
292_GL_CXXALIASWARN (atanl); 368_GL_CXXALIASWARN (atanl);
369# endif
293#elif defined GNULIB_POSIXCHECK 370#elif defined GNULIB_POSIXCHECK
294# undef atanl 371# undef atanl
295# if HAVE_RAW_DECL_ATANL 372# if HAVE_RAW_DECL_ATANL
@@ -300,11 +377,20 @@ _GL_WARN_ON_USE (atanl, "atanl is unportable - "
300 377
301 378
302#if @GNULIB_ATAN2F@ 379#if @GNULIB_ATAN2F@
303# if !@HAVE_ATAN2F@ 380# if @REPLACE_ATAN2F@
304# undef atan2f 381# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
382# undef atan2f
383# define atan2f rpl_atan2f
384# endif
385_GL_FUNCDECL_RPL (atan2f, float, (float y, float x));
386_GL_CXXALIAS_RPL (atan2f, float, (float y, float x));
387# else
388# if !@HAVE_ATAN2F@
389# undef atan2f
305_GL_FUNCDECL_SYS (atan2f, float, (float y, float x)); 390_GL_FUNCDECL_SYS (atan2f, float, (float y, float x));
306# endif 391# endif
307_GL_CXXALIAS_SYS (atan2f, float, (float y, float x)); 392_GL_CXXALIAS_SYS (atan2f, float, (float y, float x));
393# endif
308_GL_CXXALIASWARN (atan2f); 394_GL_CXXALIASWARN (atan2f);
309#elif defined GNULIB_POSIXCHECK 395#elif defined GNULIB_POSIXCHECK
310# undef atan2f 396# undef atan2f
@@ -343,7 +429,9 @@ _GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - "
343_GL_FUNCDECL_SYS (cbrt, double, (double x)); 429_GL_FUNCDECL_SYS (cbrt, double, (double x));
344# endif 430# endif
345_GL_CXXALIAS_SYS (cbrt, double, (double x)); 431_GL_CXXALIAS_SYS (cbrt, double, (double x));
346_GL_CXXALIASWARN (cbrt); 432# if __GLIBC__ >= 2
433_GL_CXXALIASWARN1 (cbrt, double, (double x));
434# endif
347#elif defined GNULIB_POSIXCHECK 435#elif defined GNULIB_POSIXCHECK
348# undef cbrt 436# undef cbrt
349# if HAVE_RAW_DECL_CBRT 437# if HAVE_RAW_DECL_CBRT
@@ -403,6 +491,7 @@ _GL_WARN_ON_USE (ceilf, "ceilf is unportable - "
403#if @GNULIB_CEIL@ 491#if @GNULIB_CEIL@
404# if @REPLACE_CEIL@ 492# if @REPLACE_CEIL@
405# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 493# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
494# undef ceil
406# define ceil rpl_ceil 495# define ceil rpl_ceil
407# endif 496# endif
408_GL_FUNCDECL_RPL (ceil, double, (double x)); 497_GL_FUNCDECL_RPL (ceil, double, (double x));
@@ -410,7 +499,9 @@ _GL_CXXALIAS_RPL (ceil, double, (double x));
410# else 499# else
411_GL_CXXALIAS_SYS (ceil, double, (double x)); 500_GL_CXXALIAS_SYS (ceil, double, (double x));
412# endif 501# endif
413_GL_CXXALIASWARN (ceil); 502# if __GLIBC__ >= 2
503_GL_CXXALIASWARN1 (ceil, double, (double x));
504# endif
414#endif 505#endif
415 506
416#if @GNULIB_CEILL@ 507#if @GNULIB_CEILL@
@@ -428,7 +519,9 @@ _GL_FUNCDECL_SYS (ceill, long double, (long double x));
428# endif 519# endif
429_GL_CXXALIAS_SYS (ceill, long double, (long double x)); 520_GL_CXXALIAS_SYS (ceill, long double, (long double x));
430# endif 521# endif
522# if __GLIBC__ >= 2
431_GL_CXXALIASWARN (ceill); 523_GL_CXXALIASWARN (ceill);
524# endif
432#elif defined GNULIB_POSIXCHECK 525#elif defined GNULIB_POSIXCHECK
433# undef ceill 526# undef ceill
434# if HAVE_RAW_DECL_CEILL 527# if HAVE_RAW_DECL_CEILL
@@ -440,6 +533,7 @@ _GL_WARN_ON_USE (ceill, "ceill is unportable - "
440 533
441#if @GNULIB_COPYSIGNF@ 534#if @GNULIB_COPYSIGNF@
442# if !@HAVE_DECL_COPYSIGNF@ 535# if !@HAVE_DECL_COPYSIGNF@
536# undef copysignf
443_GL_FUNCDECL_SYS (copysignf, float, (float x, float y)); 537_GL_FUNCDECL_SYS (copysignf, float, (float x, float y));
444# endif 538# endif
445_GL_CXXALIAS_SYS (copysignf, float, (float x, float y)); 539_GL_CXXALIAS_SYS (copysignf, float, (float x, float y));
@@ -457,7 +551,9 @@ _GL_WARN_ON_USE (copysignf, "copysignf is unportable - "
457_GL_FUNCDECL_SYS (copysign, double, (double x, double y)); 551_GL_FUNCDECL_SYS (copysign, double, (double x, double y));
458# endif 552# endif
459_GL_CXXALIAS_SYS (copysign, double, (double x, double y)); 553_GL_CXXALIAS_SYS (copysign, double, (double x, double y));
460_GL_CXXALIASWARN (copysign); 554# if __GLIBC__ >= 2
555_GL_CXXALIASWARN1 (copysign, double, (double x, double y));
556# endif
461#elif defined GNULIB_POSIXCHECK 557#elif defined GNULIB_POSIXCHECK
462# undef copysign 558# undef copysign
463# if HAVE_RAW_DECL_COPYSIGN 559# if HAVE_RAW_DECL_COPYSIGN
@@ -482,11 +578,20 @@ _GL_WARN_ON_USE (copysign, "copysignl is unportable - "
482 578
483 579
484#if @GNULIB_COSF@ 580#if @GNULIB_COSF@
485# if !@HAVE_COSF@ 581# if @REPLACE_COSF@
486# undef cosf 582# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
583# undef cosf
584# define cosf rpl_cosf
585# endif
586_GL_FUNCDECL_RPL (cosf, float, (float x));
587_GL_CXXALIAS_RPL (cosf, float, (float x));
588# else
589# if !@HAVE_COSF@
590# undef cosf
487_GL_FUNCDECL_SYS (cosf, float, (float x)); 591_GL_FUNCDECL_SYS (cosf, float, (float x));
488# endif 592# endif
489_GL_CXXALIAS_SYS (cosf, float, (float x)); 593_GL_CXXALIAS_SYS (cosf, float, (float x));
594# endif
490_GL_CXXALIASWARN (cosf); 595_GL_CXXALIASWARN (cosf);
491#elif defined GNULIB_POSIXCHECK 596#elif defined GNULIB_POSIXCHECK
492# undef cosf 597# undef cosf
@@ -502,7 +607,9 @@ _GL_WARN_ON_USE (cosf, "cosf is unportable - "
502_GL_FUNCDECL_SYS (cosl, long double, (long double x)); 607_GL_FUNCDECL_SYS (cosl, long double, (long double x));
503# endif 608# endif
504_GL_CXXALIAS_SYS (cosl, long double, (long double x)); 609_GL_CXXALIAS_SYS (cosl, long double, (long double x));
610# if __GLIBC__ >= 2
505_GL_CXXALIASWARN (cosl); 611_GL_CXXALIASWARN (cosl);
612# endif
506#elif defined GNULIB_POSIXCHECK 613#elif defined GNULIB_POSIXCHECK
507# undef cosl 614# undef cosl
508# if HAVE_RAW_DECL_COSL 615# if HAVE_RAW_DECL_COSL
@@ -513,11 +620,20 @@ _GL_WARN_ON_USE (cosl, "cosl is unportable - "
513 620
514 621
515#if @GNULIB_COSHF@ 622#if @GNULIB_COSHF@
516# if !@HAVE_COSHF@ 623# if @REPLACE_COSHF@
517# undef coshf 624# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
625# undef coshf
626# define coshf rpl_coshf
627# endif
628_GL_FUNCDECL_RPL (coshf, float, (float x));
629_GL_CXXALIAS_RPL (coshf, float, (float x));
630# else
631# if !@HAVE_COSHF@
632# undef coshf
518_GL_FUNCDECL_SYS (coshf, float, (float x)); 633_GL_FUNCDECL_SYS (coshf, float, (float x));
519# endif 634# endif
520_GL_CXXALIAS_SYS (coshf, float, (float x)); 635_GL_CXXALIAS_SYS (coshf, float, (float x));
636# endif
521_GL_CXXALIASWARN (coshf); 637_GL_CXXALIASWARN (coshf);
522#elif defined GNULIB_POSIXCHECK 638#elif defined GNULIB_POSIXCHECK
523# undef coshf 639# undef coshf
@@ -529,11 +645,20 @@ _GL_WARN_ON_USE (coshf, "coshf is unportable - "
529 645
530 646
531#if @GNULIB_EXPF@ 647#if @GNULIB_EXPF@
532# if !@HAVE_EXPF@ 648# if @REPLACE_EXPF@
533# undef expf 649# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
650# undef expf
651# define expf rpl_expf
652# endif
653_GL_FUNCDECL_RPL (expf, float, (float x));
654_GL_CXXALIAS_RPL (expf, float, (float x));
655# else
656# if !@HAVE_EXPF@
657# undef expf
534_GL_FUNCDECL_SYS (expf, float, (float x)); 658_GL_FUNCDECL_SYS (expf, float, (float x));
535# endif 659# endif
536_GL_CXXALIAS_SYS (expf, float, (float x)); 660_GL_CXXALIAS_SYS (expf, float, (float x));
661# endif
537_GL_CXXALIASWARN (expf); 662_GL_CXXALIASWARN (expf);
538#elif defined GNULIB_POSIXCHECK 663#elif defined GNULIB_POSIXCHECK
539# undef expf 664# undef expf
@@ -544,12 +669,23 @@ _GL_WARN_ON_USE (expf, "expf is unportable - "
544#endif 669#endif
545 670
546#if @GNULIB_EXPL@ 671#if @GNULIB_EXPL@
547# if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@ 672# if @REPLACE_EXPL@
548# undef expl 673# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
674# undef expl
675# define expl rpl_expl
676# endif
677_GL_FUNCDECL_RPL (expl, long double, (long double x));
678_GL_CXXALIAS_RPL (expl, long double, (long double x));
679# else
680# if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
681# undef expl
549_GL_FUNCDECL_SYS (expl, long double, (long double x)); 682_GL_FUNCDECL_SYS (expl, long double, (long double x));
550# endif 683# endif
551_GL_CXXALIAS_SYS (expl, long double, (long double x)); 684_GL_CXXALIAS_SYS (expl, long double, (long double x));
685# endif
686# if __GLIBC__ >= 2
552_GL_CXXALIASWARN (expl); 687_GL_CXXALIASWARN (expl);
688# endif
553#elif defined GNULIB_POSIXCHECK 689#elif defined GNULIB_POSIXCHECK
554# undef expl 690# undef expl
555# if HAVE_RAW_DECL_EXPL 691# if HAVE_RAW_DECL_EXPL
@@ -587,7 +723,9 @@ _GL_FUNCDECL_SYS (exp2, double, (double x));
587# endif 723# endif
588_GL_CXXALIAS_SYS (exp2, double, (double x)); 724_GL_CXXALIAS_SYS (exp2, double, (double x));
589# endif 725# endif
590_GL_CXXALIASWARN (exp2); 726# if __GLIBC__ >= 2
727_GL_CXXALIASWARN1 (exp2, double, (double x));
728# endif
591#elif defined GNULIB_POSIXCHECK 729#elif defined GNULIB_POSIXCHECK
592# undef exp2 730# undef exp2
593# if HAVE_RAW_DECL_EXP2 731# if HAVE_RAW_DECL_EXP2
@@ -658,7 +796,9 @@ _GL_FUNCDECL_SYS (expm1, double, (double x));
658# endif 796# endif
659_GL_CXXALIAS_SYS (expm1, double, (double x)); 797_GL_CXXALIAS_SYS (expm1, double, (double x));
660# endif 798# endif
661_GL_CXXALIASWARN (expm1); 799# if __GLIBC__ >= 2
800_GL_CXXALIASWARN1 (expm1, double, (double x));
801# endif
662#elif defined GNULIB_POSIXCHECK 802#elif defined GNULIB_POSIXCHECK
663# undef expm1 803# undef expm1
664# if HAVE_RAW_DECL_EXPM1 804# if HAVE_RAW_DECL_EXPM1
@@ -668,11 +808,22 @@ _GL_WARN_ON_USE (expm1, "expm1 is unportable - "
668#endif 808#endif
669 809
670#if @GNULIB_EXPM1L@ 810#if @GNULIB_EXPM1L@
671# if !@HAVE_DECL_EXPM1L@ 811# if @REPLACE_EXPM1L@
672# undef expm1l 812# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
813# undef expm1l
814# define expm1l rpl_expm1l
815# endif
816_GL_FUNCDECL_RPL (expm1l, long double, (long double x));
817_GL_CXXALIAS_RPL (expm1l, long double, (long double x));
818# else
819# if !@HAVE_DECL_EXPM1L@
820# undef expm1l
821# if !(defined __cplusplus && defined _AIX)
673_GL_FUNCDECL_SYS (expm1l, long double, (long double x)); 822_GL_FUNCDECL_SYS (expm1l, long double, (long double x));
674# endif 823# endif
824# endif
675_GL_CXXALIAS_SYS (expm1l, long double, (long double x)); 825_GL_CXXALIAS_SYS (expm1l, long double, (long double x));
826# endif
676_GL_CXXALIASWARN (expm1l); 827_GL_CXXALIASWARN (expm1l);
677#elif defined GNULIB_POSIXCHECK 828#elif defined GNULIB_POSIXCHECK
678# undef expm1l 829# undef expm1l
@@ -689,7 +840,9 @@ _GL_WARN_ON_USE (expm1l, "expm1l is unportable - "
689_GL_FUNCDECL_SYS (fabsf, float, (float x)); 840_GL_FUNCDECL_SYS (fabsf, float, (float x));
690# endif 841# endif
691_GL_CXXALIAS_SYS (fabsf, float, (float x)); 842_GL_CXXALIAS_SYS (fabsf, float, (float x));
843# if __GLIBC__ >= 2
692_GL_CXXALIASWARN (fabsf); 844_GL_CXXALIASWARN (fabsf);
845# endif
693#elif defined GNULIB_POSIXCHECK 846#elif defined GNULIB_POSIXCHECK
694# undef fabsf 847# undef fabsf
695# if HAVE_RAW_DECL_FABSF 848# if HAVE_RAW_DECL_FABSF
@@ -713,7 +866,9 @@ _GL_FUNCDECL_SYS (fabsl, long double, (long double x));
713# endif 866# endif
714_GL_CXXALIAS_SYS (fabsl, long double, (long double x)); 867_GL_CXXALIAS_SYS (fabsl, long double, (long double x));
715# endif 868# endif
869# if __GLIBC__ >= 2
716_GL_CXXALIASWARN (fabsl); 870_GL_CXXALIASWARN (fabsl);
871# endif
717#elif defined GNULIB_POSIXCHECK 872#elif defined GNULIB_POSIXCHECK
718# undef fabsl 873# undef fabsl
719# if HAVE_RAW_DECL_FABSL 874# if HAVE_RAW_DECL_FABSL
@@ -750,6 +905,7 @@ _GL_WARN_ON_USE (floorf, "floorf is unportable - "
750#if @GNULIB_FLOOR@ 905#if @GNULIB_FLOOR@
751# if @REPLACE_FLOOR@ 906# if @REPLACE_FLOOR@
752# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 907# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
908# undef floor
753# define floor rpl_floor 909# define floor rpl_floor
754# endif 910# endif
755_GL_FUNCDECL_RPL (floor, double, (double x)); 911_GL_FUNCDECL_RPL (floor, double, (double x));
@@ -757,7 +913,9 @@ _GL_CXXALIAS_RPL (floor, double, (double x));
757# else 913# else
758_GL_CXXALIAS_SYS (floor, double, (double x)); 914_GL_CXXALIAS_SYS (floor, double, (double x));
759# endif 915# endif
760_GL_CXXALIASWARN (floor); 916# if __GLIBC__ >= 2
917_GL_CXXALIASWARN1 (floor, double, (double x));
918# endif
761#endif 919#endif
762 920
763#if @GNULIB_FLOORL@ 921#if @GNULIB_FLOORL@
@@ -775,7 +933,9 @@ _GL_FUNCDECL_SYS (floorl, long double, (long double x));
775# endif 933# endif
776_GL_CXXALIAS_SYS (floorl, long double, (long double x)); 934_GL_CXXALIAS_SYS (floorl, long double, (long double x));
777# endif 935# endif
936# if __GLIBC__ >= 2
778_GL_CXXALIASWARN (floorl); 937_GL_CXXALIASWARN (floorl);
938# endif
779#elif defined GNULIB_POSIXCHECK 939#elif defined GNULIB_POSIXCHECK
780# undef floorl 940# undef floorl
781# if HAVE_RAW_DECL_FLOORL 941# if HAVE_RAW_DECL_FLOORL
@@ -795,6 +955,7 @@ _GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z));
795_GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z)); 955_GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z));
796# else 956# else
797# if !@HAVE_FMAF@ 957# if !@HAVE_FMAF@
958# undef fmaf
798_GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z)); 959_GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z));
799# endif 960# endif
800_GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z)); 961_GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z));
@@ -818,11 +979,14 @@ _GL_FUNCDECL_RPL (fma, double, (double x, double y, double z));
818_GL_CXXALIAS_RPL (fma, double, (double x, double y, double z)); 979_GL_CXXALIAS_RPL (fma, double, (double x, double y, double z));
819# else 980# else
820# if !@HAVE_FMA@ 981# if !@HAVE_FMA@
982# undef fma
821_GL_FUNCDECL_SYS (fma, double, (double x, double y, double z)); 983_GL_FUNCDECL_SYS (fma, double, (double x, double y, double z));
822# endif 984# endif
823_GL_CXXALIAS_SYS (fma, double, (double x, double y, double z)); 985_GL_CXXALIAS_SYS (fma, double, (double x, double y, double z));
824# endif 986# endif
825_GL_CXXALIASWARN (fma); 987# if __GLIBC__ >= 2
988_GL_CXXALIASWARN1 (fma, double, (double x, double y, double z));
989# endif
826#elif defined GNULIB_POSIXCHECK 990#elif defined GNULIB_POSIXCHECK
827# undef fma 991# undef fma
828# if HAVE_RAW_DECL_FMA 992# if HAVE_RAW_DECL_FMA
@@ -844,8 +1008,10 @@ _GL_CXXALIAS_RPL (fmal, long double,
844# else 1008# else
845# if !@HAVE_FMAL@ 1009# if !@HAVE_FMAL@
846# undef fmal 1010# undef fmal
1011# if !(defined __cplusplus && defined _AIX)
847_GL_FUNCDECL_SYS (fmal, long double, 1012_GL_FUNCDECL_SYS (fmal, long double,
848 (long double x, long double y, long double z)); 1013 (long double x, long double y, long double z));
1014# endif
849# endif 1015# endif
850_GL_CXXALIAS_SYS (fmal, long double, 1016_GL_CXXALIAS_SYS (fmal, long double,
851 (long double x, long double y, long double z)); 1017 (long double x, long double y, long double z));
@@ -895,7 +1061,9 @@ _GL_CXXALIAS_RPL (fmod, double, (double x, double y));
895# else 1061# else
896_GL_CXXALIAS_SYS (fmod, double, (double x, double y)); 1062_GL_CXXALIAS_SYS (fmod, double, (double x, double y));
897# endif 1063# endif
898_GL_CXXALIASWARN (fmod); 1064# if __GLIBC__ >= 2
1065_GL_CXXALIASWARN1 (fmod, double, (double x, double y));
1066# endif
899#elif defined GNULIB_POSIXCHECK 1067#elif defined GNULIB_POSIXCHECK
900# undef fmod 1068# undef fmod
901# if HAVE_RAW_DECL_FMOD 1069# if HAVE_RAW_DECL_FMOD
@@ -919,7 +1087,9 @@ _GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y));
919# endif 1087# endif
920_GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y)); 1088_GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y));
921# endif 1089# endif
1090# if __GLIBC__ >= 2
922_GL_CXXALIASWARN (fmodl); 1091_GL_CXXALIASWARN (fmodl);
1092# endif
923#elif defined GNULIB_POSIXCHECK 1093#elif defined GNULIB_POSIXCHECK
924# undef fmodl 1094# undef fmodl
925# if HAVE_RAW_DECL_FMODL 1095# if HAVE_RAW_DECL_FMODL
@@ -951,7 +1121,9 @@ _GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2)));
951# endif 1121# endif
952_GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr)); 1122_GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr));
953# endif 1123# endif
1124# if __GLIBC__ >= 2
954_GL_CXXALIASWARN (frexpf); 1125_GL_CXXALIASWARN (frexpf);
1126# endif
955#elif defined GNULIB_POSIXCHECK 1127#elif defined GNULIB_POSIXCHECK
956# undef frexpf 1128# undef frexpf
957# if HAVE_RAW_DECL_FREXPF 1129# if HAVE_RAW_DECL_FREXPF
@@ -970,6 +1142,7 @@ _GL_WARN_ON_USE (frexpf, "frexpf is unportable - "
970#if @GNULIB_FREXP@ 1142#if @GNULIB_FREXP@
971# if @REPLACE_FREXP@ 1143# if @REPLACE_FREXP@
972# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1144# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1145# undef frexp
973# define frexp rpl_frexp 1146# define frexp rpl_frexp
974# endif 1147# endif
975_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2))); 1148_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2)));
@@ -977,7 +1150,9 @@ _GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr));
977# else 1150# else
978_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr)); 1151_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr));
979# endif 1152# endif
980_GL_CXXALIASWARN (frexp); 1153# if __GLIBC__ >= 2
1154_GL_CXXALIASWARN1 (frexp, double, (double x, int *expptr));
1155# endif
981#elif defined GNULIB_POSIXCHECK 1156#elif defined GNULIB_POSIXCHECK
982# undef frexp 1157# undef frexp
983/* Assume frexp is always declared. */ 1158/* Assume frexp is always declared. */
@@ -1010,7 +1185,9 @@ _GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr));
1010# endif 1185# endif
1011#endif 1186#endif
1012#if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@) 1187#if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@)
1188# if __GLIBC__ >= 2
1013_GL_CXXALIASWARN (frexpl); 1189_GL_CXXALIASWARN (frexpl);
1190# endif
1014#endif 1191#endif
1015#if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK 1192#if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
1016# undef frexpl 1193# undef frexpl
@@ -1036,7 +1213,9 @@ _GL_FUNCDECL_SYS (hypotf, float, (float x, float y));
1036# endif 1213# endif
1037_GL_CXXALIAS_SYS (hypotf, float, (float x, float y)); 1214_GL_CXXALIAS_SYS (hypotf, float, (float x, float y));
1038# endif 1215# endif
1216# if __GLIBC__ >= 2
1039_GL_CXXALIASWARN (hypotf); 1217_GL_CXXALIASWARN (hypotf);
1218# endif
1040#elif defined GNULIB_POSIXCHECK 1219#elif defined GNULIB_POSIXCHECK
1041# undef hypotf 1220# undef hypotf
1042# if HAVE_RAW_DECL_HYPOTF 1221# if HAVE_RAW_DECL_HYPOTF
@@ -1057,7 +1236,9 @@ _GL_CXXALIAS_RPL (hypot, double, (double x, double y));
1057# else 1236# else
1058_GL_CXXALIAS_SYS (hypot, double, (double x, double y)); 1237_GL_CXXALIAS_SYS (hypot, double, (double x, double y));
1059# endif 1238# endif
1060_GL_CXXALIASWARN (hypot); 1239# if __GLIBC__ >= 2
1240_GL_CXXALIASWARN1 (hypot, double, (double x, double y));
1241# endif
1061#elif defined GNULIB_POSIXCHECK 1242#elif defined GNULIB_POSIXCHECK
1062# undef hypot 1243# undef hypot
1063# if HAVE_RAW_DECL_HYPOT 1244# if HAVE_RAW_DECL_HYPOT
@@ -1081,7 +1262,9 @@ _GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y));
1081# endif 1262# endif
1082_GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y)); 1263_GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y));
1083# endif 1264# endif
1265# if __GLIBC__ >= 2
1084_GL_CXXALIASWARN (hypotl); 1266_GL_CXXALIASWARN (hypotl);
1267# endif
1085#elif defined GNULIB_POSIXCHECK 1268#elif defined GNULIB_POSIXCHECK
1086# undef hypotl 1269# undef hypotl
1087# if HAVE_RAW_DECL_HYPOTL 1270# if HAVE_RAW_DECL_HYPOTL
@@ -1128,7 +1311,9 @@ _GL_FUNCDECL_SYS (ilogb, int, (double x));
1128# endif 1311# endif
1129_GL_CXXALIAS_SYS (ilogb, int, (double x)); 1312_GL_CXXALIAS_SYS (ilogb, int, (double x));
1130# endif 1313# endif
1131_GL_CXXALIASWARN (ilogb); 1314# if __GLIBC__ >= 2
1315_GL_CXXALIASWARN1 (ilogb, int, (double x));
1316# endif
1132#elif defined GNULIB_POSIXCHECK 1317#elif defined GNULIB_POSIXCHECK
1133# undef ilogb 1318# undef ilogb
1134# if HAVE_RAW_DECL_ILOGB 1319# if HAVE_RAW_DECL_ILOGB
@@ -1138,10 +1323,20 @@ _GL_WARN_ON_USE (ilogb, "ilogb is unportable - "
1138#endif 1323#endif
1139 1324
1140#if @GNULIB_ILOGBL@ 1325#if @GNULIB_ILOGBL@
1141# if !@HAVE_ILOGBL@ 1326# if @REPLACE_ILOGBL@
1327# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1328# undef ilogbl
1329# define ilogbl rpl_ilogbl
1330# endif
1331_GL_FUNCDECL_RPL (ilogbl, int, (long double x));
1332_GL_CXXALIAS_RPL (ilogbl, int, (long double x));
1333# else
1334# if !@HAVE_ILOGBL@
1335# undef ilogbl
1142_GL_FUNCDECL_SYS (ilogbl, int, (long double x)); 1336_GL_FUNCDECL_SYS (ilogbl, int, (long double x));
1143# endif 1337# endif
1144_GL_CXXALIAS_SYS (ilogbl, int, (long double x)); 1338_GL_CXXALIAS_SYS (ilogbl, int, (long double x));
1339# endif
1145_GL_CXXALIASWARN (ilogbl); 1340_GL_CXXALIASWARN (ilogbl);
1146#elif defined GNULIB_POSIXCHECK 1341#elif defined GNULIB_POSIXCHECK
1147# undef ilogbl 1342# undef ilogbl
@@ -1152,6 +1347,55 @@ _GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - "
1152#endif 1347#endif
1153 1348
1154 1349
1350#if @GNULIB_MDA_J0@
1351/* On native Windows, map 'j0' to '_j0', so that -loldnames is not
1352 required. In C++ with GNULIB_NAMESPACE, avoid differences between
1353 platforms by defining GNULIB_NAMESPACE::j0 always. */
1354# if defined _WIN32 && !defined __CYGWIN__
1355# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1356# undef j0
1357# define j0 _j0
1358# endif
1359_GL_CXXALIAS_MDA (j0, double, (double x));
1360# else
1361_GL_CXXALIAS_SYS (j0, double, (double x));
1362# endif
1363_GL_CXXALIASWARN (j0);
1364#endif
1365
1366#if @GNULIB_MDA_J1@
1367/* On native Windows, map 'j1' to '_j1', so that -loldnames is not
1368 required. In C++ with GNULIB_NAMESPACE, avoid differences between
1369 platforms by defining GNULIB_NAMESPACE::j1 always. */
1370# if defined _WIN32 && !defined __CYGWIN__
1371# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1372# undef j1
1373# define j1 _j1
1374# endif
1375_GL_CXXALIAS_MDA (j1, double, (double x));
1376# else
1377_GL_CXXALIAS_SYS (j1, double, (double x));
1378# endif
1379_GL_CXXALIASWARN (j1);
1380#endif
1381
1382#if @GNULIB_MDA_JN@
1383/* On native Windows, map 'jn' to '_jn', so that -loldnames is not
1384 required. In C++ with GNULIB_NAMESPACE, avoid differences between
1385 platforms by defining GNULIB_NAMESPACE::jn always. */
1386# if defined _WIN32 && !defined __CYGWIN__
1387# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1388# undef jn
1389# define jn _jn
1390# endif
1391_GL_CXXALIAS_MDA (jn, double, (int n, double x));
1392# else
1393_GL_CXXALIAS_SYS (jn, double, (int n, double x));
1394# endif
1395_GL_CXXALIASWARN (jn);
1396#endif
1397
1398
1155/* Return x * 2^exp. */ 1399/* Return x * 2^exp. */
1156#if @GNULIB_LDEXPF@ 1400#if @GNULIB_LDEXPF@
1157# if !@HAVE_LDEXPF@ 1401# if !@HAVE_LDEXPF@
@@ -1159,7 +1403,9 @@ _GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - "
1159_GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp)); 1403_GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp));
1160# endif 1404# endif
1161_GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp)); 1405_GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp));
1406# if __GLIBC__ >= 2
1162_GL_CXXALIASWARN (ldexpf); 1407_GL_CXXALIASWARN (ldexpf);
1408# endif
1163#elif defined GNULIB_POSIXCHECK 1409#elif defined GNULIB_POSIXCHECK
1164# undef ldexpf 1410# undef ldexpf
1165# if HAVE_RAW_DECL_LDEXPF 1411# if HAVE_RAW_DECL_LDEXPF
@@ -1185,7 +1431,9 @@ _GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp));
1185# endif 1431# endif
1186#endif 1432#endif
1187#if @GNULIB_LDEXPL@ 1433#if @GNULIB_LDEXPL@
1434# if __GLIBC__ >= 2
1188_GL_CXXALIASWARN (ldexpl); 1435_GL_CXXALIASWARN (ldexpl);
1436# endif
1189#endif 1437#endif
1190#if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK 1438#if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
1191# undef ldexpl 1439# undef ldexpl
@@ -1231,7 +1479,9 @@ _GL_CXXALIAS_RPL (log, double, (double x));
1231# else 1479# else
1232_GL_CXXALIAS_SYS (log, double, (double x)); 1480_GL_CXXALIAS_SYS (log, double, (double x));
1233# endif 1481# endif
1234_GL_CXXALIASWARN (log); 1482# if __GLIBC__ >= 2
1483_GL_CXXALIASWARN1 (log, double, (double x));
1484# endif
1235#elif defined GNULIB_POSIXCHECK 1485#elif defined GNULIB_POSIXCHECK
1236# undef log 1486# undef log
1237# if HAVE_RAW_DECL_LOG 1487# if HAVE_RAW_DECL_LOG
@@ -1255,7 +1505,9 @@ _GL_FUNCDECL_SYS (logl, long double, (long double x));
1255# endif 1505# endif
1256_GL_CXXALIAS_SYS (logl, long double, (long double x)); 1506_GL_CXXALIAS_SYS (logl, long double, (long double x));
1257# endif 1507# endif
1508# if __GLIBC__ >= 2
1258_GL_CXXALIASWARN (logl); 1509_GL_CXXALIASWARN (logl);
1510# endif
1259#elif defined GNULIB_POSIXCHECK 1511#elif defined GNULIB_POSIXCHECK
1260# undef logl 1512# undef logl
1261# if HAVE_RAW_DECL_LOGL 1513# if HAVE_RAW_DECL_LOGL
@@ -1300,7 +1552,9 @@ _GL_CXXALIAS_RPL (log10, double, (double x));
1300# else 1552# else
1301_GL_CXXALIAS_SYS (log10, double, (double x)); 1553_GL_CXXALIAS_SYS (log10, double, (double x));
1302# endif 1554# endif
1303_GL_CXXALIASWARN (log10); 1555# if __GLIBC__ >= 2
1556_GL_CXXALIASWARN1 (log10, double, (double x));
1557# endif
1304#elif defined GNULIB_POSIXCHECK 1558#elif defined GNULIB_POSIXCHECK
1305# undef log10 1559# undef log10
1306# if HAVE_RAW_DECL_LOG10 1560# if HAVE_RAW_DECL_LOG10
@@ -1324,7 +1578,9 @@ _GL_FUNCDECL_SYS (log10l, long double, (long double x));
1324# endif 1578# endif
1325_GL_CXXALIAS_SYS (log10l, long double, (long double x)); 1579_GL_CXXALIAS_SYS (log10l, long double, (long double x));
1326# endif 1580# endif
1581# if __GLIBC__ >= 2
1327_GL_CXXALIASWARN (log10l); 1582_GL_CXXALIASWARN (log10l);
1583# endif
1328#elif defined GNULIB_POSIXCHECK 1584#elif defined GNULIB_POSIXCHECK
1329# undef log10l 1585# undef log10l
1330# if HAVE_RAW_DECL_LOG10L 1586# if HAVE_RAW_DECL_LOG10L
@@ -1371,7 +1627,9 @@ _GL_FUNCDECL_SYS (log1p, double, (double x));
1371# endif 1627# endif
1372_GL_CXXALIAS_SYS (log1p, double, (double x)); 1628_GL_CXXALIAS_SYS (log1p, double, (double x));
1373# endif 1629# endif
1374_GL_CXXALIASWARN (log1p); 1630# if __GLIBC__ >= 2
1631_GL_CXXALIASWARN1 (log1p, double, (double x));
1632# endif
1375#elif defined GNULIB_POSIXCHECK 1633#elif defined GNULIB_POSIXCHECK
1376# undef log1p 1634# undef log1p
1377# if HAVE_RAW_DECL_LOG1P 1635# if HAVE_RAW_DECL_LOG1P
@@ -1443,7 +1701,9 @@ _GL_FUNCDECL_SYS (log2, double, (double x));
1443# endif 1701# endif
1444_GL_CXXALIAS_SYS (log2, double, (double x)); 1702_GL_CXXALIAS_SYS (log2, double, (double x));
1445# endif 1703# endif
1446_GL_CXXALIASWARN (log2); 1704# if __GLIBC__ >= 2
1705_GL_CXXALIASWARN1 (log2, double, (double x));
1706# endif
1447#elif defined GNULIB_POSIXCHECK 1707#elif defined GNULIB_POSIXCHECK
1448# undef log2 1708# undef log2
1449# if HAVE_RAW_DECL_LOG2 1709# if HAVE_RAW_DECL_LOG2
@@ -1513,7 +1773,9 @@ _GL_FUNCDECL_SYS (logb, double, (double x));
1513# endif 1773# endif
1514_GL_CXXALIAS_SYS (logb, double, (double x)); 1774_GL_CXXALIAS_SYS (logb, double, (double x));
1515# endif 1775# endif
1516_GL_CXXALIASWARN (logb); 1776# if __GLIBC__ >= 2
1777_GL_CXXALIASWARN1 (logb, double, (double x));
1778# endif
1517#elif defined GNULIB_POSIXCHECK 1779#elif defined GNULIB_POSIXCHECK
1518# undef logb 1780# undef logb
1519# if HAVE_RAW_DECL_LOGB 1781# if HAVE_RAW_DECL_LOGB
@@ -1581,7 +1843,9 @@ _GL_CXXALIAS_RPL (modf, double, (double x, double *iptr));
1581# else 1843# else
1582_GL_CXXALIAS_SYS (modf, double, (double x, double *iptr)); 1844_GL_CXXALIAS_SYS (modf, double, (double x, double *iptr));
1583# endif 1845# endif
1584_GL_CXXALIASWARN (modf); 1846# if __GLIBC__ >= 2
1847_GL_CXXALIASWARN1 (modf, double, (double x, double *iptr));
1848# endif
1585#elif defined GNULIB_POSIXCHECK 1849#elif defined GNULIB_POSIXCHECK
1586# undef modf 1850# undef modf
1587# if HAVE_RAW_DECL_MODF 1851# if HAVE_RAW_DECL_MODF
@@ -1607,7 +1871,9 @@ _GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr)
1607# endif 1871# endif
1608_GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr)); 1872_GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr));
1609# endif 1873# endif
1874# if __GLIBC__ >= 2
1610_GL_CXXALIASWARN (modfl); 1875_GL_CXXALIASWARN (modfl);
1876# endif
1611#elif defined GNULIB_POSIXCHECK 1877#elif defined GNULIB_POSIXCHECK
1612# undef modfl 1878# undef modfl
1613# if HAVE_RAW_DECL_MODFL 1879# if HAVE_RAW_DECL_MODFL
@@ -1670,7 +1936,9 @@ _GL_FUNCDECL_SYS (remainder, double, (double x, double y));
1670# endif 1936# endif
1671_GL_CXXALIAS_SYS (remainder, double, (double x, double y)); 1937_GL_CXXALIAS_SYS (remainder, double, (double x, double y));
1672# endif 1938# endif
1673_GL_CXXALIASWARN (remainder); 1939# if __GLIBC__ >= 2
1940_GL_CXXALIASWARN1 (remainder, double, (double x, double y));
1941# endif
1674#elif defined GNULIB_POSIXCHECK 1942#elif defined GNULIB_POSIXCHECK
1675# undef remainder 1943# undef remainder
1676# if HAVE_RAW_DECL_REMAINDER 1944# if HAVE_RAW_DECL_REMAINDER
@@ -1690,7 +1958,9 @@ _GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y));
1690# else 1958# else
1691# if !@HAVE_DECL_REMAINDERL@ 1959# if !@HAVE_DECL_REMAINDERL@
1692# undef remainderl 1960# undef remainderl
1961# if !(defined __cplusplus && defined _AIX)
1693_GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y)); 1962_GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y));
1963# endif
1694# endif 1964# endif
1695_GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y)); 1965_GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y));
1696# endif 1966# endif
@@ -1723,7 +1993,9 @@ _GL_WARN_ON_USE (rintf, "rintf is unportable - "
1723_GL_FUNCDECL_SYS (rint, double, (double x)); 1993_GL_FUNCDECL_SYS (rint, double, (double x));
1724# endif 1994# endif
1725_GL_CXXALIAS_SYS (rint, double, (double x)); 1995_GL_CXXALIAS_SYS (rint, double, (double x));
1726_GL_CXXALIASWARN (rint); 1996# if __GLIBC__ >= 2
1997_GL_CXXALIASWARN1 (rint, double, (double x));
1998# endif
1727#elif defined GNULIB_POSIXCHECK 1999#elif defined GNULIB_POSIXCHECK
1728# undef rint 2000# undef rint
1729# if HAVE_RAW_DECL_RINT 2001# if HAVE_RAW_DECL_RINT
@@ -1733,10 +2005,19 @@ _GL_WARN_ON_USE (rint, "rint is unportable - "
1733#endif 2005#endif
1734 2006
1735#if @GNULIB_RINTL@ 2007#if @GNULIB_RINTL@
1736# if !@HAVE_RINTL@ 2008# if @REPLACE_RINTL@
2009# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2010# undef rintl
2011# define rintl rpl_rintl
2012# endif
2013_GL_FUNCDECL_RPL (rintl, long double, (long double x));
2014_GL_CXXALIAS_RPL (rintl, long double, (long double x));
2015# else
2016# if !@HAVE_RINTL@
1737_GL_FUNCDECL_SYS (rintl, long double, (long double x)); 2017_GL_FUNCDECL_SYS (rintl, long double, (long double x));
1738# endif 2018# endif
1739_GL_CXXALIAS_SYS (rintl, long double, (long double x)); 2019_GL_CXXALIAS_SYS (rintl, long double, (long double x));
2020# endif
1740_GL_CXXALIASWARN (rintl); 2021_GL_CXXALIASWARN (rintl);
1741#elif defined GNULIB_POSIXCHECK 2022#elif defined GNULIB_POSIXCHECK
1742# undef rintl 2023# undef rintl
@@ -1784,7 +2065,9 @@ _GL_FUNCDECL_SYS (round, double, (double x));
1784# endif 2065# endif
1785_GL_CXXALIAS_SYS (round, double, (double x)); 2066_GL_CXXALIAS_SYS (round, double, (double x));
1786# endif 2067# endif
1787_GL_CXXALIASWARN (round); 2068# if __GLIBC__ >= 2
2069_GL_CXXALIASWARN1 (round, double, (double x));
2070# endif
1788#elif defined GNULIB_POSIXCHECK 2071#elif defined GNULIB_POSIXCHECK
1789# undef round 2072# undef round
1790# if HAVE_RAW_DECL_ROUND 2073# if HAVE_RAW_DECL_ROUND
@@ -1804,7 +2087,9 @@ _GL_CXXALIAS_RPL (roundl, long double, (long double x));
1804# else 2087# else
1805# if !@HAVE_DECL_ROUNDL@ 2088# if !@HAVE_DECL_ROUNDL@
1806# undef roundl 2089# undef roundl
2090# if !(defined __cplusplus && defined _AIX)
1807_GL_FUNCDECL_SYS (roundl, long double, (long double x)); 2091_GL_FUNCDECL_SYS (roundl, long double, (long double x));
2092# endif
1808# endif 2093# endif
1809_GL_CXXALIAS_SYS (roundl, long double, (long double x)); 2094_GL_CXXALIAS_SYS (roundl, long double, (long double x));
1810# endif 2095# endif
@@ -1819,11 +2104,20 @@ _GL_WARN_ON_USE (roundl, "roundl is unportable - "
1819 2104
1820 2105
1821#if @GNULIB_SINF@ 2106#if @GNULIB_SINF@
1822# if !@HAVE_SINF@ 2107# if @REPLACE_SINF@
1823# undef sinf 2108# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2109# undef sinf
2110# define sinf rpl_sinf
2111# endif
2112_GL_FUNCDECL_RPL (sinf, float, (float x));
2113_GL_CXXALIAS_RPL (sinf, float, (float x));
2114# else
2115# if !@HAVE_SINF@
2116# undef sinf
1824_GL_FUNCDECL_SYS (sinf, float, (float x)); 2117_GL_FUNCDECL_SYS (sinf, float, (float x));
1825# endif 2118# endif
1826_GL_CXXALIAS_SYS (sinf, float, (float x)); 2119_GL_CXXALIAS_SYS (sinf, float, (float x));
2120# endif
1827_GL_CXXALIASWARN (sinf); 2121_GL_CXXALIASWARN (sinf);
1828#elif defined GNULIB_POSIXCHECK 2122#elif defined GNULIB_POSIXCHECK
1829# undef sinf 2123# undef sinf
@@ -1839,7 +2133,9 @@ _GL_WARN_ON_USE (sinf, "sinf is unportable - "
1839_GL_FUNCDECL_SYS (sinl, long double, (long double x)); 2133_GL_FUNCDECL_SYS (sinl, long double, (long double x));
1840# endif 2134# endif
1841_GL_CXXALIAS_SYS (sinl, long double, (long double x)); 2135_GL_CXXALIAS_SYS (sinl, long double, (long double x));
2136# if __GLIBC__ >= 2
1842_GL_CXXALIASWARN (sinl); 2137_GL_CXXALIASWARN (sinl);
2138# endif
1843#elif defined GNULIB_POSIXCHECK 2139#elif defined GNULIB_POSIXCHECK
1844# undef sinl 2140# undef sinl
1845# if HAVE_RAW_DECL_SINL 2141# if HAVE_RAW_DECL_SINL
@@ -1850,11 +2146,20 @@ _GL_WARN_ON_USE (sinl, "sinl is unportable - "
1850 2146
1851 2147
1852#if @GNULIB_SINHF@ 2148#if @GNULIB_SINHF@
1853# if !@HAVE_SINHF@ 2149# if @REPLACE_SINHF@
1854# undef sinhf 2150# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2151# undef sinhf
2152# define sinhf rpl_sinhf
2153# endif
2154_GL_FUNCDECL_RPL (sinhf, float, (float x));
2155_GL_CXXALIAS_RPL (sinhf, float, (float x));
2156# else
2157# if !@HAVE_SINHF@
2158# undef sinhf
1855_GL_FUNCDECL_SYS (sinhf, float, (float x)); 2159_GL_FUNCDECL_SYS (sinhf, float, (float x));
1856# endif 2160# endif
1857_GL_CXXALIAS_SYS (sinhf, float, (float x)); 2161_GL_CXXALIAS_SYS (sinhf, float, (float x));
2162# endif
1858_GL_CXXALIASWARN (sinhf); 2163_GL_CXXALIASWARN (sinhf);
1859#elif defined GNULIB_POSIXCHECK 2164#elif defined GNULIB_POSIXCHECK
1860# undef sinhf 2165# undef sinhf
@@ -1866,11 +2171,20 @@ _GL_WARN_ON_USE (sinhf, "sinhf is unportable - "
1866 2171
1867 2172
1868#if @GNULIB_SQRTF@ 2173#if @GNULIB_SQRTF@
1869# if !@HAVE_SQRTF@ 2174# if @REPLACE_SQRTF@
1870# undef sqrtf 2175# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2176# undef sqrtf
2177# define sqrtf rpl_sqrtf
2178# endif
2179_GL_FUNCDECL_RPL (sqrtf, float, (float x));
2180_GL_CXXALIAS_RPL (sqrtf, float, (float x));
2181# else
2182# if !@HAVE_SQRTF@
2183# undef sqrtf
1871_GL_FUNCDECL_SYS (sqrtf, float, (float x)); 2184_GL_FUNCDECL_SYS (sqrtf, float, (float x));
1872# endif 2185# endif
1873_GL_CXXALIAS_SYS (sqrtf, float, (float x)); 2186_GL_CXXALIAS_SYS (sqrtf, float, (float x));
2187# endif
1874_GL_CXXALIASWARN (sqrtf); 2188_GL_CXXALIASWARN (sqrtf);
1875#elif defined GNULIB_POSIXCHECK 2189#elif defined GNULIB_POSIXCHECK
1876# undef sqrtf 2190# undef sqrtf
@@ -1895,7 +2209,9 @@ _GL_FUNCDECL_SYS (sqrtl, long double, (long double x));
1895# endif 2209# endif
1896_GL_CXXALIAS_SYS (sqrtl, long double, (long double x)); 2210_GL_CXXALIAS_SYS (sqrtl, long double, (long double x));
1897# endif 2211# endif
2212# if __GLIBC__ >= 2
1898_GL_CXXALIASWARN (sqrtl); 2213_GL_CXXALIASWARN (sqrtl);
2214# endif
1899#elif defined GNULIB_POSIXCHECK 2215#elif defined GNULIB_POSIXCHECK
1900# undef sqrtl 2216# undef sqrtl
1901# if HAVE_RAW_DECL_SQRTL 2217# if HAVE_RAW_DECL_SQRTL
@@ -1906,11 +2222,20 @@ _GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - "
1906 2222
1907 2223
1908#if @GNULIB_TANF@ 2224#if @GNULIB_TANF@
1909# if !@HAVE_TANF@ 2225# if @REPLACE_TANF@
1910# undef tanf 2226# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2227# undef tanf
2228# define tanf rpl_tanf
2229# endif
2230_GL_FUNCDECL_RPL (tanf, float, (float x));
2231_GL_CXXALIAS_RPL (tanf, float, (float x));
2232# else
2233# if !@HAVE_TANF@
2234# undef tanf
1911_GL_FUNCDECL_SYS (tanf, float, (float x)); 2235_GL_FUNCDECL_SYS (tanf, float, (float x));
1912# endif 2236# endif
1913_GL_CXXALIAS_SYS (tanf, float, (float x)); 2237_GL_CXXALIAS_SYS (tanf, float, (float x));
2238# endif
1914_GL_CXXALIASWARN (tanf); 2239_GL_CXXALIASWARN (tanf);
1915#elif defined GNULIB_POSIXCHECK 2240#elif defined GNULIB_POSIXCHECK
1916# undef tanf 2241# undef tanf
@@ -1926,7 +2251,9 @@ _GL_WARN_ON_USE (tanf, "tanf is unportable - "
1926_GL_FUNCDECL_SYS (tanl, long double, (long double x)); 2251_GL_FUNCDECL_SYS (tanl, long double, (long double x));
1927# endif 2252# endif
1928_GL_CXXALIAS_SYS (tanl, long double, (long double x)); 2253_GL_CXXALIAS_SYS (tanl, long double, (long double x));
2254# if __GLIBC__ >= 2
1929_GL_CXXALIASWARN (tanl); 2255_GL_CXXALIASWARN (tanl);
2256# endif
1930#elif defined GNULIB_POSIXCHECK 2257#elif defined GNULIB_POSIXCHECK
1931# undef tanl 2258# undef tanl
1932# if HAVE_RAW_DECL_TANL 2259# if HAVE_RAW_DECL_TANL
@@ -1937,11 +2264,20 @@ _GL_WARN_ON_USE (tanl, "tanl is unportable - "
1937 2264
1938 2265
1939#if @GNULIB_TANHF@ 2266#if @GNULIB_TANHF@
1940# if !@HAVE_TANHF@ 2267# if @REPLACE_TANHF@
1941# undef tanhf 2268# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2269# undef tanhf
2270# define tanhf rpl_tanhf
2271# endif
2272_GL_FUNCDECL_RPL (tanhf, float, (float x));
2273_GL_CXXALIAS_RPL (tanhf, float, (float x));
2274# else
2275# if !@HAVE_TANHF@
2276# undef tanhf
1942_GL_FUNCDECL_SYS (tanhf, float, (float x)); 2277_GL_FUNCDECL_SYS (tanhf, float, (float x));
1943# endif 2278# endif
1944_GL_CXXALIAS_SYS (tanhf, float, (float x)); 2279_GL_CXXALIAS_SYS (tanhf, float, (float x));
2280# endif
1945_GL_CXXALIASWARN (tanhf); 2281_GL_CXXALIASWARN (tanhf);
1946#elif defined GNULIB_POSIXCHECK 2282#elif defined GNULIB_POSIXCHECK
1947# undef tanhf 2283# undef tanhf
@@ -1955,6 +2291,7 @@ _GL_WARN_ON_USE (tanhf, "tanhf is unportable - "
1955#if @GNULIB_TRUNCF@ 2291#if @GNULIB_TRUNCF@
1956# if @REPLACE_TRUNCF@ 2292# if @REPLACE_TRUNCF@
1957# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2293# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2294# undef truncf
1958# define truncf rpl_truncf 2295# define truncf rpl_truncf
1959# endif 2296# endif
1960_GL_FUNCDECL_RPL (truncf, float, (float x)); 2297_GL_FUNCDECL_RPL (truncf, float, (float x));
@@ -1977,6 +2314,7 @@ _GL_WARN_ON_USE (truncf, "truncf is unportable - "
1977#if @GNULIB_TRUNC@ 2314#if @GNULIB_TRUNC@
1978# if @REPLACE_TRUNC@ 2315# if @REPLACE_TRUNC@
1979# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2316# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2317# undef trunc
1980# define trunc rpl_trunc 2318# define trunc rpl_trunc
1981# endif 2319# endif
1982_GL_FUNCDECL_RPL (trunc, double, (double x)); 2320_GL_FUNCDECL_RPL (trunc, double, (double x));
@@ -1987,7 +2325,9 @@ _GL_FUNCDECL_SYS (trunc, double, (double x));
1987# endif 2325# endif
1988_GL_CXXALIAS_SYS (trunc, double, (double x)); 2326_GL_CXXALIAS_SYS (trunc, double, (double x));
1989# endif 2327# endif
1990_GL_CXXALIASWARN (trunc); 2328# if __GLIBC__ >= 2
2329_GL_CXXALIASWARN1 (trunc, double, (double x));
2330# endif
1991#elif defined GNULIB_POSIXCHECK 2331#elif defined GNULIB_POSIXCHECK
1992# undef trunc 2332# undef trunc
1993# if HAVE_RAW_DECL_TRUNC 2333# if HAVE_RAW_DECL_TRUNC
@@ -2020,6 +2360,55 @@ _GL_WARN_ON_USE (truncl, "truncl is unportable - "
2020#endif 2360#endif
2021 2361
2022 2362
2363#if @GNULIB_MDA_Y0@
2364/* On native Windows, map 'y0' to '_y0', so that -loldnames is not
2365 required. In C++ with GNULIB_NAMESPACE, avoid differences between
2366 platforms by defining GNULIB_NAMESPACE::y0 always. */
2367# if defined _WIN32 && !defined __CYGWIN__
2368# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2369# undef y0
2370# define y0 _y0
2371# endif
2372_GL_CXXALIAS_MDA (y0, double, (double x));
2373# else
2374_GL_CXXALIAS_SYS (y0, double, (double x));
2375# endif
2376_GL_CXXALIASWARN (y0);
2377#endif
2378
2379#if @GNULIB_MDA_Y1@
2380/* On native Windows, map 'y1' to '_y1', so that -loldnames is not
2381 required. In C++ with GNULIB_NAMESPACE, avoid differences between
2382 platforms by defining GNULIB_NAMESPACE::y1 always. */
2383# if defined _WIN32 && !defined __CYGWIN__
2384# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2385# undef y1
2386# define y1 _y1
2387# endif
2388_GL_CXXALIAS_MDA (y1, double, (double x));
2389# else
2390_GL_CXXALIAS_SYS (y1, double, (double x));
2391# endif
2392_GL_CXXALIASWARN (y1);
2393#endif
2394
2395#if @GNULIB_MDA_YN@
2396/* On native Windows, map 'yn' to '_yn', so that -loldnames is not
2397 required. In C++ with GNULIB_NAMESPACE, avoid differences between
2398 platforms by defining GNULIB_NAMESPACE::yn always. */
2399# if defined _WIN32 && !defined __CYGWIN__
2400# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2401# undef yn
2402# define yn _yn
2403# endif
2404_GL_CXXALIAS_MDA (yn, double, (int n, double x));
2405# else
2406_GL_CXXALIAS_SYS (yn, double, (int n, double x));
2407# endif
2408_GL_CXXALIASWARN (yn);
2409#endif
2410
2411
2023/* Definitions of function-like macros come here, after the function 2412/* Definitions of function-like macros come here, after the function
2024 declarations. */ 2413 declarations. */
2025 2414
@@ -2036,10 +2425,17 @@ _GL_EXTERN_C int gl_isfinitel (long double x);
2036 gl_isfinitef (x)) 2425 gl_isfinitef (x))
2037# endif 2426# endif
2038# ifdef __cplusplus 2427# ifdef __cplusplus
2039# ifdef isfinite 2428# if defined isfinite || defined GNULIB_NAMESPACE
2040_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) 2429_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite)
2041# undef isfinite 2430# undef isfinite
2042_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite) 2431# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__)))
2432 /* This platform's <cmath> possibly defines isfinite through a set of inline
2433 functions. */
2434_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool)
2435# define isfinite rpl_isfinite
2436# else
2437_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool)
2438# endif
2043# endif 2439# endif
2044# endif 2440# endif
2045#elif defined GNULIB_POSIXCHECK 2441#elif defined GNULIB_POSIXCHECK
@@ -2063,10 +2459,17 @@ _GL_EXTERN_C int gl_isinfl (long double x);
2063 gl_isinff (x)) 2459 gl_isinff (x))
2064# endif 2460# endif
2065# ifdef __cplusplus 2461# ifdef __cplusplus
2066# ifdef isinf 2462# if defined isinf || defined GNULIB_NAMESPACE
2067_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) 2463_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf)
2068# undef isinf 2464# undef isinf
2069_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf) 2465# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__)))
2466 /* This platform's <cmath> possibly defines isinf through a set of inline
2467 functions. */
2468_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool)
2469# define isinf rpl_isinf
2470# else
2471_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool)
2472# endif
2070# endif 2473# endif
2071# endif 2474# endif
2072#elif defined GNULIB_POSIXCHECK 2475#elif defined GNULIB_POSIXCHECK
@@ -2083,10 +2486,11 @@ _GL_WARN_REAL_FLOATING_DECL (isinf);
2083# if @HAVE_ISNANF@ 2486# if @HAVE_ISNANF@
2084/* The original <math.h> included above provides a declaration of isnan macro 2487/* The original <math.h> included above provides a declaration of isnan macro
2085 or (older) isnanf function. */ 2488 or (older) isnanf function. */
2086# if __GNUC__ >= 4 2489# if (__GNUC__ >= 4) || (__clang_major__ >= 4)
2087 /* GCC 4.0 and newer provides three built-ins for isnan. */ 2490 /* GCC >= 4.0 and clang provide a type-generic built-in for isnan.
2491 GCC >= 4.0 also provides __builtin_isnanf, but clang doesn't. */
2088# undef isnanf 2492# undef isnanf
2089# define isnanf(x) __builtin_isnanf ((float)(x)) 2493# define isnanf(x) __builtin_isnan ((float)(x))
2090# elif defined isnan 2494# elif defined isnan
2091# undef isnanf 2495# undef isnanf
2092# define isnanf(x) isnan ((float)(x)) 2496# define isnanf(x) isnan ((float)(x))
@@ -2106,8 +2510,8 @@ _GL_EXTERN_C int isnanf (float x);
2106# if @HAVE_ISNAND@ 2510# if @HAVE_ISNAND@
2107/* The original <math.h> included above provides a declaration of isnan 2511/* The original <math.h> included above provides a declaration of isnan
2108 macro. */ 2512 macro. */
2109# if __GNUC__ >= 4 2513# if (__GNUC__ >= 4) || (__clang_major__ >= 4)
2110 /* GCC 4.0 and newer provides three built-ins for isnan. */ 2514 /* GCC >= 4.0 and clang provide a type-generic built-in for isnan. */
2111# undef isnand 2515# undef isnand
2112# define isnand(x) __builtin_isnan ((double)(x)) 2516# define isnand(x) __builtin_isnan ((double)(x))
2113# else 2517# else
@@ -2127,10 +2531,11 @@ _GL_EXTERN_C int isnand (double x);
2127# if @HAVE_ISNANL@ 2531# if @HAVE_ISNANL@
2128/* The original <math.h> included above provides a declaration of isnan 2532/* The original <math.h> included above provides a declaration of isnan
2129 macro or (older) isnanl function. */ 2533 macro or (older) isnanl function. */
2130# if __GNUC__ >= 4 2534# if (__GNUC__ >= 4) || (__clang_major__ >= 4)
2131 /* GCC 4.0 and newer provides three built-ins for isnan. */ 2535 /* GCC >= 4.0 and clang provide a type-generic built-in for isnan.
2536 GCC >= 4.0 also provides __builtin_isnanl, but clang doesn't. */
2132# undef isnanl 2537# undef isnanl
2133# define isnanl(x) __builtin_isnanl ((long double)(x)) 2538# define isnanl(x) __builtin_isnan ((long double)(x))
2134# elif defined isnan 2539# elif defined isnan
2135# undef isnanl 2540# undef isnanl
2136# define isnanl(x) isnan ((long double)(x)) 2541# define isnanl(x) isnan ((long double)(x))
@@ -2150,20 +2555,20 @@ _GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST;
2150 isnanf.h (e.g.) here, because those may end up being macros 2555 isnanf.h (e.g.) here, because those may end up being macros
2151 that recursively expand back to isnan. So use the gnulib 2556 that recursively expand back to isnan. So use the gnulib
2152 replacements for them directly. */ 2557 replacements for them directly. */
2153# if @HAVE_ISNANF@ && __GNUC__ >= 4 2558# if @HAVE_ISNANF@ && (__GNUC__ >= 4) || (__clang_major__ >= 4)
2154# define gl_isnan_f(x) __builtin_isnanf ((float)(x)) 2559# define gl_isnan_f(x) __builtin_isnan ((float)(x))
2155# else 2560# else
2156_GL_EXTERN_C int rpl_isnanf (float x); 2561_GL_EXTERN_C int rpl_isnanf (float x);
2157# define gl_isnan_f(x) rpl_isnanf (x) 2562# define gl_isnan_f(x) rpl_isnanf (x)
2158# endif 2563# endif
2159# if @HAVE_ISNAND@ && __GNUC__ >= 4 2564# if @HAVE_ISNAND@ && (__GNUC__ >= 4) || (__clang_major__ >= 4)
2160# define gl_isnan_d(x) __builtin_isnan ((double)(x)) 2565# define gl_isnan_d(x) __builtin_isnan ((double)(x))
2161# else 2566# else
2162_GL_EXTERN_C int rpl_isnand (double x); 2567_GL_EXTERN_C int rpl_isnand (double x);
2163# define gl_isnan_d(x) rpl_isnand (x) 2568# define gl_isnan_d(x) rpl_isnand (x)
2164# endif 2569# endif
2165# if @HAVE_ISNANL@ && __GNUC__ >= 4 2570# if @HAVE_ISNANL@ && (__GNUC__ >= 4) || (__clang_major__ >= 4)
2166# define gl_isnan_l(x) __builtin_isnanl ((long double)(x)) 2571# define gl_isnan_l(x) __builtin_isnan ((long double)(x))
2167# else 2572# else
2168_GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; 2573_GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST;
2169# define gl_isnan_l(x) rpl_isnanl (x) 2574# define gl_isnan_l(x) rpl_isnanl (x)
@@ -2173,18 +2578,25 @@ _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST;
2173 (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ 2578 (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
2174 sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ 2579 sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
2175 gl_isnan_f (x)) 2580 gl_isnan_f (x))
2176# elif __GNUC__ >= 4 2581# elif (__GNUC__ >= 4) || (__clang_major__ >= 4)
2177# undef isnan 2582# undef isnan
2178# define isnan(x) \ 2583# define isnan(x) \
2179 (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \ 2584 (sizeof (x) == sizeof (long double) ? __builtin_isnan ((long double)(x)) : \
2180 sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ 2585 sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
2181 __builtin_isnanf ((float)(x))) 2586 __builtin_isnan ((float)(x)))
2182# endif 2587# endif
2183# ifdef __cplusplus 2588# ifdef __cplusplus
2184# ifdef isnan 2589# if defined isnan || defined GNULIB_NAMESPACE
2185_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) 2590_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan)
2186# undef isnan 2591# undef isnan
2187_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan) 2592# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__ && __clang_major__ < 12) || (defined __FreeBSD__ && __clang_major__ < 7) || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__)))
2593 /* This platform's <cmath> possibly defines isnan through a set of inline
2594 functions. */
2595_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool)
2596# define isnan rpl_isnan
2597# else
2598_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool)
2599# endif
2188# endif 2600# endif
2189# else 2601# else
2190/* Ensure isnan is a macro. */ 2602/* Ensure isnan is a macro. */
@@ -2202,20 +2614,21 @@ _GL_WARN_REAL_FLOATING_DECL (isnan);
2202 2614
2203 2615
2204#if @GNULIB_SIGNBIT@ 2616#if @GNULIB_SIGNBIT@
2205# if @REPLACE_SIGNBIT_USING_GCC@ 2617# if (@REPLACE_SIGNBIT_USING_BUILTINS@ \
2618 && (!defined __cplusplus || __cplusplus < 201103))
2206# undef signbit 2619# undef signbit
2207 /* GCC 4.0 and newer provides three built-ins for signbit. */ 2620 /* GCC >= 4.0 and clang provide three built-ins for signbit. */
2208# define signbit(x) \ 2621# define signbit(x) \
2209 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ 2622 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
2210 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ 2623 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
2211 __builtin_signbitf (x)) 2624 __builtin_signbitf (x))
2212# endif 2625# endif
2213# if @REPLACE_SIGNBIT@ 2626# if @REPLACE_SIGNBIT@ && !GNULIB_defined_signbit
2214# undef signbit 2627# undef signbit
2215_GL_EXTERN_C int gl_signbitf (float arg); 2628_GL_EXTERN_C int gl_signbitf (float arg);
2216_GL_EXTERN_C int gl_signbitd (double arg); 2629_GL_EXTERN_C int gl_signbitd (double arg);
2217_GL_EXTERN_C int gl_signbitl (long double arg); 2630_GL_EXTERN_C int gl_signbitl (long double arg);
2218# if __GNUC__ >= 2 && !defined __STRICT_ANSI__ 2631# if (__GNUC__ >= 2 || defined __clang__) && !defined __STRICT_ANSI__
2219# define _GL_NUM_UINT_WORDS(type) \ 2632# define _GL_NUM_UINT_WORDS(type) \
2220 ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) 2633 ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
2221# if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf 2634# if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
@@ -2253,12 +2666,20 @@ _GL_EXTERN_C int gl_signbitl (long double arg);
2253 (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ 2666 (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
2254 sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ 2667 sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
2255 gl_signbitf (x)) 2668 gl_signbitf (x))
2669# define GNULIB_defined_signbit 1
2256# endif 2670# endif
2257# ifdef __cplusplus 2671# ifdef __cplusplus
2258# ifdef signbit 2672# if defined signbit || defined GNULIB_NAMESPACE
2259_GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) 2673_GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit)
2260# undef signbit 2674# undef signbit
2261_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit) 2675# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__)))
2676 /* This platform's <cmath> possibly defines signbit through a set of inline
2677 functions. */
2678_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool)
2679# define signbit rpl_signbit
2680# else
2681_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool)
2682# endif
2262# endif 2683# endif
2263# endif 2684# endif
2264#elif defined GNULIB_POSIXCHECK 2685#elif defined GNULIB_POSIXCHECK
@@ -2272,4 +2693,5 @@ _GL_WARN_REAL_FLOATING_DECL (signbit);
2272_GL_INLINE_HEADER_END 2693_GL_INLINE_HEADER_END
2273 2694
2274#endif /* _@GUARD_PREFIX@_MATH_H */ 2695#endif /* _@GUARD_PREFIX@_MATH_H */
2696#endif /* _GL_INCLUDING_MATH_H */
2275#endif /* _@GUARD_PREFIX@_MATH_H */ 2697#endif /* _@GUARD_PREFIX@_MATH_H */