1/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2/* A GNU-like <math.h>.
3
4 Copyright (C) 2002-2003, 2007-2019 Free Software Foundation, Inc.
5
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <https://www.gnu.org/licenses/>. */
18
19#ifndef _GL_MATH_H
20
21#if __GNUC__ >= 3
22#pragma GCC system_header
23#endif
24
25
26/* The include_next requires a split double-inclusion guard. */
27#include_next <math.h>
28
29#ifndef _GL_MATH_H
30#define _GL_MATH_H
31
32/* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in <fp.h>. */
33#if defined __VMS && ! defined NAN
34# include <fp.h>
35#endif
36
37#ifndef _GL_INLINE_HEADER_BEGIN
38 #error "Please include config.h first."
39#endif
40_GL_INLINE_HEADER_BEGIN
41#ifndef _GL_MATH_INLINE
42# define _GL_MATH_INLINE _GL_INLINE
43#endif
44
45/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
46/* C++ compatible function declaration macros.
47 Copyright (C) 2010-2019 Free Software Foundation, Inc.
48
49 This program is free software: you can redistribute it and/or modify it
50 under the terms of the GNU General Public License as published
51 by the Free Software Foundation; either version 3 of the License, or
52 (at your option) any later version.
53
54 This program is distributed in the hope that it will be useful,
55 but WITHOUT ANY WARRANTY; without even the implied warranty of
56 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
57 General Public License for more details.
58
59 You should have received a copy of the GNU General Public License
60 along with this program. If not, see <https://www.gnu.org/licenses/>. */
61
62#ifndef _GL_CXXDEFS_H
63#define _GL_CXXDEFS_H
64
65/* Begin/end the GNULIB_NAMESPACE namespace. */
66#if defined __cplusplus && defined GNULIB_NAMESPACE
67# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
68# define _GL_END_NAMESPACE }
69#else
70# define _GL_BEGIN_NAMESPACE
71# define _GL_END_NAMESPACE
72#endif
73
74/* The three most frequent use cases of these macros are:
75
76 * For providing a substitute for a function that is missing on some
77 platforms, but is declared and works fine on the platforms on which
78 it exists:
79
80 #if @GNULIB_FOO@
81 # if !@HAVE_FOO@
82 _GL_FUNCDECL_SYS (foo, ...);
83 # endif
84 _GL_CXXALIAS_SYS (foo, ...);
85 _GL_CXXALIASWARN (foo);
86 #elif defined GNULIB_POSIXCHECK
87 ...
88 #endif
89
90 * For providing a replacement for a function that exists on all platforms,
91 but is broken/insufficient and needs to be replaced on some platforms:
92
93 #if @GNULIB_FOO@
94 # if @REPLACE_FOO@
95 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
96 # undef foo
97 # define foo rpl_foo
98 # endif
99 _GL_FUNCDECL_RPL (foo, ...);
100 _GL_CXXALIAS_RPL (foo, ...);
101 # else
102 _GL_CXXALIAS_SYS (foo, ...);
103 # endif
104 _GL_CXXALIASWARN (foo);
105 #elif defined GNULIB_POSIXCHECK
106 ...
107 #endif
108
109 * For providing a replacement for a function that exists on some platforms
110 but is broken/insufficient and needs to be replaced on some of them and
111 is additionally either missing or undeclared on some other platforms:
112
113 #if @GNULIB_FOO@
114 # if @REPLACE_FOO@
115 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
116 # undef foo
117 # define foo rpl_foo
118 # endif
119 _GL_FUNCDECL_RPL (foo, ...);
120 _GL_CXXALIAS_RPL (foo, ...);
121 # else
122 # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
123 _GL_FUNCDECL_SYS (foo, ...);
124 # endif
125 _GL_CXXALIAS_SYS (foo, ...);
126 # endif
127 _GL_CXXALIASWARN (foo);
128 #elif defined GNULIB_POSIXCHECK
129 ...
130 #endif
131*/
132
133/* _GL_EXTERN_C declaration;
134 performs the declaration with C linkage. */
135#if defined __cplusplus
136# define _GL_EXTERN_C extern "C"
137#else
138# define _GL_EXTERN_C extern
139#endif
140
141/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
142 declares a replacement function, named rpl_func, with the given prototype,
143 consisting of return type, parameters, and attributes.
144 Example:
145 _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
146 _GL_ARG_NONNULL ((1)));
147 */
148#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
149 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
150#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
151 _GL_EXTERN_C rettype rpl_func parameters_and_attributes
152
153/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
154 declares the system function, named func, with the given prototype,
155 consisting of return type, parameters, and attributes.
156 Example:
157 _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
158 _GL_ARG_NONNULL ((1)));
159 */
160#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
161 _GL_EXTERN_C rettype func parameters_and_attributes
162
163/* _GL_CXXALIAS_RPL (func, rettype, parameters);
164 declares a C++ alias called GNULIB_NAMESPACE::func
165 that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
166 Example:
167 _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
168
169 Wrapping rpl_func in an object with an inline conversion operator
170 avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
171 actually used in the program. */
172#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
173 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
174#if defined __cplusplus && defined GNULIB_NAMESPACE
175# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
176 namespace GNULIB_NAMESPACE \
177 { \
178 static const struct _gl_ ## func ## _wrapper \
179 { \
180 typedef rettype (*type) parameters; \
181 \
182 inline operator type () const \
183 { \
184 return ::rpl_func; \
185 } \
186 } func = {}; \
187 } \
188 _GL_EXTERN_C int _gl_cxxalias_dummy
189#else
190# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
191 _GL_EXTERN_C int _gl_cxxalias_dummy
192#endif
193
194/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
195 is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
196 except that the C function rpl_func may have a slightly different
197 declaration. A cast is used to silence the "invalid conversion" error
198 that would otherwise occur. */
199#if defined __cplusplus && defined GNULIB_NAMESPACE
200# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
201 namespace GNULIB_NAMESPACE \
202 { \
203 static const struct _gl_ ## func ## _wrapper \
204 { \
205 typedef rettype (*type) parameters; \
206 \
207 inline operator type () const \
208 { \
209 return reinterpret_cast<type>(::rpl_func); \
210 } \
211 } func = {}; \
212 } \
213 _GL_EXTERN_C int _gl_cxxalias_dummy
214#else
215# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
216 _GL_EXTERN_C int _gl_cxxalias_dummy
217#endif
218
219/* _GL_CXXALIAS_SYS (func, rettype, parameters);
220 declares a C++ alias called GNULIB_NAMESPACE::func
221 that redirects to the system provided function func, if GNULIB_NAMESPACE
222 is defined.
223 Example:
224 _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
225
226 Wrapping func in an object with an inline conversion operator
227 avoids a reference to func unless GNULIB_NAMESPACE::func is
228 actually used in the program. */
229#if defined __cplusplus && defined GNULIB_NAMESPACE
230# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
231 namespace GNULIB_NAMESPACE \
232 { \
233 static const struct _gl_ ## func ## _wrapper \
234 { \
235 typedef rettype (*type) parameters; \
236 \
237 inline operator type () const \
238 { \
239 return ::func; \
240 } \
241 } func = {}; \
242 } \
243 _GL_EXTERN_C int _gl_cxxalias_dummy
244#else
245# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
246 _GL_EXTERN_C int _gl_cxxalias_dummy
247#endif
248
249/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
250 is like _GL_CXXALIAS_SYS (func, rettype, parameters);
251 except that the C function func may have a slightly different declaration.
252 A cast is used to silence the "invalid conversion" error that would
253 otherwise occur. */
254#if defined __cplusplus && defined GNULIB_NAMESPACE
255# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
256 namespace GNULIB_NAMESPACE \
257 { \
258 static const struct _gl_ ## func ## _wrapper \
259 { \
260 typedef rettype (*type) parameters; \
261 \
262 inline operator type () const \
263 { \
264 return reinterpret_cast<type>(::func); \
265 } \
266 } func = {}; \
267 } \
268 _GL_EXTERN_C int _gl_cxxalias_dummy
269#else
270# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
271 _GL_EXTERN_C int _gl_cxxalias_dummy
272#endif
273
274/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
275 is like _GL_CXXALIAS_SYS (func, rettype, parameters);
276 except that the C function is picked among a set of overloaded functions,
277 namely the one with rettype2 and parameters2. Two consecutive casts
278 are used to silence the "cannot find a match" and "invalid conversion"
279 errors that would otherwise occur. */
280#if defined __cplusplus && defined GNULIB_NAMESPACE
281 /* The outer cast must be a reinterpret_cast.
282 The inner cast: When the function is defined as a set of overloaded
283 functions, it works as a static_cast<>, choosing the designated variant.
284 When the function is defined as a single variant, it works as a
285 reinterpret_cast<>. The parenthesized cast syntax works both ways. */
286# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
287 namespace GNULIB_NAMESPACE \
288 { \
289 static const struct _gl_ ## func ## _wrapper \
290 { \
291 typedef rettype (*type) parameters; \
292 \
293 inline operator type () const \
294 { \
295 return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \
296 } \
297 } func = {}; \
298 } \
299 _GL_EXTERN_C int _gl_cxxalias_dummy
300#else
301# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
302 _GL_EXTERN_C int _gl_cxxalias_dummy
303#endif
304
305/* _GL_CXXALIASWARN (func);
306 causes a warning to be emitted when ::func is used but not when
307 GNULIB_NAMESPACE::func is used. func must be defined without overloaded
308 variants. */
309#if defined __cplusplus && defined GNULIB_NAMESPACE
310# define _GL_CXXALIASWARN(func) \
311 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
312# define _GL_CXXALIASWARN_1(func,namespace) \
313 _GL_CXXALIASWARN_2 (func, namespace)
314/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
315 we enable the warning only when not optimizing. */
316# if !__OPTIMIZE__
317# define _GL_CXXALIASWARN_2(func,namespace) \
318 _GL_WARN_ON_USE (func, \
319 "The symbol ::" #func " refers to the system function. " \
320 "Use " #namespace "::" #func " instead.")
321# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
322# define _GL_CXXALIASWARN_2(func,namespace) \
323 extern __typeof__ (func) func
324# else
325# define _GL_CXXALIASWARN_2(func,namespace) \
326 _GL_EXTERN_C int _gl_cxxalias_dummy
327# endif
328#else
329# define _GL_CXXALIASWARN(func) \
330 _GL_EXTERN_C int _gl_cxxalias_dummy
331#endif
332
333/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
334 causes a warning to be emitted when the given overloaded variant of ::func
335 is used but not when GNULIB_NAMESPACE::func is used. */
336#if defined __cplusplus && defined GNULIB_NAMESPACE
337# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
338 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
339 GNULIB_NAMESPACE)
340# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
341 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
342/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
343 we enable the warning only when not optimizing. */
344# if !__OPTIMIZE__
345# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
346 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
347 "The symbol ::" #func " refers to the system function. " \
348 "Use " #namespace "::" #func " instead.")
349# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
350# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
351 extern __typeof__ (func) func
352# else
353# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
354 _GL_EXTERN_C int _gl_cxxalias_dummy
355# endif
356#else
357# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
358 _GL_EXTERN_C int _gl_cxxalias_dummy
359#endif
360
361#endif /* _GL_CXXDEFS_H */
362
363/* The definition of _GL_ARG_NONNULL is copied here. */
364/* A C macro for declaring that specific arguments must not be NULL.
365 Copyright (C) 2009-2019 Free Software Foundation, Inc.
366
367 This program is free software: you can redistribute it and/or modify it
368 under the terms of the GNU General Public License as published
369 by the Free Software Foundation; either version 3 of the License, or
370 (at your option) any later version.
371
372 This program is distributed in the hope that it will be useful,
373 but WITHOUT ANY WARRANTY; without even the implied warranty of
374 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
375 General Public License for more details.
376
377 You should have received a copy of the GNU General Public License
378 along with this program. If not, see <https://www.gnu.org/licenses/>. */
379
380/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
381 that the values passed as arguments n, ..., m must be non-NULL pointers.
382 n = 1 stands for the first argument, n = 2 for the second argument etc. */
383#ifndef _GL_ARG_NONNULL
384# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
385# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
386# else
387# define _GL_ARG_NONNULL(params)
388# endif
389#endif
390
391/* The definition of _GL_WARN_ON_USE is copied here. */
392/* A C macro for emitting warnings if a function is used.
393 Copyright (C) 2010-2019 Free Software Foundation, Inc.
394
395 This program is free software: you can redistribute it and/or modify it
396 under the terms of the GNU General Public License as published
397 by the Free Software Foundation; either version 3 of the License, or
398 (at your option) any later version.
399
400 This program is distributed in the hope that it will be useful,
401 but WITHOUT ANY WARRANTY; without even the implied warranty of
402 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
403 General Public License for more details.
404
405 You should have received a copy of the GNU General Public License
406 along with this program. If not, see <https://www.gnu.org/licenses/>. */
407
408/* _GL_WARN_ON_USE (function, "literal string") issues a declaration
409 for FUNCTION which will then trigger a compiler warning containing
410 the text of "literal string" anywhere that function is called, if
411 supported by the compiler. If the compiler does not support this
412 feature, the macro expands to an unused extern declaration.
413
414 _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the
415 attribute used in _GL_WARN_ON_USE. If the compiler does not support
416 this feature, it expands to empty.
417
418 These macros are useful for marking a function as a potential
419 portability trap, with the intent that "literal string" include
420 instructions on the replacement function that should be used
421 instead.
422 _GL_WARN_ON_USE is for functions with 'extern' linkage.
423 _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline'
424 linkage.
425
426 However, one of the reasons that a function is a portability trap is
427 if it has the wrong signature. Declaring FUNCTION with a different
428 signature in C is a compilation error, so this macro must use the
429 same type as any existing declaration so that programs that avoid
430 the problematic FUNCTION do not fail to compile merely because they
431 included a header that poisoned the function. But this implies that
432 _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already
433 have a declaration. Use of this macro implies that there must not
434 be any other macro hiding the declaration of FUNCTION; but
435 undefining FUNCTION first is part of the poisoning process anyway
436 (although for symbols that are provided only via a macro, the result
437 is a compilation error rather than a warning containing
438 "literal string"). Also note that in C++, it is only safe to use if
439 FUNCTION has no overloads.
440
441 For an example, it is possible to poison 'getline' by:
442 - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
443 [getline]) in configure.ac, which potentially defines
444 HAVE_RAW_DECL_GETLINE
445 - adding this code to a header that wraps the system <stdio.h>:
446 #undef getline
447 #if HAVE_RAW_DECL_GETLINE
448 _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
449 "not universally present; use the gnulib module getline");
450 #endif
451
452 It is not possible to directly poison global variables. But it is
453 possible to write a wrapper accessor function, and poison that
454 (less common usage, like &environ, will cause a compilation error
455 rather than issue the nice warning, but the end result of informing
456 the developer about their portability problem is still achieved):
457 #if HAVE_RAW_DECL_ENVIRON
458 static char ***
459 rpl_environ (void) { return &environ; }
460 _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
461 # undef environ
462 # define environ (*rpl_environ ())
463 #endif
464 or better (avoiding contradictory use of 'static' and 'extern'):
465 #if HAVE_RAW_DECL_ENVIRON
466 static char ***
467 _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared")
468 rpl_environ (void) { return &environ; }
469 # undef environ
470 # define environ (*rpl_environ ())
471 #endif
472 */
473#ifndef _GL_WARN_ON_USE
474
475# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
476/* A compiler attribute is available in gcc versions 4.3.0 and later. */
477# define _GL_WARN_ON_USE(function, message) \
478extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
479# define _GL_WARN_ON_USE_ATTRIBUTE(message) \
480 __attribute__ ((__warning__ (message)))
481# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
482/* Verify the existence of the function. */
483# define _GL_WARN_ON_USE(function, message) \
484extern __typeof__ (function) function
485# define _GL_WARN_ON_USE_ATTRIBUTE(message)
486# else /* Unsupported. */
487# define _GL_WARN_ON_USE(function, message) \
488_GL_WARN_EXTERN_C int _gl_warn_on_use
489# define _GL_WARN_ON_USE_ATTRIBUTE(message)
490# endif
491#endif
492
493/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
494 is like _GL_WARN_ON_USE (function, "string"), except that the function is
495 declared with the given prototype, consisting of return type, parameters,
496 and attributes.
497 This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
498 not work in this case. */
499#ifndef _GL_WARN_ON_USE_CXX
500# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
501# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
502extern rettype function parameters_and_attributes \
503 __attribute__ ((__warning__ (msg)))
504# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
505/* Verify the existence of the function. */
506# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
507extern rettype function parameters_and_attributes
508# else /* Unsupported. */
509# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
510_GL_WARN_EXTERN_C int _gl_warn_on_use
511# endif
512#endif
513
514/* _GL_WARN_EXTERN_C declaration;
515 performs the declaration with C linkage. */
516#ifndef _GL_WARN_EXTERN_C
517# if defined __cplusplus
518# define _GL_WARN_EXTERN_C extern "C"
519# else
520# define _GL_WARN_EXTERN_C extern
521# endif
522#endif
523
524#ifdef __cplusplus
525/* Helper macros to define type-generic function FUNC as overloaded functions,
526 rather than as macros like in C. POSIX declares these with an argument of
527 real-floating (that is, one of float, double, or long double). */
528# define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \
529static inline int \
530_gl_cxx_ ## func ## f (float f) \
531{ \
532 return func (f); \
533} \
534static inline int \
535_gl_cxx_ ## func ## d (double d) \
536{ \
537 return func (d); \
538} \
539static inline int \
540_gl_cxx_ ## func ## l (long double l) \
541{ \
542 return func (l); \
543}
544# define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func,rpl_func,rettype) \
545_GL_BEGIN_NAMESPACE \
546inline rettype \
547rpl_func (float f) \
548{ \
549 return _gl_cxx_ ## func ## f (f); \
550} \
551inline rettype \
552rpl_func (double d) \
553{ \
554 return _gl_cxx_ ## func ## d (d); \
555} \
556inline rettype \
557rpl_func (long double l) \
558{ \
559 return _gl_cxx_ ## func ## l (l); \
560} \
561_GL_END_NAMESPACE
562#endif
563
564/* Helper macros to define a portability warning for the
565 classification macro FUNC called with VALUE. POSIX declares the
566 classification macros with an argument of real-floating (that is,
567 one of float, double, or long double). */
568#define _GL_WARN_REAL_FLOATING_DECL(func) \
569_GL_MATH_INLINE int \
570_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
571 "use gnulib module " #func " for portability") \
572rpl_ ## func ## f (float f) \
573{ \
574 return func (f); \
575} \
576_GL_MATH_INLINE int \
577_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
578 "use gnulib module " #func " for portability") \
579rpl_ ## func ## d (double d) \
580{ \
581 return func (d); \
582} \
583_GL_MATH_INLINE int \
584_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
585 "use gnulib module " #func " for portability") \
586rpl_ ## func ## l (long double l) \
587{ \
588 return func (l); \
589}
590#define _GL_WARN_REAL_FLOATING_IMPL(func, value) \
591 (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \
592 : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \
593 : rpl_ ## func ## l (value))
594
595
596#if 0
597/* Pull in a function that fixes the 'int' to 'long double' conversion
598 of glibc 2.7. */
599_GL_EXTERN_C void _Qp_itoq (long double *, int);
600static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq;
601#endif
602
603
604/* POSIX allows platforms that don't support NAN. But all major
605 machines in the past 15 years have supported something close to
606 IEEE NaN, so we define this unconditionally. We also must define
607 it on platforms like Solaris 10, where NAN is present but defined
608 as a function pointer rather than a floating point constant. */
609#if !defined NAN || 0
610# if !GNULIB_defined_NAN
611# undef NAN
612 /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler
613 choke on the expression 0.0 / 0.0. */
614# if defined __DECC || defined _MSC_VER
615_GL_MATH_INLINE float
616_NaN ()
617{
618 static float zero = 0.0f;
619 return zero / zero;
620}
621# define NAN (_NaN())
622# else
623# define NAN (0.0f / 0.0f)
624# endif
625# define GNULIB_defined_NAN 1
626# endif
627#endif
628
629/* Solaris 10 defines HUGE_VAL, but as a function pointer rather
630 than a floating point constant. */
631#if 0
632# undef HUGE_VALF
633# define HUGE_VALF (1.0f / 0.0f)
634# undef HUGE_VAL
635# define HUGE_VAL (1.0 / 0.0)
636# undef HUGE_VALL
637# define HUGE_VALL (1.0L / 0.0L)
638#endif
639
640/* HUGE_VALF is a 'float' Infinity. */
641#ifndef HUGE_VALF
642# if defined _MSC_VER
643/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */
644# define HUGE_VALF (1e25f * 1e25f)
645# else
646# define HUGE_VALF (1.0f / 0.0f)
647# endif
648#endif
649
650/* HUGE_VAL is a 'double' Infinity. */
651#ifndef HUGE_VAL
652# if defined _MSC_VER
653/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */
654# define HUGE_VAL (1e250 * 1e250)
655# else
656# define HUGE_VAL (1.0 / 0.0)
657# endif
658#endif
659
660/* HUGE_VALL is a 'long double' Infinity. */
661#ifndef HUGE_VALL
662# if defined _MSC_VER
663/* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */
664# define HUGE_VALL (1e250L * 1e250L)
665# else
666# define HUGE_VALL (1.0L / 0.0L)
667# endif
668#endif
669
670
671#if defined FP_ILOGB0 && defined FP_ILOGBNAN
672 /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct. */
673# if defined __HAIKU__
674 /* Haiku: match what ilogb() does */
675# undef FP_ILOGB0
676# undef FP_ILOGBNAN
677# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
678# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
679# endif
680#else
681 /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */
682# if defined __NetBSD__ || defined __sgi
683 /* NetBSD, IRIX 6.5: match what ilogb() does */
684# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
685# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
686# elif defined _AIX
687 /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */
688# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
689# define FP_ILOGBNAN 2147483647 /* INT_MAX */
690# elif defined __sun
691 /* Solaris 9: match what ilogb() does */
692# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
693# define FP_ILOGBNAN 2147483647 /* INT_MAX */
694# else
695 /* Gnulib defined values. */
696# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
697# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
698# endif
699#endif
700
701
702#if 0
703# if 0
704# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
705# undef acosf
706# define acosf rpl_acosf
707# endif
708_GL_FUNCDECL_RPL (acosf, float, (float x));
709_GL_CXXALIAS_RPL (acosf, float, (float x));
710# else
711# if !1
712# undef acosf
713_GL_FUNCDECL_SYS (acosf, float, (float x));
714# endif
715_GL_CXXALIAS_SYS (acosf, float, (float x));
716# endif
717_GL_CXXALIASWARN (acosf);
718#elif defined GNULIB_POSIXCHECK
719# undef acosf
720# if HAVE_RAW_DECL_ACOSF
721_GL_WARN_ON_USE (acosf, "acosf is unportable - "
722 "use gnulib module acosf for portability");
723# endif
724#endif
725
726#if 0
727# if !1 || !1
728# undef acosl
729_GL_FUNCDECL_SYS (acosl, long double, (long double x));
730# endif
731_GL_CXXALIAS_SYS (acosl, long double, (long double x));
732_GL_CXXALIASWARN (acosl);
733#elif defined GNULIB_POSIXCHECK
734# undef acosl
735# if HAVE_RAW_DECL_ACOSL
736_GL_WARN_ON_USE (acosl, "acosl is unportable - "
737 "use gnulib module acosl for portability");
738# endif
739#endif
740
741
742#if 0
743# if 0
744# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
745# undef asinf
746# define asinf rpl_asinf
747# endif
748_GL_FUNCDECL_RPL (asinf, float, (float x));
749_GL_CXXALIAS_RPL (asinf, float, (float x));
750# else
751# if !1
752# undef asinf
753_GL_FUNCDECL_SYS (asinf, float, (float x));
754# endif
755_GL_CXXALIAS_SYS (asinf, float, (float x));
756# endif
757_GL_CXXALIASWARN (asinf);
758#elif defined GNULIB_POSIXCHECK
759# undef asinf
760# if HAVE_RAW_DECL_ASINF
761_GL_WARN_ON_USE (asinf, "asinf is unportable - "
762 "use gnulib module asinf for portability");
763# endif
764#endif
765
766#if 0
767# if !1 || !1
768# undef asinl
769_GL_FUNCDECL_SYS (asinl, long double, (long double x));
770# endif
771_GL_CXXALIAS_SYS (asinl, long double, (long double x));
772_GL_CXXALIASWARN (asinl);
773#elif defined GNULIB_POSIXCHECK
774# undef asinl
775# if HAVE_RAW_DECL_ASINL
776_GL_WARN_ON_USE (asinl, "asinl is unportable - "
777 "use gnulib module asinl for portability");
778# endif
779#endif
780
781
782#if 0
783# if 0
784# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
785# undef atanf
786# define atanf rpl_atanf
787# endif
788_GL_FUNCDECL_RPL (atanf, float, (float x));
789_GL_CXXALIAS_RPL (atanf, float, (float x));
790# else
791# if !1
792# undef atanf
793_GL_FUNCDECL_SYS (atanf, float, (float x));
794# endif
795_GL_CXXALIAS_SYS (atanf, float, (float x));
796# endif
797_GL_CXXALIASWARN (atanf);
798#elif defined GNULIB_POSIXCHECK
799# undef atanf
800# if HAVE_RAW_DECL_ATANF
801_GL_WARN_ON_USE (atanf, "atanf is unportable - "
802 "use gnulib module atanf for portability");
803# endif
804#endif
805
806#if 0
807# if !1 || !1
808# undef atanl
809_GL_FUNCDECL_SYS (atanl, long double, (long double x));
810# endif
811_GL_CXXALIAS_SYS (atanl, long double, (long double x));
812_GL_CXXALIASWARN (atanl);
813#elif defined GNULIB_POSIXCHECK
814# undef atanl
815# if HAVE_RAW_DECL_ATANL
816_GL_WARN_ON_USE (atanl, "atanl is unportable - "
817 "use gnulib module atanl for portability");
818# endif
819#endif
820
821
822#if 0
823# if 0
824# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
825# undef atan2f
826# define atan2f rpl_atan2f
827# endif
828_GL_FUNCDECL_RPL (atan2f, float, (float y, float x));
829_GL_CXXALIAS_RPL (atan2f, float, (float y, float x));
830# else
831# if !1
832# undef atan2f
833_GL_FUNCDECL_SYS (atan2f, float, (float y, float x));
834# endif
835_GL_CXXALIAS_SYS (atan2f, float, (float y, float x));
836# endif
837_GL_CXXALIASWARN (atan2f);
838#elif defined GNULIB_POSIXCHECK
839# undef atan2f
840# if HAVE_RAW_DECL_ATAN2F
841_GL_WARN_ON_USE (atan2f, "atan2f is unportable - "
842 "use gnulib module atan2f for portability");
843# endif
844#endif
845
846
847#if 0
848# if 0
849# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
850# undef cbrtf
851# define cbrtf rpl_cbrtf
852# endif
853_GL_FUNCDECL_RPL (cbrtf, float, (float x));
854_GL_CXXALIAS_RPL (cbrtf, float, (float x));
855# else
856# if !1
857_GL_FUNCDECL_SYS (cbrtf, float, (float x));
858# endif
859_GL_CXXALIAS_SYS (cbrtf, float, (float x));
860# endif
861_GL_CXXALIASWARN (cbrtf);
862#elif defined GNULIB_POSIXCHECK
863# undef cbrtf
864# if HAVE_RAW_DECL_CBRTF
865_GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - "
866 "use gnulib module cbrtf for portability");
867# endif
868#endif
869
870#if 0
871# if !1
872_GL_FUNCDECL_SYS (cbrt, double, (double x));
873# endif
874_GL_CXXALIAS_SYS (cbrt, double, (double x));
875_GL_CXXALIASWARN (cbrt);
876#elif defined GNULIB_POSIXCHECK
877# undef cbrt
878# if HAVE_RAW_DECL_CBRT
879_GL_WARN_ON_USE (cbrt, "cbrt is unportable - "
880 "use gnulib module cbrt for portability");
881# endif
882#endif
883
884#if 0
885# if 0
886# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
887# undef cbrtl
888# define cbrtl rpl_cbrtl
889# endif
890_GL_FUNCDECL_RPL (cbrtl, long double, (long double x));
891_GL_CXXALIAS_RPL (cbrtl, long double, (long double x));
892# else
893# if !1
894_GL_FUNCDECL_SYS (cbrtl, long double, (long double x));
895# endif
896_GL_CXXALIAS_SYS (cbrtl, long double, (long double x));
897# endif
898_GL_CXXALIASWARN (cbrtl);
899#elif defined GNULIB_POSIXCHECK
900# undef cbrtl
901# if HAVE_RAW_DECL_CBRTL
902_GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - "
903 "use gnulib module cbrtl for portability");
904# endif
905#endif
906
907
908#if 0
909# if 0
910# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
911# undef ceilf
912# define ceilf rpl_ceilf
913# endif
914_GL_FUNCDECL_RPL (ceilf, float, (float x));
915_GL_CXXALIAS_RPL (ceilf, float, (float x));
916# else
917# if !1
918# undef ceilf
919_GL_FUNCDECL_SYS (ceilf, float, (float x));
920# endif
921_GL_CXXALIAS_SYS (ceilf, float, (float x));
922# endif
923_GL_CXXALIASWARN (ceilf);
924#elif defined GNULIB_POSIXCHECK
925# undef ceilf
926# if HAVE_RAW_DECL_CEILF
927_GL_WARN_ON_USE (ceilf, "ceilf is unportable - "
928 "use gnulib module ceilf for portability");
929# endif
930#endif
931
932#if 0
933# if 0
934# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
935# undef ceil
936# define ceil rpl_ceil
937# endif
938_GL_FUNCDECL_RPL (ceil, double, (double x));
939_GL_CXXALIAS_RPL (ceil, double, (double x));
940# else
941_GL_CXXALIAS_SYS (ceil, double, (double x));
942# endif
943_GL_CXXALIASWARN (ceil);
944#endif
945
946#if 0
947# if 0
948# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
949# undef ceill
950# define ceill rpl_ceill
951# endif
952_GL_FUNCDECL_RPL (ceill, long double, (long double x));
953_GL_CXXALIAS_RPL (ceill, long double, (long double x));
954# else
955# if !1
956# undef ceill
957_GL_FUNCDECL_SYS (ceill, long double, (long double x));
958# endif
959_GL_CXXALIAS_SYS (ceill, long double, (long double x));
960# endif
961_GL_CXXALIASWARN (ceill);
962#elif defined GNULIB_POSIXCHECK
963# undef ceill
964# if HAVE_RAW_DECL_CEILL
965_GL_WARN_ON_USE (ceill, "ceill is unportable - "
966 "use gnulib module ceill for portability");
967# endif
968#endif
969
970
971#if 0
972# if !1
973_GL_FUNCDECL_SYS (copysignf, float, (float x, float y));
974# endif
975_GL_CXXALIAS_SYS (copysignf, float, (float x, float y));
976_GL_CXXALIASWARN (copysignf);
977#elif defined GNULIB_POSIXCHECK
978# undef copysignf
979# if HAVE_RAW_DECL_COPYSIGNF
980_GL_WARN_ON_USE (copysignf, "copysignf is unportable - "
981 "use gnulib module copysignf for portability");
982# endif
983#endif
984
985#if 0
986# if !1
987_GL_FUNCDECL_SYS (copysign, double, (double x, double y));
988# endif
989_GL_CXXALIAS_SYS (copysign, double, (double x, double y));
990_GL_CXXALIASWARN (copysign);
991#elif defined GNULIB_POSIXCHECK
992# undef copysign
993# if HAVE_RAW_DECL_COPYSIGN
994_GL_WARN_ON_USE (copysign, "copysign is unportable - "
995 "use gnulib module copysign for portability");
996# endif
997#endif
998
999#if 0
1000# if !1
1001_GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y));
1002# endif
1003_GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y));
1004_GL_CXXALIASWARN (copysignl);
1005#elif defined GNULIB_POSIXCHECK
1006# undef copysignl
1007# if HAVE_RAW_DECL_COPYSIGNL
1008_GL_WARN_ON_USE (copysign, "copysignl is unportable - "
1009 "use gnulib module copysignl for portability");
1010# endif
1011#endif
1012
1013
1014#if 0
1015# if 0
1016# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1017# undef cosf
1018# define cosf rpl_cosf
1019# endif
1020_GL_FUNCDECL_RPL (cosf, float, (float x));
1021_GL_CXXALIAS_RPL (cosf, float, (float x));
1022# else
1023# if !1
1024# undef cosf
1025_GL_FUNCDECL_SYS (cosf, float, (float x));
1026# endif
1027_GL_CXXALIAS_SYS (cosf, float, (float x));
1028# endif
1029_GL_CXXALIASWARN (cosf);
1030#elif defined GNULIB_POSIXCHECK
1031# undef cosf
1032# if HAVE_RAW_DECL_COSF
1033_GL_WARN_ON_USE (cosf, "cosf is unportable - "
1034 "use gnulib module cosf for portability");
1035# endif
1036#endif
1037
1038#if 0
1039# if !1 || !1
1040# undef cosl
1041_GL_FUNCDECL_SYS (cosl, long double, (long double x));
1042# endif
1043_GL_CXXALIAS_SYS (cosl, long double, (long double x));
1044_GL_CXXALIASWARN (cosl);
1045#elif defined GNULIB_POSIXCHECK
1046# undef cosl
1047# if HAVE_RAW_DECL_COSL
1048_GL_WARN_ON_USE (cosl, "cosl is unportable - "
1049 "use gnulib module cosl for portability");
1050# endif
1051#endif
1052
1053
1054#if 0
1055# if 0
1056# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1057# undef coshf
1058# define coshf rpl_coshf
1059# endif
1060_GL_FUNCDECL_RPL (coshf, float, (float x));
1061_GL_CXXALIAS_RPL (coshf, float, (float x));
1062# else
1063# if !1
1064# undef coshf
1065_GL_FUNCDECL_SYS (coshf, float, (float x));
1066# endif
1067_GL_CXXALIAS_SYS (coshf, float, (float x));
1068# endif
1069_GL_CXXALIASWARN (coshf);
1070#elif defined GNULIB_POSIXCHECK
1071# undef coshf
1072# if HAVE_RAW_DECL_COSHF
1073_GL_WARN_ON_USE (coshf, "coshf is unportable - "
1074 "use gnulib module coshf for portability");
1075# endif
1076#endif
1077
1078
1079#if 0
1080# if 0
1081# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1082# undef expf
1083# define expf rpl_expf
1084# endif
1085_GL_FUNCDECL_RPL (expf, float, (float x));
1086_GL_CXXALIAS_RPL (expf, float, (float x));
1087# else
1088# if !1
1089# undef expf
1090_GL_FUNCDECL_SYS (expf, float, (float x));
1091# endif
1092_GL_CXXALIAS_SYS (expf, float, (float x));
1093# endif
1094_GL_CXXALIASWARN (expf);
1095#elif defined GNULIB_POSIXCHECK
1096# undef expf
1097# if HAVE_RAW_DECL_EXPF
1098_GL_WARN_ON_USE (expf, "expf is unportable - "
1099 "use gnulib module expf for portability");
1100# endif
1101#endif
1102
1103#if 0
1104# if 0
1105# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1106# undef expl
1107# define expl rpl_expl
1108# endif
1109_GL_FUNCDECL_RPL (expl, long double, (long double x));
1110_GL_CXXALIAS_RPL (expl, long double, (long double x));
1111# else
1112# if !1 || !1
1113# undef expl
1114_GL_FUNCDECL_SYS (expl, long double, (long double x));
1115# endif
1116_GL_CXXALIAS_SYS (expl, long double, (long double x));
1117# endif
1118_GL_CXXALIASWARN (expl);
1119#elif defined GNULIB_POSIXCHECK
1120# undef expl
1121# if HAVE_RAW_DECL_EXPL
1122_GL_WARN_ON_USE (expl, "expl is unportable - "
1123 "use gnulib module expl for portability");
1124# endif
1125#endif
1126
1127
1128#if 0
1129# if !1
1130_GL_FUNCDECL_SYS (exp2f, float, (float x));
1131# endif
1132_GL_CXXALIAS_SYS (exp2f, float, (float x));
1133_GL_CXXALIASWARN (exp2f);
1134#elif defined GNULIB_POSIXCHECK
1135# undef exp2f
1136# if HAVE_RAW_DECL_EXP2F
1137_GL_WARN_ON_USE (exp2f, "exp2f is unportable - "
1138 "use gnulib module exp2f for portability");
1139# endif
1140#endif
1141
1142#if 0
1143# if 0
1144# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1145# undef exp2
1146# define exp2 rpl_exp2
1147# endif
1148_GL_FUNCDECL_RPL (exp2, double, (double x));
1149_GL_CXXALIAS_RPL (exp2, double, (double x));
1150# else
1151# if !1
1152_GL_FUNCDECL_SYS (exp2, double, (double x));
1153# endif
1154_GL_CXXALIAS_SYS (exp2, double, (double x));
1155# endif
1156_GL_CXXALIASWARN (exp2);
1157#elif defined GNULIB_POSIXCHECK
1158# undef exp2
1159# if HAVE_RAW_DECL_EXP2
1160_GL_WARN_ON_USE (exp2, "exp2 is unportable - "
1161 "use gnulib module exp2 for portability");
1162# endif
1163#endif
1164
1165#if 0
1166# if 0
1167# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1168# undef exp2l
1169# define exp2l rpl_exp2l
1170# endif
1171_GL_FUNCDECL_RPL (exp2l, long double, (long double x));
1172_GL_CXXALIAS_RPL (exp2l, long double, (long double x));
1173# else
1174# if !1
1175# undef exp2l
1176_GL_FUNCDECL_SYS (exp2l, long double, (long double x));
1177# endif
1178_GL_CXXALIAS_SYS (exp2l, long double, (long double x));
1179# endif
1180_GL_CXXALIASWARN (exp2l);
1181#elif defined GNULIB_POSIXCHECK
1182# undef exp2l
1183# if HAVE_RAW_DECL_EXP2L
1184_GL_WARN_ON_USE (exp2l, "exp2l is unportable - "
1185 "use gnulib module exp2l for portability");
1186# endif
1187#endif
1188
1189
1190#if 0
1191# if 0
1192# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1193# undef expm1f
1194# define expm1f rpl_expm1f
1195# endif
1196_GL_FUNCDECL_RPL (expm1f, float, (float x));
1197_GL_CXXALIAS_RPL (expm1f, float, (float x));
1198# else
1199# if !1
1200_GL_FUNCDECL_SYS (expm1f, float, (float x));
1201# endif
1202_GL_CXXALIAS_SYS (expm1f, float, (float x));
1203# endif
1204_GL_CXXALIASWARN (expm1f);
1205#elif defined GNULIB_POSIXCHECK
1206# undef expm1f
1207# if HAVE_RAW_DECL_EXPM1F
1208_GL_WARN_ON_USE (expm1f, "expm1f is unportable - "
1209 "use gnulib module expm1f for portability");
1210# endif
1211#endif
1212
1213#if 0
1214# if 0
1215# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1216# undef expm1
1217# define expm1 rpl_expm1
1218# endif
1219_GL_FUNCDECL_RPL (expm1, double, (double x));
1220_GL_CXXALIAS_RPL (expm1, double, (double x));
1221# else
1222# if !1
1223_GL_FUNCDECL_SYS (expm1, double, (double x));
1224# endif
1225_GL_CXXALIAS_SYS (expm1, double, (double x));
1226# endif
1227_GL_CXXALIASWARN (expm1);
1228#elif defined GNULIB_POSIXCHECK
1229# undef expm1
1230# if HAVE_RAW_DECL_EXPM1
1231_GL_WARN_ON_USE (expm1, "expm1 is unportable - "
1232 "use gnulib module expm1 for portability");
1233# endif
1234#endif
1235
1236#if 0
1237# if 0
1238# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1239# undef expm1l
1240# define expm1l rpl_expm1l
1241# endif
1242_GL_FUNCDECL_RPL (expm1l, long double, (long double x));
1243_GL_CXXALIAS_RPL (expm1l, long double, (long double x));
1244# else
1245# if !1
1246# undef expm1l
1247_GL_FUNCDECL_SYS (expm1l, long double, (long double x));
1248# endif
1249_GL_CXXALIAS_SYS (expm1l, long double, (long double x));
1250# endif
1251_GL_CXXALIASWARN (expm1l);
1252#elif defined GNULIB_POSIXCHECK
1253# undef expm1l
1254# if HAVE_RAW_DECL_EXPM1L
1255_GL_WARN_ON_USE (expm1l, "expm1l is unportable - "
1256 "use gnulib module expm1l for portability");
1257# endif
1258#endif
1259
1260
1261#if 0
1262# if !1
1263# undef fabsf
1264_GL_FUNCDECL_SYS (fabsf, float, (float x));
1265# endif
1266_GL_CXXALIAS_SYS (fabsf, float, (float x));
1267_GL_CXXALIASWARN (fabsf);
1268#elif defined GNULIB_POSIXCHECK
1269# undef fabsf
1270# if HAVE_RAW_DECL_FABSF
1271_GL_WARN_ON_USE (fabsf, "fabsf is unportable - "
1272 "use gnulib module fabsf for portability");
1273# endif
1274#endif
1275
1276#if 0
1277# if 0
1278# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1279# undef fabsl
1280# define fabsl rpl_fabsl
1281# endif
1282_GL_FUNCDECL_RPL (fabsl, long double, (long double x));
1283_GL_CXXALIAS_RPL (fabsl, long double, (long double x));
1284# else
1285# if !1
1286# undef fabsl
1287_GL_FUNCDECL_SYS (fabsl, long double, (long double x));
1288# endif
1289_GL_CXXALIAS_SYS (fabsl, long double, (long double x));
1290# endif
1291_GL_CXXALIASWARN (fabsl);
1292#elif defined GNULIB_POSIXCHECK
1293# undef fabsl
1294# if HAVE_RAW_DECL_FABSL
1295_GL_WARN_ON_USE (fabsl, "fabsl is unportable - "
1296 "use gnulib module fabsl for portability");
1297# endif
1298#endif
1299
1300
1301#if 0
1302# if 0
1303# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1304# undef floorf
1305# define floorf rpl_floorf
1306# endif
1307_GL_FUNCDECL_RPL (floorf, float, (float x));
1308_GL_CXXALIAS_RPL (floorf, float, (float x));
1309# else
1310# if !1
1311# undef floorf
1312_GL_FUNCDECL_SYS (floorf, float, (float x));
1313# endif
1314_GL_CXXALIAS_SYS (floorf, float, (float x));
1315# endif
1316_GL_CXXALIASWARN (floorf);
1317#elif defined GNULIB_POSIXCHECK
1318# undef floorf
1319# if HAVE_RAW_DECL_FLOORF
1320_GL_WARN_ON_USE (floorf, "floorf is unportable - "
1321 "use gnulib module floorf for portability");
1322# endif
1323#endif
1324
1325#if 0
1326# if 0
1327# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1328# undef floor
1329# define floor rpl_floor
1330# endif
1331_GL_FUNCDECL_RPL (floor, double, (double x));
1332_GL_CXXALIAS_RPL (floor, double, (double x));
1333# else
1334_GL_CXXALIAS_SYS (floor, double, (double x));
1335# endif
1336_GL_CXXALIASWARN (floor);
1337#endif
1338
1339#if 0
1340# if 0
1341# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1342# undef floorl
1343# define floorl rpl_floorl
1344# endif
1345_GL_FUNCDECL_RPL (floorl, long double, (long double x));
1346_GL_CXXALIAS_RPL (floorl, long double, (long double x));
1347# else
1348# if !1
1349# undef floorl
1350_GL_FUNCDECL_SYS (floorl, long double, (long double x));
1351# endif
1352_GL_CXXALIAS_SYS (floorl, long double, (long double x));
1353# endif
1354_GL_CXXALIASWARN (floorl);
1355#elif defined GNULIB_POSIXCHECK
1356# undef floorl
1357# if HAVE_RAW_DECL_FLOORL
1358_GL_WARN_ON_USE (floorl, "floorl is unportable - "
1359 "use gnulib module floorl for portability");
1360# endif
1361#endif
1362
1363
1364#if 0
1365# if 0
1366# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1367# undef fmaf
1368# define fmaf rpl_fmaf
1369# endif
1370_GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z));
1371_GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z));
1372# else
1373# if !1
1374_GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z));
1375# endif
1376_GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z));
1377# endif
1378_GL_CXXALIASWARN (fmaf);
1379#elif defined GNULIB_POSIXCHECK
1380# undef fmaf
1381# if HAVE_RAW_DECL_FMAF
1382_GL_WARN_ON_USE (fmaf, "fmaf is unportable - "
1383 "use gnulib module fmaf for portability");
1384# endif
1385#endif
1386
1387#if 0
1388# if 0
1389# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1390# undef fma
1391# define fma rpl_fma
1392# endif
1393_GL_FUNCDECL_RPL (fma, double, (double x, double y, double z));
1394_GL_CXXALIAS_RPL (fma, double, (double x, double y, double z));
1395# else
1396# if !1
1397_GL_FUNCDECL_SYS (fma, double, (double x, double y, double z));
1398# endif
1399_GL_CXXALIAS_SYS (fma, double, (double x, double y, double z));
1400# endif
1401_GL_CXXALIASWARN (fma);
1402#elif defined GNULIB_POSIXCHECK
1403# undef fma
1404# if HAVE_RAW_DECL_FMA
1405_GL_WARN_ON_USE (fma, "fma is unportable - "
1406 "use gnulib module fma for portability");
1407# endif
1408#endif
1409
1410#if 0
1411# if 0
1412# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1413# undef fmal
1414# define fmal rpl_fmal
1415# endif
1416_GL_FUNCDECL_RPL (fmal, long double,
1417 (long double x, long double y, long double z));
1418_GL_CXXALIAS_RPL (fmal, long double,
1419 (long double x, long double y, long double z));
1420# else
1421# if !1
1422# undef fmal
1423_GL_FUNCDECL_SYS (fmal, long double,
1424 (long double x, long double y, long double z));
1425# endif
1426_GL_CXXALIAS_SYS (fmal, long double,
1427 (long double x, long double y, long double z));
1428# endif
1429_GL_CXXALIASWARN (fmal);
1430#elif defined GNULIB_POSIXCHECK
1431# undef fmal
1432# if HAVE_RAW_DECL_FMAL
1433_GL_WARN_ON_USE (fmal, "fmal is unportable - "
1434 "use gnulib module fmal for portability");
1435# endif
1436#endif
1437
1438
1439#if 0
1440# if 0
1441# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1442# undef fmodf
1443# define fmodf rpl_fmodf
1444# endif
1445_GL_FUNCDECL_RPL (fmodf, float, (float x, float y));
1446_GL_CXXALIAS_RPL (fmodf, float, (float x, float y));
1447# else
1448# if !1
1449# undef fmodf
1450_GL_FUNCDECL_SYS (fmodf, float, (float x, float y));
1451# endif
1452_GL_CXXALIAS_SYS (fmodf, float, (float x, float y));
1453# endif
1454_GL_CXXALIASWARN (fmodf);
1455#elif defined GNULIB_POSIXCHECK
1456# undef fmodf
1457# if HAVE_RAW_DECL_FMODF
1458_GL_WARN_ON_USE (fmodf, "fmodf is unportable - "
1459 "use gnulib module fmodf for portability");
1460# endif
1461#endif
1462
1463#if 0
1464# if 0
1465# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1466# undef fmod
1467# define fmod rpl_fmod
1468# endif
1469_GL_FUNCDECL_RPL (fmod, double, (double x, double y));
1470_GL_CXXALIAS_RPL (fmod, double, (double x, double y));
1471# else
1472_GL_CXXALIAS_SYS (fmod, double, (double x, double y));
1473# endif
1474_GL_CXXALIASWARN (fmod);
1475#elif defined GNULIB_POSIXCHECK
1476# undef fmod
1477# if HAVE_RAW_DECL_FMOD
1478_GL_WARN_ON_USE (fmod, "fmod has portability problems - "
1479 "use gnulib module fmod for portability");
1480# endif
1481#endif
1482
1483#if 0
1484# if 0
1485# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1486# undef fmodl
1487# define fmodl rpl_fmodl
1488# endif
1489_GL_FUNCDECL_RPL (fmodl, long double, (long double x, long double y));
1490_GL_CXXALIAS_RPL (fmodl, long double, (long double x, long double y));
1491# else
1492# if !1
1493# undef fmodl
1494_GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y));
1495# endif
1496_GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y));
1497# endif
1498_GL_CXXALIASWARN (fmodl);
1499#elif defined GNULIB_POSIXCHECK
1500# undef fmodl
1501# if HAVE_RAW_DECL_FMODL
1502_GL_WARN_ON_USE (fmodl, "fmodl is unportable - "
1503 "use gnulib module fmodl for portability");
1504# endif
1505#endif
1506
1507
1508/* Write x as
1509 x = mantissa * 2^exp
1510 where
1511 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1512 If x is zero: mantissa = x, exp = 0.
1513 If x is infinite or NaN: mantissa = x, exp unspecified.
1514 Store exp in *EXPPTR and return mantissa. */
1515#if 0
1516# if 0
1517# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1518# undef frexpf
1519# define frexpf rpl_frexpf
1520# endif
1521_GL_FUNCDECL_RPL (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2)));
1522_GL_CXXALIAS_RPL (frexpf, float, (float x, int *expptr));
1523# else
1524# if !1
1525# undef frexpf
1526_GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2)));
1527# endif
1528_GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr));
1529# endif
1530_GL_CXXALIASWARN (frexpf);
1531#elif defined GNULIB_POSIXCHECK
1532# undef frexpf
1533# if HAVE_RAW_DECL_FREXPF
1534_GL_WARN_ON_USE (frexpf, "frexpf is unportable - "
1535 "use gnulib module frexpf for portability");
1536# endif
1537#endif
1538
1539/* Write x as
1540 x = mantissa * 2^exp
1541 where
1542 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1543 If x is zero: mantissa = x, exp = 0.
1544 If x is infinite or NaN: mantissa = x, exp unspecified.
1545 Store exp in *EXPPTR and return mantissa. */
1546#if 1
1547# if 0
1548# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1549# undef frexp
1550# define frexp rpl_frexp
1551# endif
1552_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2)));
1553_GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr));
1554# else
1555_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr));
1556# endif
1557_GL_CXXALIASWARN1 (frexp, double, (double x, int *expptr));
1558#elif defined GNULIB_POSIXCHECK
1559# undef frexp
1560/* Assume frexp is always declared. */
1561_GL_WARN_ON_USE (frexp, "frexp is unportable - "
1562 "use gnulib module frexp for portability");
1563#endif
1564
1565/* Write x as
1566 x = mantissa * 2^exp
1567 where
1568 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1569 If x is zero: mantissa = x, exp = 0.
1570 If x is infinite or NaN: mantissa = x, exp unspecified.
1571 Store exp in *EXPPTR and return mantissa. */
1572#if 1 && 0
1573# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1574# undef frexpl
1575# define frexpl rpl_frexpl
1576# endif
1577_GL_FUNCDECL_RPL (frexpl, long double,
1578 (long double x, int *expptr) _GL_ARG_NONNULL ((2)));
1579_GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr));
1580#else
1581# if !1
1582_GL_FUNCDECL_SYS (frexpl, long double,
1583 (long double x, int *expptr) _GL_ARG_NONNULL ((2)));
1584# endif
1585# if 1
1586_GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr));
1587# endif
1588#endif
1589#if 1 && !(0 && !1)
1590_GL_CXXALIASWARN (frexpl);
1591#endif
1592#if !1 && defined GNULIB_POSIXCHECK
1593# undef frexpl
1594# if HAVE_RAW_DECL_FREXPL
1595_GL_WARN_ON_USE (frexpl, "frexpl is unportable - "
1596 "use gnulib module frexpl for portability");
1597# endif
1598#endif
1599
1600
1601/* Return sqrt(x^2+y^2). */
1602#if 0
1603# if 0
1604# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1605# undef hypotf
1606# define hypotf rpl_hypotf
1607# endif
1608_GL_FUNCDECL_RPL (hypotf, float, (float x, float y));
1609_GL_CXXALIAS_RPL (hypotf, float, (float x, float y));
1610# else
1611# if !1
1612_GL_FUNCDECL_SYS (hypotf, float, (float x, float y));
1613# endif
1614_GL_CXXALIAS_SYS (hypotf, float, (float x, float y));
1615# endif
1616_GL_CXXALIASWARN (hypotf);
1617#elif defined GNULIB_POSIXCHECK
1618# undef hypotf
1619# if HAVE_RAW_DECL_HYPOTF
1620_GL_WARN_ON_USE (hypotf, "hypotf is unportable - "
1621 "use gnulib module hypotf for portability");
1622# endif
1623#endif
1624
1625/* Return sqrt(x^2+y^2). */
1626#if 0
1627# if 0
1628# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1629# undef hypot
1630# define hypot rpl_hypot
1631# endif
1632_GL_FUNCDECL_RPL (hypot, double, (double x, double y));
1633_GL_CXXALIAS_RPL (hypot, double, (double x, double y));
1634# else
1635_GL_CXXALIAS_SYS (hypot, double, (double x, double y));
1636# endif
1637_GL_CXXALIASWARN (hypot);
1638#elif defined GNULIB_POSIXCHECK
1639# undef hypot
1640# if HAVE_RAW_DECL_HYPOT
1641_GL_WARN_ON_USE (hypotf, "hypot has portability problems - "
1642 "use gnulib module hypot for portability");
1643# endif
1644#endif
1645
1646/* Return sqrt(x^2+y^2). */
1647#if 0
1648# if 0
1649# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1650# undef hypotl
1651# define hypotl rpl_hypotl
1652# endif
1653_GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y));
1654_GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y));
1655# else
1656# if !1
1657_GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y));
1658# endif
1659_GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y));
1660# endif
1661_GL_CXXALIASWARN (hypotl);
1662#elif defined GNULIB_POSIXCHECK
1663# undef hypotl
1664# if HAVE_RAW_DECL_HYPOTL
1665_GL_WARN_ON_USE (hypotl, "hypotl is unportable - "
1666 "use gnulib module hypotl for portability");
1667# endif
1668#endif
1669
1670
1671#if 0
1672# if 0
1673# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1674# undef ilogbf
1675# define ilogbf rpl_ilogbf
1676# endif
1677_GL_FUNCDECL_RPL (ilogbf, int, (float x));
1678_GL_CXXALIAS_RPL (ilogbf, int, (float x));
1679# else
1680# if !1
1681_GL_FUNCDECL_SYS (ilogbf, int, (float x));
1682# endif
1683_GL_CXXALIAS_SYS (ilogbf, int, (float x));
1684# endif
1685_GL_CXXALIASWARN (ilogbf);
1686#elif defined GNULIB_POSIXCHECK
1687# undef ilogbf
1688# if HAVE_RAW_DECL_ILOGBF
1689_GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - "
1690 "use gnulib module ilogbf for portability");
1691# endif
1692#endif
1693
1694#if 0
1695# if 0
1696# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1697# undef ilogb
1698# define ilogb rpl_ilogb
1699# endif
1700_GL_FUNCDECL_RPL (ilogb, int, (double x));
1701_GL_CXXALIAS_RPL (ilogb, int, (double x));
1702# else
1703# if !1
1704_GL_FUNCDECL_SYS (ilogb, int, (double x));
1705# endif
1706_GL_CXXALIAS_SYS (ilogb, int, (double x));
1707# endif
1708_GL_CXXALIASWARN (ilogb);
1709#elif defined GNULIB_POSIXCHECK
1710# undef ilogb
1711# if HAVE_RAW_DECL_ILOGB
1712_GL_WARN_ON_USE (ilogb, "ilogb is unportable - "
1713 "use gnulib module ilogb for portability");
1714# endif
1715#endif
1716
1717#if 0
1718# if 0
1719# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1720# undef ilogbl
1721# define ilogbl rpl_ilogbl
1722# endif
1723_GL_FUNCDECL_RPL (ilogbl, int, (long double x));
1724_GL_CXXALIAS_RPL (ilogbl, int, (long double x));
1725# else
1726# if !1
1727_GL_FUNCDECL_SYS (ilogbl, int, (long double x));
1728# endif
1729_GL_CXXALIAS_SYS (ilogbl, int, (long double x));
1730# endif
1731_GL_CXXALIASWARN (ilogbl);
1732#elif defined GNULIB_POSIXCHECK
1733# undef ilogbl
1734# if HAVE_RAW_DECL_ILOGBL
1735_GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - "
1736 "use gnulib module ilogbl for portability");
1737# endif
1738#endif
1739
1740
1741/* Return x * 2^exp. */
1742#if 0
1743# if !1
1744# undef ldexpf
1745_GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp));
1746# endif
1747_GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp));
1748_GL_CXXALIASWARN (ldexpf);
1749#elif defined GNULIB_POSIXCHECK
1750# undef ldexpf
1751# if HAVE_RAW_DECL_LDEXPF
1752_GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - "
1753 "use gnulib module ldexpf for portability");
1754# endif
1755#endif
1756
1757/* Return x * 2^exp. */
1758#if 1 && 0
1759# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1760# undef ldexpl
1761# define ldexpl rpl_ldexpl
1762# endif
1763_GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp));
1764_GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp));
1765#else
1766# if !1
1767_GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp));
1768# endif
1769# if 1
1770_GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp));
1771# endif
1772#endif
1773#if 1
1774_GL_CXXALIASWARN (ldexpl);
1775#endif
1776#if !1 && defined GNULIB_POSIXCHECK
1777# undef ldexpl
1778# if HAVE_RAW_DECL_LDEXPL
1779_GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - "
1780 "use gnulib module ldexpl for portability");
1781# endif
1782#endif
1783
1784
1785#if 0
1786# if 0
1787# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1788# undef logf
1789# define logf rpl_logf
1790# endif
1791_GL_FUNCDECL_RPL (logf, float, (float x));
1792_GL_CXXALIAS_RPL (logf, float, (float x));
1793# else
1794# if !1
1795# undef logf
1796_GL_FUNCDECL_SYS (logf, float, (float x));
1797# endif
1798_GL_CXXALIAS_SYS (logf, float, (float x));
1799# endif
1800_GL_CXXALIASWARN (logf);
1801#elif defined GNULIB_POSIXCHECK
1802# undef logf
1803# if HAVE_RAW_DECL_LOGF
1804_GL_WARN_ON_USE (logf, "logf is unportable - "
1805 "use gnulib module logf for portability");
1806# endif
1807#endif
1808
1809#if 0
1810# if 0
1811# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1812# undef log
1813# define log rpl_log
1814# endif
1815_GL_FUNCDECL_RPL (log, double, (double x));
1816_GL_CXXALIAS_RPL (log, double, (double x));
1817# else
1818_GL_CXXALIAS_SYS (log, double, (double x));
1819# endif
1820_GL_CXXALIASWARN (log);
1821#elif defined GNULIB_POSIXCHECK
1822# undef log
1823# if HAVE_RAW_DECL_LOG
1824_GL_WARN_ON_USE (log, "log has portability problems - "
1825 "use gnulib module log for portability");
1826# endif
1827#endif
1828
1829#if 0
1830# if 0
1831# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1832# undef logl
1833# define logl rpl_logl
1834# endif
1835_GL_FUNCDECL_RPL (logl, long double, (long double x));
1836_GL_CXXALIAS_RPL (logl, long double, (long double x));
1837# else
1838# if !1 || !1
1839# undef logl
1840_GL_FUNCDECL_SYS (logl, long double, (long double x));
1841# endif
1842_GL_CXXALIAS_SYS (logl, long double, (long double x));
1843# endif
1844_GL_CXXALIASWARN (logl);
1845#elif defined GNULIB_POSIXCHECK
1846# undef logl
1847# if HAVE_RAW_DECL_LOGL
1848_GL_WARN_ON_USE (logl, "logl is unportable - "
1849 "use gnulib module logl for portability");
1850# endif
1851#endif
1852
1853
1854#if 0
1855# if 0
1856# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1857# undef log10f
1858# define log10f rpl_log10f
1859# endif
1860_GL_FUNCDECL_RPL (log10f, float, (float x));
1861_GL_CXXALIAS_RPL (log10f, float, (float x));
1862# else
1863# if !1
1864# undef log10f
1865_GL_FUNCDECL_SYS (log10f, float, (float x));
1866# endif
1867_GL_CXXALIAS_SYS (log10f, float, (float x));
1868# endif
1869_GL_CXXALIASWARN (log10f);
1870#elif defined GNULIB_POSIXCHECK
1871# undef log10f
1872# if HAVE_RAW_DECL_LOG10F
1873_GL_WARN_ON_USE (log10f, "log10f is unportable - "
1874 "use gnulib module log10f for portability");
1875# endif
1876#endif
1877
1878#if 0
1879# if 0
1880# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1881# undef log10
1882# define log10 rpl_log10
1883# endif
1884_GL_FUNCDECL_RPL (log10, double, (double x));
1885_GL_CXXALIAS_RPL (log10, double, (double x));
1886# else
1887_GL_CXXALIAS_SYS (log10, double, (double x));
1888# endif
1889_GL_CXXALIASWARN (log10);
1890#elif defined GNULIB_POSIXCHECK
1891# undef log10
1892# if HAVE_RAW_DECL_LOG10
1893_GL_WARN_ON_USE (log10, "log10 has portability problems - "
1894 "use gnulib module log10 for portability");
1895# endif
1896#endif
1897
1898#if 0
1899# if 0
1900# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1901# undef log10l
1902# define log10l rpl_log10l
1903# endif
1904_GL_FUNCDECL_RPL (log10l, long double, (long double x));
1905_GL_CXXALIAS_RPL (log10l, long double, (long double x));
1906# else
1907# if !1 || !1
1908# undef log10l
1909_GL_FUNCDECL_SYS (log10l, long double, (long double x));
1910# endif
1911_GL_CXXALIAS_SYS (log10l, long double, (long double x));
1912# endif
1913_GL_CXXALIASWARN (log10l);
1914#elif defined GNULIB_POSIXCHECK
1915# undef log10l
1916# if HAVE_RAW_DECL_LOG10L
1917_GL_WARN_ON_USE (log10l, "log10l is unportable - "
1918 "use gnulib module log10l for portability");
1919# endif
1920#endif
1921
1922
1923#if 0
1924# if 0
1925# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1926# undef log1pf
1927# define log1pf rpl_log1pf
1928# endif
1929_GL_FUNCDECL_RPL (log1pf, float, (float x));
1930_GL_CXXALIAS_RPL (log1pf, float, (float x));
1931# else
1932# if !1
1933_GL_FUNCDECL_SYS (log1pf, float, (float x));
1934# endif
1935_GL_CXXALIAS_SYS (log1pf, float, (float x));
1936# endif
1937_GL_CXXALIASWARN (log1pf);
1938#elif defined GNULIB_POSIXCHECK
1939# undef log1pf
1940# if HAVE_RAW_DECL_LOG1PF
1941_GL_WARN_ON_USE (log1pf, "log1pf is unportable - "
1942 "use gnulib module log1pf for portability");
1943# endif
1944#endif
1945
1946#if 0
1947# if 0
1948# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1949# undef log1p
1950# define log1p rpl_log1p
1951# endif
1952_GL_FUNCDECL_RPL (log1p, double, (double x));
1953_GL_CXXALIAS_RPL (log1p, double, (double x));
1954# else
1955# if !1
1956_GL_FUNCDECL_SYS (log1p, double, (double x));
1957# endif
1958_GL_CXXALIAS_SYS (log1p, double, (double x));
1959# endif
1960_GL_CXXALIASWARN (log1p);
1961#elif defined GNULIB_POSIXCHECK
1962# undef log1p
1963# if HAVE_RAW_DECL_LOG1P
1964_GL_WARN_ON_USE (log1p, "log1p has portability problems - "
1965 "use gnulib module log1p for portability");
1966# endif
1967#endif
1968
1969#if 0
1970# if 0
1971# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1972# undef log1pl
1973# define log1pl rpl_log1pl
1974# endif
1975_GL_FUNCDECL_RPL (log1pl, long double, (long double x));
1976_GL_CXXALIAS_RPL (log1pl, long double, (long double x));
1977# else
1978# if !1
1979_GL_FUNCDECL_SYS (log1pl, long double, (long double x));
1980# endif
1981_GL_CXXALIAS_SYS (log1pl, long double, (long double x));
1982# endif
1983_GL_CXXALIASWARN (log1pl);
1984#elif defined GNULIB_POSIXCHECK
1985# undef log1pl
1986# if HAVE_RAW_DECL_LOG1PL
1987_GL_WARN_ON_USE (log1pl, "log1pl has portability problems - "
1988 "use gnulib module log1pl for portability");
1989# endif
1990#endif
1991
1992
1993#if 0
1994# if 0
1995# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1996# undef log2f
1997# define log2f rpl_log2f
1998# endif
1999_GL_FUNCDECL_RPL (log2f, float, (float x));
2000_GL_CXXALIAS_RPL (log2f, float, (float x));
2001# else
2002# if !1
2003# undef log2f
2004_GL_FUNCDECL_SYS (log2f, float, (float x));
2005# endif
2006_GL_CXXALIAS_SYS (log2f, float, (float x));
2007# endif
2008_GL_CXXALIASWARN (log2f);
2009#elif defined GNULIB_POSIXCHECK
2010# undef log2f
2011# if HAVE_RAW_DECL_LOG2F
2012_GL_WARN_ON_USE (log2f, "log2f is unportable - "
2013 "use gnulib module log2f for portability");
2014# endif
2015#endif
2016
2017#if 0
2018# if 0
2019# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2020# undef log2
2021# define log2 rpl_log2
2022# endif
2023_GL_FUNCDECL_RPL (log2, double, (double x));
2024_GL_CXXALIAS_RPL (log2, double, (double x));
2025# else
2026# if !1
2027# undef log2
2028_GL_FUNCDECL_SYS (log2, double, (double x));
2029# endif
2030_GL_CXXALIAS_SYS (log2, double, (double x));
2031# endif
2032_GL_CXXALIASWARN (log2);
2033#elif defined GNULIB_POSIXCHECK
2034# undef log2
2035# if HAVE_RAW_DECL_LOG2
2036_GL_WARN_ON_USE (log2, "log2 is unportable - "
2037 "use gnulib module log2 for portability");
2038# endif
2039#endif
2040
2041#if 0
2042# if 0
2043# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2044# undef log2l
2045# define log2l rpl_log2l
2046# endif
2047_GL_FUNCDECL_RPL (log2l, long double, (long double x));
2048_GL_CXXALIAS_RPL (log2l, long double, (long double x));
2049# else
2050# if !1
2051_GL_FUNCDECL_SYS (log2l, long double, (long double x));
2052# endif
2053_GL_CXXALIAS_SYS (log2l, long double, (long double x));
2054# endif
2055_GL_CXXALIASWARN (log2l);
2056#elif defined GNULIB_POSIXCHECK
2057# undef log2l
2058# if HAVE_RAW_DECL_LOG2L
2059_GL_WARN_ON_USE (log2l, "log2l is unportable - "
2060 "use gnulib module log2l for portability");
2061# endif
2062#endif
2063
2064
2065#if 0
2066# if 0
2067# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2068# undef logbf
2069# define logbf rpl_logbf
2070# endif
2071_GL_FUNCDECL_RPL (logbf, float, (float x));
2072_GL_CXXALIAS_RPL (logbf, float, (float x));
2073# else
2074# if !1
2075_GL_FUNCDECL_SYS (logbf, float, (float x));
2076# endif
2077_GL_CXXALIAS_SYS (logbf, float, (float x));
2078# endif
2079_GL_CXXALIASWARN (logbf);
2080#elif defined GNULIB_POSIXCHECK
2081# undef logbf
2082# if HAVE_RAW_DECL_LOGBF
2083_GL_WARN_ON_USE (logbf, "logbf is unportable - "
2084 "use gnulib module logbf for portability");
2085# endif
2086#endif
2087
2088#if 0
2089# if 0
2090# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2091# undef logb
2092# define logb rpl_logb
2093# endif
2094_GL_FUNCDECL_RPL (logb, double, (double x));
2095_GL_CXXALIAS_RPL (logb, double, (double x));
2096# else
2097# if !1
2098_GL_FUNCDECL_SYS (logb, double, (double x));
2099# endif
2100_GL_CXXALIAS_SYS (logb, double, (double x));
2101# endif
2102_GL_CXXALIASWARN (logb);
2103#elif defined GNULIB_POSIXCHECK
2104# undef logb
2105# if HAVE_RAW_DECL_LOGB
2106_GL_WARN_ON_USE (logb, "logb is unportable - "
2107 "use gnulib module logb for portability");
2108# endif
2109#endif
2110
2111#if 0
2112# if 0
2113# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2114# undef logbl
2115# define logbl rpl_logbl
2116# endif
2117_GL_FUNCDECL_RPL (logbl, long double, (long double x));
2118_GL_CXXALIAS_RPL (logbl, long double, (long double x));
2119# else
2120# if !1
2121_GL_FUNCDECL_SYS (logbl, long double, (long double x));
2122# endif
2123_GL_CXXALIAS_SYS (logbl, long double, (long double x));
2124# endif
2125_GL_CXXALIASWARN (logbl);
2126#elif defined GNULIB_POSIXCHECK
2127# undef logbl
2128# if HAVE_RAW_DECL_LOGBL
2129_GL_WARN_ON_USE (logbl, "logbl is unportable - "
2130 "use gnulib module logbl for portability");
2131# endif
2132#endif
2133
2134
2135#if 0
2136# if 0
2137# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2138# undef modff
2139# define modff rpl_modff
2140# endif
2141_GL_FUNCDECL_RPL (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2)));
2142_GL_CXXALIAS_RPL (modff, float, (float x, float *iptr));
2143# else
2144# if !1
2145# undef modff
2146_GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2)));
2147# endif
2148_GL_CXXALIAS_SYS (modff, float, (float x, float *iptr));
2149# endif
2150_GL_CXXALIASWARN (modff);
2151#elif defined GNULIB_POSIXCHECK
2152# undef modff
2153# if HAVE_RAW_DECL_MODFF
2154_GL_WARN_ON_USE (modff, "modff is unportable - "
2155 "use gnulib module modff for portability");
2156# endif
2157#endif
2158
2159#if 0
2160# if 0
2161# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2162# undef modf
2163# define modf rpl_modf
2164# endif
2165_GL_FUNCDECL_RPL (modf, double, (double x, double *iptr) _GL_ARG_NONNULL ((2)));
2166_GL_CXXALIAS_RPL (modf, double, (double x, double *iptr));
2167# else
2168_GL_CXXALIAS_SYS (modf, double, (double x, double *iptr));
2169# endif
2170_GL_CXXALIASWARN (modf);
2171#elif defined GNULIB_POSIXCHECK
2172# undef modf
2173# if HAVE_RAW_DECL_MODF
2174_GL_WARN_ON_USE (modf, "modf has portability problems - "
2175 "use gnulib module modf for portability");
2176# endif
2177#endif
2178
2179#if 0
2180# if 0
2181# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2182# undef modfl
2183# define modfl rpl_modfl
2184# endif
2185_GL_FUNCDECL_RPL (modfl, long double, (long double x, long double *iptr)
2186 _GL_ARG_NONNULL ((2)));
2187_GL_CXXALIAS_RPL (modfl, long double, (long double x, long double *iptr));
2188# else
2189# if !1
2190# undef modfl
2191_GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr)
2192 _GL_ARG_NONNULL ((2)));
2193# endif
2194_GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr));
2195# endif
2196_GL_CXXALIASWARN (modfl);
2197#elif defined GNULIB_POSIXCHECK
2198# undef modfl
2199# if HAVE_RAW_DECL_MODFL
2200_GL_WARN_ON_USE (modfl, "modfl is unportable - "
2201 "use gnulib module modfl for portability");
2202# endif
2203#endif
2204
2205
2206#if 0
2207# if !1
2208# undef powf
2209_GL_FUNCDECL_SYS (powf, float, (float x, float y));
2210# endif
2211_GL_CXXALIAS_SYS (powf, float, (float x, float y));
2212_GL_CXXALIASWARN (powf);
2213#elif defined GNULIB_POSIXCHECK
2214# undef powf
2215# if HAVE_RAW_DECL_POWF
2216_GL_WARN_ON_USE (powf, "powf is unportable - "
2217 "use gnulib module powf for portability");
2218# endif
2219#endif
2220
2221
2222#if 0
2223# if 0
2224# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2225# undef remainderf
2226# define remainderf rpl_remainderf
2227# endif
2228_GL_FUNCDECL_RPL (remainderf, float, (float x, float y));
2229_GL_CXXALIAS_RPL (remainderf, float, (float x, float y));
2230# else
2231# if !1
2232_GL_FUNCDECL_SYS (remainderf, float, (float x, float y));
2233# endif
2234_GL_CXXALIAS_SYS (remainderf, float, (float x, float y));
2235# endif
2236_GL_CXXALIASWARN (remainderf);
2237#elif defined GNULIB_POSIXCHECK
2238# undef remainderf
2239# if HAVE_RAW_DECL_REMAINDERF
2240_GL_WARN_ON_USE (remainderf, "remainderf is unportable - "
2241 "use gnulib module remainderf for portability");
2242# endif
2243#endif
2244
2245#if 0
2246# if 0
2247# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2248# undef remainder
2249# define remainder rpl_remainder
2250# endif
2251_GL_FUNCDECL_RPL (remainder, double, (double x, double y));
2252_GL_CXXALIAS_RPL (remainder, double, (double x, double y));
2253# else
2254# if !1 || !1
2255_GL_FUNCDECL_SYS (remainder, double, (double x, double y));
2256# endif
2257_GL_CXXALIAS_SYS (remainder, double, (double x, double y));
2258# endif
2259_GL_CXXALIASWARN (remainder);
2260#elif defined GNULIB_POSIXCHECK
2261# undef remainder
2262# if HAVE_RAW_DECL_REMAINDER
2263_GL_WARN_ON_USE (remainder, "remainder is unportable - "
2264 "use gnulib module remainder for portability");
2265# endif
2266#endif
2267
2268#if 0
2269# if 0
2270# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2271# undef remainderl
2272# define remainderl rpl_remainderl
2273# endif
2274_GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y));
2275_GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y));
2276# else
2277# if !1
2278# undef remainderl
2279_GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y));
2280# endif
2281_GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y));
2282# endif
2283_GL_CXXALIASWARN (remainderl);
2284#elif defined GNULIB_POSIXCHECK
2285# undef remainderl
2286# if HAVE_RAW_DECL_REMAINDERL
2287_GL_WARN_ON_USE (remainderl, "remainderl is unportable - "
2288 "use gnulib module remainderl for portability");
2289# endif
2290#endif
2291
2292
2293#if 0
2294# if !1
2295_GL_FUNCDECL_SYS (rintf, float, (float x));
2296# endif
2297_GL_CXXALIAS_SYS (rintf, float, (float x));
2298_GL_CXXALIASWARN (rintf);
2299#elif defined GNULIB_POSIXCHECK
2300# undef rintf
2301# if HAVE_RAW_DECL_RINTF
2302_GL_WARN_ON_USE (rintf, "rintf is unportable - "
2303 "use gnulib module rintf for portability");
2304# endif
2305#endif
2306
2307#if 0
2308# if !1
2309_GL_FUNCDECL_SYS (rint, double, (double x));
2310# endif
2311_GL_CXXALIAS_SYS (rint, double, (double x));
2312_GL_CXXALIASWARN (rint);
2313#elif defined GNULIB_POSIXCHECK
2314# undef rint
2315# if HAVE_RAW_DECL_RINT
2316_GL_WARN_ON_USE (rint, "rint is unportable - "
2317 "use gnulib module rint for portability");
2318# endif
2319#endif
2320
2321#if 0
2322# if 0
2323# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2324# undef rintl
2325# define rintl rpl_rintl
2326# endif
2327_GL_FUNCDECL_RPL (rintl, long double, (long double x));
2328_GL_CXXALIAS_RPL (rintl, long double, (long double x));
2329# else
2330# if !1
2331_GL_FUNCDECL_SYS (rintl, long double, (long double x));
2332# endif
2333_GL_CXXALIAS_SYS (rintl, long double, (long double x));
2334# endif
2335_GL_CXXALIASWARN (rintl);
2336#elif defined GNULIB_POSIXCHECK
2337# undef rintl
2338# if HAVE_RAW_DECL_RINTL
2339_GL_WARN_ON_USE (rintl, "rintl is unportable - "
2340 "use gnulib module rintl for portability");
2341# endif
2342#endif
2343
2344
2345#if 0
2346# if 0
2347# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2348# undef roundf
2349# define roundf rpl_roundf
2350# endif
2351_GL_FUNCDECL_RPL (roundf, float, (float x));
2352_GL_CXXALIAS_RPL (roundf, float, (float x));
2353# else
2354# if !1
2355_GL_FUNCDECL_SYS (roundf, float, (float x));
2356# endif
2357_GL_CXXALIAS_SYS (roundf, float, (float x));
2358# endif
2359_GL_CXXALIASWARN (roundf);
2360#elif defined GNULIB_POSIXCHECK
2361# undef roundf
2362# if HAVE_RAW_DECL_ROUNDF
2363_GL_WARN_ON_USE (roundf, "roundf is unportable - "
2364 "use gnulib module roundf for portability");
2365# endif
2366#endif
2367
2368#if 0
2369# if 0
2370# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2371# undef round
2372# define round rpl_round
2373# endif
2374_GL_FUNCDECL_RPL (round, double, (double x));
2375_GL_CXXALIAS_RPL (round, double, (double x));
2376# else
2377# if !1
2378_GL_FUNCDECL_SYS (round, double, (double x));
2379# endif
2380_GL_CXXALIAS_SYS (round, double, (double x));
2381# endif
2382_GL_CXXALIASWARN (round);
2383#elif defined GNULIB_POSIXCHECK
2384# undef round
2385# if HAVE_RAW_DECL_ROUND
2386_GL_WARN_ON_USE (round, "round is unportable - "
2387 "use gnulib module round for portability");
2388# endif
2389#endif
2390
2391#if 0
2392# if 0
2393# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2394# undef roundl
2395# define roundl rpl_roundl
2396# endif
2397_GL_FUNCDECL_RPL (roundl, long double, (long double x));
2398_GL_CXXALIAS_RPL (roundl, long double, (long double x));
2399# else
2400# if !1
2401# undef roundl
2402_GL_FUNCDECL_SYS (roundl, long double, (long double x));
2403# endif
2404_GL_CXXALIAS_SYS (roundl, long double, (long double x));
2405# endif
2406_GL_CXXALIASWARN (roundl);
2407#elif defined GNULIB_POSIXCHECK
2408# undef roundl
2409# if HAVE_RAW_DECL_ROUNDL
2410_GL_WARN_ON_USE (roundl, "roundl is unportable - "
2411 "use gnulib module roundl for portability");
2412# endif
2413#endif
2414
2415
2416#if 0
2417# if 0
2418# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2419# undef sinf
2420# define sinf rpl_sinf
2421# endif
2422_GL_FUNCDECL_RPL (sinf, float, (float x));
2423_GL_CXXALIAS_RPL (sinf, float, (float x));
2424# else
2425# if !1
2426 # undef sinf
2427_GL_FUNCDECL_SYS (sinf, float, (float x));
2428# endif
2429_GL_CXXALIAS_SYS (sinf, float, (float x));
2430# endif
2431_GL_CXXALIASWARN (sinf);
2432#elif defined GNULIB_POSIXCHECK
2433# undef sinf
2434# if HAVE_RAW_DECL_SINF
2435_GL_WARN_ON_USE (sinf, "sinf is unportable - "
2436 "use gnulib module sinf for portability");
2437# endif
2438#endif
2439
2440#if 0
2441# if !1 || !1
2442# undef sinl
2443_GL_FUNCDECL_SYS (sinl, long double, (long double x));
2444# endif
2445_GL_CXXALIAS_SYS (sinl, long double, (long double x));
2446_GL_CXXALIASWARN (sinl);
2447#elif defined GNULIB_POSIXCHECK
2448# undef sinl
2449# if HAVE_RAW_DECL_SINL
2450_GL_WARN_ON_USE (sinl, "sinl is unportable - "
2451 "use gnulib module sinl for portability");
2452# endif
2453#endif
2454
2455
2456#if 0
2457# if 0
2458# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2459# undef sinhf
2460# define sinhf rpl_sinhf
2461# endif
2462_GL_FUNCDECL_RPL (sinhf, float, (float x));
2463_GL_CXXALIAS_RPL (sinhf, float, (float x));
2464# else
2465# if !1
2466# undef sinhf
2467_GL_FUNCDECL_SYS (sinhf, float, (float x));
2468# endif
2469_GL_CXXALIAS_SYS (sinhf, float, (float x));
2470# endif
2471_GL_CXXALIASWARN (sinhf);
2472#elif defined GNULIB_POSIXCHECK
2473# undef sinhf
2474# if HAVE_RAW_DECL_SINHF
2475_GL_WARN_ON_USE (sinhf, "sinhf is unportable - "
2476 "use gnulib module sinhf for portability");
2477# endif
2478#endif
2479
2480
2481#if 0
2482# if 0
2483# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2484# undef sqrtf
2485# define sqrtf rpl_sqrtf
2486# endif
2487_GL_FUNCDECL_RPL (sqrtf, float, (float x));
2488_GL_CXXALIAS_RPL (sqrtf, float, (float x));
2489# else
2490# if !1
2491# undef sqrtf
2492_GL_FUNCDECL_SYS (sqrtf, float, (float x));
2493# endif
2494_GL_CXXALIAS_SYS (sqrtf, float, (float x));
2495# endif
2496_GL_CXXALIASWARN (sqrtf);
2497#elif defined GNULIB_POSIXCHECK
2498# undef sqrtf
2499# if HAVE_RAW_DECL_SQRTF
2500_GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - "
2501 "use gnulib module sqrtf for portability");
2502# endif
2503#endif
2504
2505#if 0
2506# if 0
2507# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2508# undef sqrtl
2509# define sqrtl rpl_sqrtl
2510# endif
2511_GL_FUNCDECL_RPL (sqrtl, long double, (long double x));
2512_GL_CXXALIAS_RPL (sqrtl, long double, (long double x));
2513# else
2514# if !1 || !1
2515# undef sqrtl
2516_GL_FUNCDECL_SYS (sqrtl, long double, (long double x));
2517# endif
2518_GL_CXXALIAS_SYS (sqrtl, long double, (long double x));
2519# endif
2520_GL_CXXALIASWARN (sqrtl);
2521#elif defined GNULIB_POSIXCHECK
2522# undef sqrtl
2523# if HAVE_RAW_DECL_SQRTL
2524_GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - "
2525 "use gnulib module sqrtl for portability");
2526# endif
2527#endif
2528
2529
2530#if 0
2531# if 0
2532# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2533# undef tanf
2534# define tanf rpl_tanf
2535# endif
2536_GL_FUNCDECL_RPL (tanf, float, (float x));
2537_GL_CXXALIAS_RPL (tanf, float, (float x));
2538# else
2539# if !1
2540# undef tanf
2541_GL_FUNCDECL_SYS (tanf, float, (float x));
2542# endif
2543_GL_CXXALIAS_SYS (tanf, float, (float x));
2544# endif
2545_GL_CXXALIASWARN (tanf);
2546#elif defined GNULIB_POSIXCHECK
2547# undef tanf
2548# if HAVE_RAW_DECL_TANF
2549_GL_WARN_ON_USE (tanf, "tanf is unportable - "
2550 "use gnulib module tanf for portability");
2551# endif
2552#endif
2553
2554#if 0
2555# if !1 || !1
2556# undef tanl
2557_GL_FUNCDECL_SYS (tanl, long double, (long double x));
2558# endif
2559_GL_CXXALIAS_SYS (tanl, long double, (long double x));
2560_GL_CXXALIASWARN (tanl);
2561#elif defined GNULIB_POSIXCHECK
2562# undef tanl
2563# if HAVE_RAW_DECL_TANL
2564_GL_WARN_ON_USE (tanl, "tanl is unportable - "
2565 "use gnulib module tanl for portability");
2566# endif
2567#endif
2568
2569
2570#if 0
2571# if 0
2572# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2573# undef tanhf
2574# define tanhf rpl_tanhf
2575# endif
2576_GL_FUNCDECL_RPL (tanhf, float, (float x));
2577_GL_CXXALIAS_RPL (tanhf, float, (float x));
2578# else
2579# if !1
2580# undef tanhf
2581_GL_FUNCDECL_SYS (tanhf, float, (float x));
2582# endif
2583_GL_CXXALIAS_SYS (tanhf, float, (float x));
2584# endif
2585_GL_CXXALIASWARN (tanhf);
2586#elif defined GNULIB_POSIXCHECK
2587# undef tanhf
2588# if HAVE_RAW_DECL_TANHF
2589_GL_WARN_ON_USE (tanhf, "tanhf is unportable - "
2590 "use gnulib module tanhf for portability");
2591# endif
2592#endif
2593
2594
2595#if 0
2596# if 0
2597# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2598# undef truncf
2599# define truncf rpl_truncf
2600# endif
2601_GL_FUNCDECL_RPL (truncf, float, (float x));
2602_GL_CXXALIAS_RPL (truncf, float, (float x));
2603# else
2604# if !1
2605_GL_FUNCDECL_SYS (truncf, float, (float x));
2606# endif
2607_GL_CXXALIAS_SYS (truncf, float, (float x));
2608# endif
2609_GL_CXXALIASWARN (truncf);
2610#elif defined GNULIB_POSIXCHECK
2611# undef truncf
2612# if HAVE_RAW_DECL_TRUNCF
2613_GL_WARN_ON_USE (truncf, "truncf is unportable - "
2614 "use gnulib module truncf for portability");
2615# endif
2616#endif
2617
2618#if 0
2619# if 0
2620# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2621# undef trunc
2622# define trunc rpl_trunc
2623# endif
2624_GL_FUNCDECL_RPL (trunc, double, (double x));
2625_GL_CXXALIAS_RPL (trunc, double, (double x));
2626# else
2627# if !1
2628_GL_FUNCDECL_SYS (trunc, double, (double x));
2629# endif
2630_GL_CXXALIAS_SYS (trunc, double, (double x));
2631# endif
2632_GL_CXXALIASWARN (trunc);
2633#elif defined GNULIB_POSIXCHECK
2634# undef trunc
2635# if HAVE_RAW_DECL_TRUNC
2636_GL_WARN_ON_USE (trunc, "trunc is unportable - "
2637 "use gnulib module trunc for portability");
2638# endif
2639#endif
2640
2641#if 0
2642# if 0
2643# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2644# undef truncl
2645# define truncl rpl_truncl
2646# endif
2647_GL_FUNCDECL_RPL (truncl, long double, (long double x));
2648_GL_CXXALIAS_RPL (truncl, long double, (long double x));
2649# else
2650# if !1
2651_GL_FUNCDECL_SYS (truncl, long double, (long double x));
2652# endif
2653_GL_CXXALIAS_SYS (truncl, long double, (long double x));
2654# endif
2655_GL_CXXALIASWARN (truncl);
2656#elif defined GNULIB_POSIXCHECK
2657# undef truncl
2658# if HAVE_RAW_DECL_TRUNCL
2659_GL_WARN_ON_USE (truncl, "truncl is unportable - "
2660 "use gnulib module truncl for portability");
2661# endif
2662#endif
2663
2664
2665/* Definitions of function-like macros come here, after the function
2666 declarations. */
2667
2668
2669#if 0
2670# if 0
2671_GL_EXTERN_C int gl_isfinitef (float x);
2672_GL_EXTERN_C int gl_isfinited (double x);
2673_GL_EXTERN_C int gl_isfinitel (long double x);
2674# undef isfinite
2675# define isfinite(x) \
2676 (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
2677 sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
2678 gl_isfinitef (x))
2679# endif
2680# ifdef __cplusplus
2681# if defined isfinite || defined GNULIB_NAMESPACE
2682_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite)
2683# undef isfinite
2684# if __GNUC__ >= 6 || defined __clang__
2685 /* This platform's <cmath> possibly defines isfinite through a set of inline
2686 functions. */
2687_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool)
2688# define isfinite rpl_isfinite
2689# else
2690_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool)
2691# endif
2692# endif
2693# endif
2694#elif defined GNULIB_POSIXCHECK
2695# if defined isfinite
2696_GL_WARN_REAL_FLOATING_DECL (isfinite);
2697# undef isfinite
2698# define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x)
2699# endif
2700#endif
2701
2702
2703#if 0
2704# if 0
2705_GL_EXTERN_C int gl_isinff (float x);
2706_GL_EXTERN_C int gl_isinfd (double x);
2707_GL_EXTERN_C int gl_isinfl (long double x);
2708# undef isinf
2709# define isinf(x) \
2710 (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
2711 sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
2712 gl_isinff (x))
2713# endif
2714# ifdef __cplusplus
2715# if defined isinf || defined GNULIB_NAMESPACE
2716_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf)
2717# undef isinf
2718# if __GNUC__ >= 6 || defined __clang__
2719 /* This platform's <cmath> possibly defines isinf through a set of inline
2720 functions. */
2721_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool)
2722# define isinf rpl_isinf
2723# else
2724_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool)
2725# endif
2726# endif
2727# endif
2728#elif defined GNULIB_POSIXCHECK
2729# if defined isinf
2730_GL_WARN_REAL_FLOATING_DECL (isinf);
2731# undef isinf
2732# define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x)
2733# endif
2734#endif
2735
2736
2737#if 1
2738/* Test for NaN for 'float' numbers. */
2739# if 1
2740/* The original <math.h> included above provides a declaration of isnan macro
2741 or (older) isnanf function. */
2742# if __GNUC__ >= 4
2743 /* GCC 4.0 and newer provides three built-ins for isnan. */
2744# undef isnanf
2745# define isnanf(x) __builtin_isnanf ((float)(x))
2746# elif defined isnan
2747# undef isnanf
2748# define isnanf(x) isnan ((float)(x))
2749# endif
2750# else
2751/* Test whether X is a NaN. */
2752# undef isnanf
2753# define isnanf rpl_isnanf
2754_GL_EXTERN_C int isnanf (float x);
2755# endif
2756#endif
2757
2758#if 1
2759/* Test for NaN for 'double' numbers.
2760 This function is a gnulib extension, unlike isnan() which applied only
2761 to 'double' numbers earlier but now is a type-generic macro. */
2762# if 1
2763/* The original <math.h> included above provides a declaration of isnan
2764 macro. */
2765# if __GNUC__ >= 4
2766 /* GCC 4.0 and newer provides three built-ins for isnan. */
2767# undef isnand
2768# define isnand(x) __builtin_isnan ((double)(x))
2769# else
2770# undef isnand
2771# define isnand(x) isnan ((double)(x))
2772# endif
2773# else
2774/* Test whether X is a NaN. */
2775# undef isnand
2776# define isnand rpl_isnand
2777_GL_EXTERN_C int isnand (double x);
2778# endif
2779#endif
2780
2781#if 1
2782/* Test for NaN for 'long double' numbers. */
2783# if 1
2784/* The original <math.h> included above provides a declaration of isnan
2785 macro or (older) isnanl function. */
2786# if __GNUC__ >= 4
2787 /* GCC 4.0 and newer provides three built-ins for isnan. */
2788# undef isnanl
2789# define isnanl(x) __builtin_isnanl ((long double)(x))
2790# elif defined isnan
2791# undef isnanl
2792# define isnanl(x) isnan ((long double)(x))
2793# endif
2794# else
2795/* Test whether X is a NaN. */
2796# undef isnanl
2797# define isnanl rpl_isnanl
2798_GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST;
2799# endif
2800#endif
2801
2802/* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */
2803#if 1
2804# if 0
2805/* We can't just use the isnanf macro (e.g.) as exposed by
2806 isnanf.h (e.g.) here, because those may end up being macros
2807 that recursively expand back to isnan. So use the gnulib
2808 replacements for them directly. */
2809# if 1 && __GNUC__ >= 4
2810# define gl_isnan_f(x) __builtin_isnanf ((float)(x))
2811# else
2812_GL_EXTERN_C int rpl_isnanf (float x);
2813# define gl_isnan_f(x) rpl_isnanf (x)
2814# endif
2815# if 1 && __GNUC__ >= 4
2816# define gl_isnan_d(x) __builtin_isnan ((double)(x))
2817# else
2818_GL_EXTERN_C int rpl_isnand (double x);
2819# define gl_isnan_d(x) rpl_isnand (x)
2820# endif
2821# if 1 && __GNUC__ >= 4
2822# define gl_isnan_l(x) __builtin_isnanl ((long double)(x))
2823# else
2824_GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST;
2825# define gl_isnan_l(x) rpl_isnanl (x)
2826# endif
2827# undef isnan
2828# define isnan(x) \
2829 (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
2830 sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
2831 gl_isnan_f (x))
2832# elif __GNUC__ >= 4
2833# undef isnan
2834# define isnan(x) \
2835 (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \
2836 sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
2837 __builtin_isnanf ((float)(x)))
2838# endif
2839# ifdef __cplusplus
2840# if defined isnan || defined GNULIB_NAMESPACE
2841_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan)
2842# undef isnan
2843# if __GNUC__ >= 6 || defined __clang__
2844 /* This platform's <cmath> possibly defines isnan through a set of inline
2845 functions. */
2846_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool)
2847# define isnan rpl_isnan
2848# else
2849_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool)
2850# endif
2851# endif
2852# else
2853/* Ensure isnan is a macro. */
2854# ifndef isnan
2855# define isnan isnan
2856# endif
2857# endif
2858#elif defined GNULIB_POSIXCHECK
2859# if defined isnan
2860_GL_WARN_REAL_FLOATING_DECL (isnan);
2861# undef isnan
2862# define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x)
2863# endif
2864#endif
2865
2866
2867#if 1
2868# if (1 \
2869 && (!defined __cplusplus || __cplusplus < 201103))
2870# undef signbit
2871 /* GCC 4.0 and newer provides three built-ins for signbit. */
2872# define signbit(x) \
2873 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
2874 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
2875 __builtin_signbitf (x))
2876# endif
2877# if 0 && !GNULIB_defined_signbit
2878# undef signbit
2879_GL_EXTERN_C int gl_signbitf (float arg);
2880_GL_EXTERN_C int gl_signbitd (double arg);
2881_GL_EXTERN_C int gl_signbitl (long double arg);
2882# if __GNUC__ >= 2 && !defined __STRICT_ANSI__
2883# define _GL_NUM_UINT_WORDS(type) \
2884 ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
2885# if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
2886# define gl_signbitf_OPTIMIZED_MACRO
2887# define gl_signbitf(arg) \
2888 ({ union { float _value; \
2889 unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \
2890 } _m; \
2891 _m._value = (arg); \
2892 (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \
2893 })
2894# endif
2895# if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
2896# define gl_signbitd_OPTIMIZED_MACRO
2897# define gl_signbitd(arg) \
2898 ({ union { double _value; \
2899 unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \
2900 } _m; \
2901 _m._value = (arg); \
2902 (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \
2903 })
2904# endif
2905# if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
2906# define gl_signbitl_OPTIMIZED_MACRO
2907# define gl_signbitl(arg) \
2908 ({ union { long double _value; \
2909 unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \
2910 } _m; \
2911 _m._value = (arg); \
2912 (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \
2913 })
2914# endif
2915# endif
2916# define signbit(x) \
2917 (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
2918 sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
2919 gl_signbitf (x))
2920# define GNULIB_defined_signbit 1
2921# endif
2922# ifdef __cplusplus
2923# if defined signbit || defined GNULIB_NAMESPACE
2924_GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit)
2925# undef signbit
2926# if __GNUC__ >= 6 || defined __clang__
2927 /* This platform's <cmath> possibly defines signbit through a set of inline
2928 functions. */
2929_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool)
2930# define signbit rpl_signbit
2931# else
2932_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool)
2933# endif
2934# endif
2935# endif
2936#elif defined GNULIB_POSIXCHECK
2937# if defined signbit
2938_GL_WARN_REAL_FLOATING_DECL (signbit);
2939# undef signbit
2940# define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x)
2941# endif
2942#endif
2943
2944_GL_INLINE_HEADER_END
2945
2946#endif /* _GL_MATH_H */
2947#endif /* _GL_MATH_H */
2948