diff options
Diffstat (limited to 'gl/math.in.h')
-rw-r--r-- | gl/math.in.h | 696 |
1 files changed, 561 insertions, 135 deletions
diff --git a/gl/math.in.h b/gl/math.in.h index 7189819b..a74a95da 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-2022 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) \ |
63 | inline int \ | 96 | _GL_BEGIN_NAMESPACE \ |
64 | func (float f) \ | 97 | inline rettype \ |
98 | rpl_func (float f) \ | ||
65 | { \ | 99 | { \ |
66 | return _gl_cxx_ ## func ## f (f); \ | 100 | return _gl_cxx_ ## func ## f (f); \ |
67 | } \ | 101 | } \ |
68 | inline int \ | 102 | inline rettype \ |
69 | func (double d) \ | 103 | rpl_func (double d) \ |
70 | { \ | 104 | { \ |
71 | return _gl_cxx_ ## func ## d (d); \ | 105 | return _gl_cxx_ ## func ## d (d); \ |
72 | } \ | 106 | } \ |
73 | inline int \ | 107 | inline rettype \ |
74 | func (long double l) \ | 108 | rpl_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 \ |
86 | rpl_ ## 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); \ | 123 | rpl_ ## func ## f (float f) \ |
89 | } \ | 124 | { \ |
90 | _GL_MATH_INLINE int \ | 125 | return func (f); \ |
91 | rpl_ ## 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 \ | 130 | rpl_ ## func ## d (double d) \ |
96 | rpl_ ## 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 - " \ | 137 | rpl_ ## 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,18 @@ _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 | # define GNULIB_NAMESPACE_LACKS_ISFINITE 1 | ||
2437 | # else | ||
2438 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool) | ||
2439 | # endif | ||
2043 | # endif | 2440 | # endif |
2044 | # endif | 2441 | # endif |
2045 | #elif defined GNULIB_POSIXCHECK | 2442 | #elif defined GNULIB_POSIXCHECK |
@@ -2063,10 +2460,18 @@ _GL_EXTERN_C int gl_isinfl (long double x); | |||
2063 | gl_isinff (x)) | 2460 | gl_isinff (x)) |
2064 | # endif | 2461 | # endif |
2065 | # ifdef __cplusplus | 2462 | # ifdef __cplusplus |
2066 | # ifdef isinf | 2463 | # if defined isinf || defined GNULIB_NAMESPACE |
2067 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) | 2464 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) |
2068 | # undef isinf | 2465 | # undef isinf |
2069 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf) | 2466 | # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__))) |
2467 | /* This platform's <cmath> possibly defines isinf through a set of inline | ||
2468 | functions. */ | ||
2469 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool) | ||
2470 | # define isinf rpl_isinf | ||
2471 | # define GNULIB_NAMESPACE_LACKS_ISINF 1 | ||
2472 | # else | ||
2473 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool) | ||
2474 | # endif | ||
2070 | # endif | 2475 | # endif |
2071 | # endif | 2476 | # endif |
2072 | #elif defined GNULIB_POSIXCHECK | 2477 | #elif defined GNULIB_POSIXCHECK |
@@ -2083,10 +2488,11 @@ _GL_WARN_REAL_FLOATING_DECL (isinf); | |||
2083 | # if @HAVE_ISNANF@ | 2488 | # if @HAVE_ISNANF@ |
2084 | /* The original <math.h> included above provides a declaration of isnan macro | 2489 | /* The original <math.h> included above provides a declaration of isnan macro |
2085 | or (older) isnanf function. */ | 2490 | or (older) isnanf function. */ |
2086 | # if __GNUC__ >= 4 | 2491 | # if (__GNUC__ >= 4) || (__clang_major__ >= 4) |
2087 | /* GCC 4.0 and newer provides three built-ins for isnan. */ | 2492 | /* GCC >= 4.0 and clang provide a type-generic built-in for isnan. |
2493 | GCC >= 4.0 also provides __builtin_isnanf, but clang doesn't. */ | ||
2088 | # undef isnanf | 2494 | # undef isnanf |
2089 | # define isnanf(x) __builtin_isnanf ((float)(x)) | 2495 | # define isnanf(x) __builtin_isnan ((float)(x)) |
2090 | # elif defined isnan | 2496 | # elif defined isnan |
2091 | # undef isnanf | 2497 | # undef isnanf |
2092 | # define isnanf(x) isnan ((float)(x)) | 2498 | # define isnanf(x) isnan ((float)(x)) |
@@ -2106,8 +2512,8 @@ _GL_EXTERN_C int isnanf (float x); | |||
2106 | # if @HAVE_ISNAND@ | 2512 | # if @HAVE_ISNAND@ |
2107 | /* The original <math.h> included above provides a declaration of isnan | 2513 | /* The original <math.h> included above provides a declaration of isnan |
2108 | macro. */ | 2514 | macro. */ |
2109 | # if __GNUC__ >= 4 | 2515 | # if (__GNUC__ >= 4) || (__clang_major__ >= 4) |
2110 | /* GCC 4.0 and newer provides three built-ins for isnan. */ | 2516 | /* GCC >= 4.0 and clang provide a type-generic built-in for isnan. */ |
2111 | # undef isnand | 2517 | # undef isnand |
2112 | # define isnand(x) __builtin_isnan ((double)(x)) | 2518 | # define isnand(x) __builtin_isnan ((double)(x)) |
2113 | # else | 2519 | # else |
@@ -2127,10 +2533,11 @@ _GL_EXTERN_C int isnand (double x); | |||
2127 | # if @HAVE_ISNANL@ | 2533 | # if @HAVE_ISNANL@ |
2128 | /* The original <math.h> included above provides a declaration of isnan | 2534 | /* The original <math.h> included above provides a declaration of isnan |
2129 | macro or (older) isnanl function. */ | 2535 | macro or (older) isnanl function. */ |
2130 | # if __GNUC__ >= 4 | 2536 | # if (__GNUC__ >= 4) || (__clang_major__ >= 4) |
2131 | /* GCC 4.0 and newer provides three built-ins for isnan. */ | 2537 | /* GCC >= 4.0 and clang provide a type-generic built-in for isnan. |
2538 | GCC >= 4.0 also provides __builtin_isnanl, but clang doesn't. */ | ||
2132 | # undef isnanl | 2539 | # undef isnanl |
2133 | # define isnanl(x) __builtin_isnanl ((long double)(x)) | 2540 | # define isnanl(x) __builtin_isnan ((long double)(x)) |
2134 | # elif defined isnan | 2541 | # elif defined isnan |
2135 | # undef isnanl | 2542 | # undef isnanl |
2136 | # define isnanl(x) isnan ((long double)(x)) | 2543 | # define isnanl(x) isnan ((long double)(x)) |
@@ -2150,20 +2557,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 | 2557 | isnanf.h (e.g.) here, because those may end up being macros |
2151 | that recursively expand back to isnan. So use the gnulib | 2558 | that recursively expand back to isnan. So use the gnulib |
2152 | replacements for them directly. */ | 2559 | replacements for them directly. */ |
2153 | # if @HAVE_ISNANF@ && __GNUC__ >= 4 | 2560 | # if @HAVE_ISNANF@ && (__GNUC__ >= 4) || (__clang_major__ >= 4) |
2154 | # define gl_isnan_f(x) __builtin_isnanf ((float)(x)) | 2561 | # define gl_isnan_f(x) __builtin_isnan ((float)(x)) |
2155 | # else | 2562 | # else |
2156 | _GL_EXTERN_C int rpl_isnanf (float x); | 2563 | _GL_EXTERN_C int rpl_isnanf (float x); |
2157 | # define gl_isnan_f(x) rpl_isnanf (x) | 2564 | # define gl_isnan_f(x) rpl_isnanf (x) |
2158 | # endif | 2565 | # endif |
2159 | # if @HAVE_ISNAND@ && __GNUC__ >= 4 | 2566 | # if @HAVE_ISNAND@ && (__GNUC__ >= 4) || (__clang_major__ >= 4) |
2160 | # define gl_isnan_d(x) __builtin_isnan ((double)(x)) | 2567 | # define gl_isnan_d(x) __builtin_isnan ((double)(x)) |
2161 | # else | 2568 | # else |
2162 | _GL_EXTERN_C int rpl_isnand (double x); | 2569 | _GL_EXTERN_C int rpl_isnand (double x); |
2163 | # define gl_isnan_d(x) rpl_isnand (x) | 2570 | # define gl_isnan_d(x) rpl_isnand (x) |
2164 | # endif | 2571 | # endif |
2165 | # if @HAVE_ISNANL@ && __GNUC__ >= 4 | 2572 | # if @HAVE_ISNANL@ && (__GNUC__ >= 4) || (__clang_major__ >= 4) |
2166 | # define gl_isnan_l(x) __builtin_isnanl ((long double)(x)) | 2573 | # define gl_isnan_l(x) __builtin_isnan ((long double)(x)) |
2167 | # else | 2574 | # else |
2168 | _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; | 2575 | _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; |
2169 | # define gl_isnan_l(x) rpl_isnanl (x) | 2576 | # define gl_isnan_l(x) rpl_isnanl (x) |
@@ -2173,18 +2580,26 @@ _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; | |||
2173 | (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ | 2580 | (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ |
2174 | sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ | 2581 | sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ |
2175 | gl_isnan_f (x)) | 2582 | gl_isnan_f (x)) |
2176 | # elif __GNUC__ >= 4 | 2583 | # elif (__GNUC__ >= 4) || (__clang_major__ >= 4) |
2177 | # undef isnan | 2584 | # undef isnan |
2178 | # define isnan(x) \ | 2585 | # define isnan(x) \ |
2179 | (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \ | 2586 | (sizeof (x) == sizeof (long double) ? __builtin_isnan ((long double)(x)) : \ |
2180 | sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ | 2587 | sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ |
2181 | __builtin_isnanf ((float)(x))) | 2588 | __builtin_isnan ((float)(x))) |
2182 | # endif | 2589 | # endif |
2183 | # ifdef __cplusplus | 2590 | # ifdef __cplusplus |
2184 | # ifdef isnan | 2591 | # if defined isnan || defined GNULIB_NAMESPACE |
2185 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) | 2592 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) |
2186 | # undef isnan | 2593 | # undef isnan |
2187 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan) | 2594 | # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__ && __clang_major__ < 12) || (defined __FreeBSD__ && __clang_major__ < 7) || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__))) |
2595 | /* This platform's <cmath> possibly defines isnan through a set of inline | ||
2596 | functions. */ | ||
2597 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool) | ||
2598 | # define isnan rpl_isnan | ||
2599 | # define GNULIB_NAMESPACE_LACKS_ISNAN 1 | ||
2600 | # else | ||
2601 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool) | ||
2602 | # endif | ||
2188 | # endif | 2603 | # endif |
2189 | # else | 2604 | # else |
2190 | /* Ensure isnan is a macro. */ | 2605 | /* Ensure isnan is a macro. */ |
@@ -2202,20 +2617,21 @@ _GL_WARN_REAL_FLOATING_DECL (isnan); | |||
2202 | 2617 | ||
2203 | 2618 | ||
2204 | #if @GNULIB_SIGNBIT@ | 2619 | #if @GNULIB_SIGNBIT@ |
2205 | # if @REPLACE_SIGNBIT_USING_GCC@ | 2620 | # if (@REPLACE_SIGNBIT_USING_BUILTINS@ \ |
2621 | && (!defined __cplusplus || __cplusplus < 201103)) | ||
2206 | # undef signbit | 2622 | # undef signbit |
2207 | /* GCC 4.0 and newer provides three built-ins for signbit. */ | 2623 | /* GCC >= 4.0 and clang provide three built-ins for signbit. */ |
2208 | # define signbit(x) \ | 2624 | # define signbit(x) \ |
2209 | (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ | 2625 | (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ |
2210 | sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ | 2626 | sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ |
2211 | __builtin_signbitf (x)) | 2627 | __builtin_signbitf (x)) |
2212 | # endif | 2628 | # endif |
2213 | # if @REPLACE_SIGNBIT@ | 2629 | # if @REPLACE_SIGNBIT@ && !GNULIB_defined_signbit |
2214 | # undef signbit | 2630 | # undef signbit |
2215 | _GL_EXTERN_C int gl_signbitf (float arg); | 2631 | _GL_EXTERN_C int gl_signbitf (float arg); |
2216 | _GL_EXTERN_C int gl_signbitd (double arg); | 2632 | _GL_EXTERN_C int gl_signbitd (double arg); |
2217 | _GL_EXTERN_C int gl_signbitl (long double arg); | 2633 | _GL_EXTERN_C int gl_signbitl (long double arg); |
2218 | # if __GNUC__ >= 2 && !defined __STRICT_ANSI__ | 2634 | # if (__GNUC__ >= 2 || defined __clang__) && !defined __STRICT_ANSI__ |
2219 | # define _GL_NUM_UINT_WORDS(type) \ | 2635 | # define _GL_NUM_UINT_WORDS(type) \ |
2220 | ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) | 2636 | ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) |
2221 | # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf | 2637 | # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf |
@@ -2253,12 +2669,21 @@ _GL_EXTERN_C int gl_signbitl (long double arg); | |||
2253 | (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ | 2669 | (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ |
2254 | sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ | 2670 | sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ |
2255 | gl_signbitf (x)) | 2671 | gl_signbitf (x)) |
2672 | # define GNULIB_defined_signbit 1 | ||
2256 | # endif | 2673 | # endif |
2257 | # ifdef __cplusplus | 2674 | # ifdef __cplusplus |
2258 | # ifdef signbit | 2675 | # if defined signbit || defined GNULIB_NAMESPACE |
2259 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) | 2676 | _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) |
2260 | # undef signbit | 2677 | # undef signbit |
2261 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit) | 2678 | # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__))) |
2679 | /* This platform's <cmath> possibly defines signbit through a set of inline | ||
2680 | functions. */ | ||
2681 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool) | ||
2682 | # define signbit rpl_signbit | ||
2683 | # define GNULIB_NAMESPACE_LACKS_SIGNBIT 1 | ||
2684 | # else | ||
2685 | _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool) | ||
2686 | # endif | ||
2262 | # endif | 2687 | # endif |
2263 | # endif | 2688 | # endif |
2264 | #elif defined GNULIB_POSIXCHECK | 2689 | #elif defined GNULIB_POSIXCHECK |
@@ -2272,4 +2697,5 @@ _GL_WARN_REAL_FLOATING_DECL (signbit); | |||
2272 | _GL_INLINE_HEADER_END | 2697 | _GL_INLINE_HEADER_END |
2273 | 2698 | ||
2274 | #endif /* _@GUARD_PREFIX@_MATH_H */ | 2699 | #endif /* _@GUARD_PREFIX@_MATH_H */ |
2700 | #endif /* _GL_INCLUDING_MATH_H */ | ||
2275 | #endif /* _@GUARD_PREFIX@_MATH_H */ | 2701 | #endif /* _@GUARD_PREFIX@_MATH_H */ |