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