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