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