163670Snsayer/* This file is automatically generated. DO NOT EDIT! */ 263670Snsayer/* Generated from: NetBSD: mknative-gdb,v 1.12 2020/09/17 16:54:31 christos Exp */ 363670Snsayer/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ 463670Snsayer 563670Snsayer/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ 663670Snsayer/* A GNU-like <math.h>. 763670Snsayer 863670Snsayer Copyright (C) 2002-2003, 2007-2020 Free Software Foundation, Inc. 963670Snsayer 1063670Snsayer This program is free software: you can redistribute it and/or modify 1163670Snsayer it under the terms of the GNU General Public License as published by 1263670Snsayer the Free Software Foundation; either version 3 of the License, or 1363670Snsayer (at your option) any later version. 1463670Snsayer 1563670Snsayer This program is distributed in the hope that it will be useful, 1663670Snsayer but WITHOUT ANY WARRANTY; without even the implied warranty of 1763670Snsayer MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1863670Snsayer GNU General Public License for more details. 1963670Snsayer 2063670Snsayer You should have received a copy of the GNU General Public License 2163670Snsayer along with this program. If not, see <https://www.gnu.org/licenses/>. */ 2263670Snsayer 2363670Snsayer#ifndef _GL_MATH_H 2463670Snsayer 2563670Snsayer#if __GNUC__ >= 3 2663670Snsayer#pragma GCC system_header 2763670Snsayer#endif 2863670Snsayer 2963670Snsayer 3063670Snsayer/* The include_next requires a split double-inclusion guard. */ 3163670Snsayer#include_next <math.h> 3263670Snsayer 3363670Snsayer#ifndef _GL_MATH_H 3463670Snsayer#define _GL_MATH_H 3563803Snsayer 3663670Snsayer/* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in <fp.h>. */ 3763670Snsayer#if defined __VMS && ! defined NAN 3863670Snsayer# include <fp.h> 3963670Snsayer#endif 4063670Snsayer 4163670Snsayer#ifndef _GL_INLINE_HEADER_BEGIN 4263670Snsayer #error "Please include config.h first." 4363670Snsayer#endif 4463670Snsayer_GL_INLINE_HEADER_BEGIN 4563670Snsayer#ifndef _GL_MATH_INLINE 4663670Snsayer# define _GL_MATH_INLINE _GL_INLINE 4763670Snsayer#endif 4863670Snsayer 4963670Snsayer/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ 5063670Snsayer/* C++ compatible function declaration macros. 5163670Snsayer Copyright (C) 2010-2020 Free Software Foundation, Inc. 5263670Snsayer 5363670Snsayer This program is free software: you can redistribute it and/or modify it 5463670Snsayer under the terms of the GNU General Public License as published 5563670Snsayer by the Free Software Foundation; either version 3 of the License, or 5663670Snsayer (at your option) any later version. 5763670Snsayer 5863670Snsayer This program is distributed in the hope that it will be useful, 5963670Snsayer but WITHOUT ANY WARRANTY; without even the implied warranty of 6063670Snsayer MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 6163670Snsayer General Public License for more details. 6263670Snsayer 6363670Snsayer You should have received a copy of the GNU General Public License 6463670Snsayer along with this program. If not, see <https://www.gnu.org/licenses/>. */ 6563670Snsayer 6663670Snsayer#ifndef _GL_CXXDEFS_H 6763670Snsayer#define _GL_CXXDEFS_H 6863670Snsayer 6963670Snsayer/* Begin/end the GNULIB_NAMESPACE namespace. */ 7063670Snsayer#if defined __cplusplus && defined GNULIB_NAMESPACE 7163670Snsayer# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { 7263670Snsayer# define _GL_END_NAMESPACE } 7363670Snsayer#else 7463670Snsayer# define _GL_BEGIN_NAMESPACE 7563670Snsayer# define _GL_END_NAMESPACE 7663670Snsayer#endif 7763670Snsayer 7863670Snsayer/* The three most frequent use cases of these macros are: 7963670Snsayer 8063670Snsayer * For providing a substitute for a function that is missing on some 8163670Snsayer platforms, but is declared and works fine on the platforms on which 8263670Snsayer it exists: 8363670Snsayer 8463670Snsayer #if @GNULIB_FOO@ 8563670Snsayer # if !@HAVE_FOO@ 8663670Snsayer _GL_FUNCDECL_SYS (foo, ...); 8763670Snsayer # endif 8863670Snsayer _GL_CXXALIAS_SYS (foo, ...); 8963670Snsayer _GL_CXXALIASWARN (foo); 9063670Snsayer #elif defined GNULIB_POSIXCHECK 9163670Snsayer ... 9263670Snsayer #endif 9363670Snsayer 9463670Snsayer * For providing a replacement for a function that exists on all platforms, 9563670Snsayer but is broken/insufficient and needs to be replaced on some platforms: 9663670Snsayer 9763670Snsayer #if @GNULIB_FOO@ 9863670Snsayer # if @REPLACE_FOO@ 9963670Snsayer # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 10063670Snsayer # undef foo 10163670Snsayer # define foo rpl_foo 10263670Snsayer # endif 10363670Snsayer _GL_FUNCDECL_RPL (foo, ...); 10463670Snsayer _GL_CXXALIAS_RPL (foo, ...); 10563670Snsayer # else 10663670Snsayer _GL_CXXALIAS_SYS (foo, ...); 10763670Snsayer # endif 10863670Snsayer _GL_CXXALIASWARN (foo); 10963670Snsayer #elif defined GNULIB_POSIXCHECK 11063670Snsayer ... 11163670Snsayer #endif 11263670Snsayer 11363670Snsayer * For providing a replacement for a function that exists on some platforms 11463670Snsayer but is broken/insufficient and needs to be replaced on some of them and 11563670Snsayer is additionally either missing or undeclared on some other platforms: 11663670Snsayer 11763670Snsayer #if @GNULIB_FOO@ 11863670Snsayer # if @REPLACE_FOO@ 11963670Snsayer # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 12063670Snsayer # undef foo 12163670Snsayer # define foo rpl_foo 12263670Snsayer # endif 12363670Snsayer _GL_FUNCDECL_RPL (foo, ...); 12463670Snsayer _GL_CXXALIAS_RPL (foo, ...); 12563670Snsayer # else 12663670Snsayer # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ 12763670Snsayer _GL_FUNCDECL_SYS (foo, ...); 12863670Snsayer # endif 12963670Snsayer _GL_CXXALIAS_SYS (foo, ...); 13063670Snsayer # endif 13163670Snsayer _GL_CXXALIASWARN (foo); 13263670Snsayer #elif defined GNULIB_POSIXCHECK 13363670Snsayer ... 13463670Snsayer #endif 13563670Snsayer*/ 13663670Snsayer 13763670Snsayer/* _GL_EXTERN_C declaration; 13863670Snsayer performs the declaration with C linkage. */ 13963670Snsayer#if defined __cplusplus 14063670Snsayer# define _GL_EXTERN_C extern "C" 14163670Snsayer#else 14263670Snsayer# define _GL_EXTERN_C extern 14363670Snsayer#endif 14463670Snsayer 14563670Snsayer/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); 14663670Snsayer declares a replacement function, named rpl_func, with the given prototype, 14763670Snsayer consisting of return type, parameters, and attributes. 14863670Snsayer Example: 14963670Snsayer _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) 15063670Snsayer _GL_ARG_NONNULL ((1))); 15163670Snsayer */ 15263670Snsayer#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ 15363670Snsayer _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) 15463670Snsayer#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ 15563670Snsayer _GL_EXTERN_C rettype rpl_func parameters_and_attributes 15663670Snsayer 15763670Snsayer/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); 15863670Snsayer declares the system function, named func, with the given prototype, 15963670Snsayer consisting of return type, parameters, and attributes. 16063670Snsayer Example: 16163670Snsayer _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) 16263670Snsayer _GL_ARG_NONNULL ((1))); 16363670Snsayer */ 16463670Snsayer#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ 16563670Snsayer _GL_EXTERN_C rettype func parameters_and_attributes 16663803Snsayer 16763803Snsayer/* _GL_CXXALIAS_RPL (func, rettype, parameters); 16863803Snsayer declares a C++ alias called GNULIB_NAMESPACE::func 16963803Snsayer that redirects to rpl_func, if GNULIB_NAMESPACE is defined. 17063670Snsayer Example: 17163803Snsayer _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); 17263670Snsayer 17363803Snsayer Wrapping rpl_func in an object with an inline conversion operator 17463670Snsayer avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is 17563670Snsayer actually used in the program. */ 17663670Snsayer#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ 17763670Snsayer _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) 17863670Snsayer#if defined __cplusplus && defined GNULIB_NAMESPACE 17963670Snsayer# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ 18063670Snsayer namespace GNULIB_NAMESPACE \ 18163670Snsayer { \ 18263670Snsayer static const struct _gl_ ## func ## _wrapper \ 18363670Snsayer { \ 18463670Snsayer typedef rettype (*type) parameters; \ 18563670Snsayer \ 18663670Snsayer inline operator type () const \ 18763670Snsayer { \ 18863670Snsayer return ::rpl_func; \ 18963670Snsayer } \ 19063670Snsayer } func = {}; \ 19163670Snsayer } \ 19263670Snsayer _GL_EXTERN_C int _gl_cxxalias_dummy 19363670Snsayer#else 19463670Snsayer# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ 19563670Snsayer _GL_EXTERN_C int _gl_cxxalias_dummy 19663670Snsayer#endif 19763670Snsayer 19863670Snsayer/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); 19963670Snsayer is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); 20063670Snsayer except that the C function rpl_func may have a slightly different 20163670Snsayer declaration. A cast is used to silence the "invalid conversion" error 20263670Snsayer that would otherwise occur. */ 20363670Snsayer#if defined __cplusplus && defined GNULIB_NAMESPACE 20463803Snsayer# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ 20563670Snsayer namespace GNULIB_NAMESPACE \ 20663670Snsayer { \ 20763670Snsayer static const struct _gl_ ## func ## _wrapper \ 20863670Snsayer { \ 20963670Snsayer typedef rettype (*type) parameters; \ 21063670Snsayer \ 21163670Snsayer inline operator type () const \ 21263670Snsayer { \ 21363670Snsayer return reinterpret_cast<type>(::rpl_func); \ 21463670Snsayer } \ 21563803Snsayer } func = {}; \ 21663670Snsayer } \ 21763670Snsayer _GL_EXTERN_C int _gl_cxxalias_dummy 21863670Snsayer#else 21963670Snsayer# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ 22063670Snsayer _GL_EXTERN_C int _gl_cxxalias_dummy 22163670Snsayer#endif 22263803Snsayer 22363670Snsayer/* _GL_CXXALIAS_SYS (func, rettype, parameters); 22463670Snsayer declares a C++ alias called GNULIB_NAMESPACE::func 22563670Snsayer that redirects to the system provided function func, if GNULIB_NAMESPACE 22663670Snsayer is defined. 22763670Snsayer Example: 22863670Snsayer _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); 22963670Snsayer 23063670Snsayer Wrapping func in an object with an inline conversion operator 23163670Snsayer avoids a reference to func unless GNULIB_NAMESPACE::func is 23263670Snsayer actually used in the program. */ 23363670Snsayer#if defined __cplusplus && defined GNULIB_NAMESPACE 23463670Snsayer# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ 23563670Snsayer namespace GNULIB_NAMESPACE \ 23663670Snsayer { \ 23763670Snsayer static const struct _gl_ ## func ## _wrapper \ 23863670Snsayer { \ 23963670Snsayer typedef rettype (*type) parameters; \ 24063670Snsayer \ 24163670Snsayer inline operator type () const \ 24263670Snsayer { \ 24363670Snsayer return ::func; \ 24463670Snsayer } \ 24563670Snsayer } func = {}; \ 24663670Snsayer } \ 24763670Snsayer _GL_EXTERN_C int _gl_cxxalias_dummy 24863670Snsayer#else 24963803Snsayer# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ 25063670Snsayer _GL_EXTERN_C int _gl_cxxalias_dummy 25163803Snsayer#endif 25263670Snsayer 25363803Snsayer/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); 25463803Snsayer is like _GL_CXXALIAS_SYS (func, rettype, parameters); 25563803Snsayer except that the C function func may have a slightly different declaration. 25663803Snsayer A cast is used to silence the "invalid conversion" error that would 25763670Snsayer otherwise occur. */ 25863670Snsayer#if defined __cplusplus && defined GNULIB_NAMESPACE 25963670Snsayer# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ 26063670Snsayer namespace GNULIB_NAMESPACE \ 26163670Snsayer { \ 26263670Snsayer static const struct _gl_ ## func ## _wrapper \ 26363670Snsayer { \ 26463670Snsayer typedef rettype (*type) parameters; \ 26563670Snsayer \ 26663670Snsayer inline operator type () const \ 26763670Snsayer { \ 26863670Snsayer return reinterpret_cast<type>(::func); \ 26963670Snsayer } \ 27063670Snsayer } func = {}; \ 27163670Snsayer } \ 27263670Snsayer _GL_EXTERN_C int _gl_cxxalias_dummy 27363670Snsayer#else 27463670Snsayer# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ 27563670Snsayer _GL_EXTERN_C int _gl_cxxalias_dummy 27663670Snsayer#endif 27763670Snsayer 27863670Snsayer/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); 27963670Snsayer is like _GL_CXXALIAS_SYS (func, rettype, parameters); 28063670Snsayer except that the C function is picked among a set of overloaded functions, 28163670Snsayer namely the one with rettype2 and parameters2. Two consecutive casts 28263670Snsayer are used to silence the "cannot find a match" and "invalid conversion" 28363670Snsayer errors that would otherwise occur. */ 28463670Snsayer#if defined __cplusplus && defined GNULIB_NAMESPACE 28563670Snsayer /* The outer cast must be a reinterpret_cast. 28663670Snsayer The inner cast: When the function is defined as a set of overloaded 28763670Snsayer functions, it works as a static_cast<>, choosing the designated variant. 28863670Snsayer When the function is defined as a single variant, it works as a 28963670Snsayer reinterpret_cast<>. The parenthesized cast syntax works both ways. */ 29063670Snsayer# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ 29163803Snsayer namespace GNULIB_NAMESPACE \ 29263803Snsayer { \ 29363803Snsayer static const struct _gl_ ## func ## _wrapper \ 29463670Snsayer { \ 29563670Snsayer typedef rettype (*type) parameters; \ 29663670Snsayer \ 29763670Snsayer inline operator type () const \ 29863670Snsayer { \ 29963670Snsayer return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ 30063670Snsayer } \ 30163670Snsayer } func = {}; \ 30263670Snsayer } \ 30363670Snsayer _GL_EXTERN_C int _gl_cxxalias_dummy 30463670Snsayer#else 30563670Snsayer# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ 30663670Snsayer _GL_EXTERN_C int _gl_cxxalias_dummy 30763670Snsayer#endif 30863670Snsayer 30963670Snsayer/* _GL_CXXALIASWARN (func); 31063670Snsayer causes a warning to be emitted when ::func is used but not when 31163670Snsayer GNULIB_NAMESPACE::func is used. func must be defined without overloaded 31263670Snsayer variants. */ 31363670Snsayer#if defined __cplusplus && defined GNULIB_NAMESPACE 31463670Snsayer# define _GL_CXXALIASWARN(func) \ 31563670Snsayer _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) 31663670Snsayer# define _GL_CXXALIASWARN_1(func,namespace) \ 31763670Snsayer _GL_CXXALIASWARN_2 (func, namespace) 31863670Snsayer/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, 31963670Snsayer we enable the warning only when not optimizing. */ 32063670Snsayer# if !__OPTIMIZE__ 32163670Snsayer# define _GL_CXXALIASWARN_2(func,namespace) \ 32263670Snsayer _GL_WARN_ON_USE (func, \ 32363670Snsayer "The symbol ::" #func " refers to the system function. " \ 32463670Snsayer "Use " #namespace "::" #func " instead.") 32563670Snsayer# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 32663803Snsayer# define _GL_CXXALIASWARN_2(func,namespace) \ 32763803Snsayer extern __typeof__ (func) func 32863803Snsayer# else 32963803Snsayer# define _GL_CXXALIASWARN_2(func,namespace) \ 33063803Snsayer _GL_EXTERN_C int _gl_cxxalias_dummy 33163803Snsayer# endif 33263670Snsayer#else 33363670Snsayer# define _GL_CXXALIASWARN(func) \ 33463670Snsayer _GL_EXTERN_C int _gl_cxxalias_dummy 33563670Snsayer#endif 33663670Snsayer 33763670Snsayer/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); 33863803Snsayer causes a warning to be emitted when the given overloaded variant of ::func 33963670Snsayer is used but not when GNULIB_NAMESPACE::func is used. */ 34063670Snsayer#if defined __cplusplus && defined GNULIB_NAMESPACE 34163670Snsayer# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ 34263670Snsayer _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ 34363670Snsayer GNULIB_NAMESPACE) 34463670Snsayer# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ 34563670Snsayer _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) 34663670Snsayer/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, 34763670Snsayer we enable the warning only when not optimizing. */ 34863670Snsayer# if !__OPTIMIZE__ 34963670Snsayer# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 35063670Snsayer _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ 35163670Snsayer "The symbol ::" #func " refers to the system function. " \ 35263670Snsayer "Use " #namespace "::" #func " instead.") 35363670Snsayer# else 35463670Snsayer# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 35563670Snsayer _GL_EXTERN_C int _gl_cxxalias_dummy 35663670Snsayer# endif 35763670Snsayer#else 35863670Snsayer# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ 35963670Snsayer _GL_EXTERN_C int _gl_cxxalias_dummy 36063670Snsayer#endif 36163670Snsayer 36263670Snsayer#endif /* _GL_CXXDEFS_H */ 36363670Snsayer 36463670Snsayer/* The definition of _GL_ARG_NONNULL is copied here. */ 36563670Snsayer/* A C macro for declaring that specific arguments must not be NULL. 36663803Snsayer Copyright (C) 2009-2020 Free Software Foundation, Inc. 36763803Snsayer 36863803Snsayer This program is free software: you can redistribute it and/or modify it 36963670Snsayer under the terms of the GNU General Public License as published 37063670Snsayer by the Free Software Foundation; either version 3 of the License, or 37163803Snsayer (at your option) any later version. 37263803Snsayer 37363803Snsayer This program is distributed in the hope that it will be useful, 37463670Snsayer but WITHOUT ANY WARRANTY; without even the implied warranty of 37563670Snsayer MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 37663670Snsayer General Public License for more details. 37763670Snsayer 37863670Snsayer You should have received a copy of the GNU General Public License 37963670Snsayer along with this program. If not, see <https://www.gnu.org/licenses/>. */ 38063670Snsayer 38163670Snsayer/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools 38263670Snsayer that the values passed as arguments n, ..., m must be non-NULL pointers. 38363670Snsayer n = 1 stands for the first argument, n = 2 for the second argument etc. */ 38463670Snsayer#ifndef _GL_ARG_NONNULL 38563670Snsayer# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 38663670Snsayer# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) 38763670Snsayer# else 38863670Snsayer# define _GL_ARG_NONNULL(params) 38963670Snsayer# endif 39063670Snsayer#endif 39163803Snsayer 39263803Snsayer/* The definition of _GL_WARN_ON_USE is copied here. */ 39363670Snsayer/* A C macro for emitting warnings if a function is used. 39463670Snsayer Copyright (C) 2010-2020 Free Software Foundation, Inc. 39563670Snsayer 39663670Snsayer This program is free software: you can redistribute it and/or modify it 39763670Snsayer under the terms of the GNU General Public License as published 39863670Snsayer by the Free Software Foundation; either version 3 of the License, or 39963670Snsayer (at your option) any later version. 40063670Snsayer 40163670Snsayer This program is distributed in the hope that it will be useful, 40263670Snsayer but WITHOUT ANY WARRANTY; without even the implied warranty of 40363670Snsayer MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 40463670Snsayer General Public License for more details. 40563670Snsayer 40663670Snsayer You should have received a copy of the GNU General Public License 40763670Snsayer along with this program. If not, see <https://www.gnu.org/licenses/>. */ 40863670Snsayer 40963670Snsayer/* _GL_WARN_ON_USE (function, "literal string") issues a declaration 41063670Snsayer for FUNCTION which will then trigger a compiler warning containing 41163670Snsayer the text of "literal string" anywhere that function is called, if 41263670Snsayer supported by the compiler. If the compiler does not support this 41363670Snsayer feature, the macro expands to an unused extern declaration. 41463670Snsayer 41563670Snsayer _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the 41663670Snsayer attribute used in _GL_WARN_ON_USE. If the compiler does not support 41763670Snsayer this feature, it expands to empty. 41863670Snsayer 41963670Snsayer These macros are useful for marking a function as a potential 42063670Snsayer portability trap, with the intent that "literal string" include 42163670Snsayer instructions on the replacement function that should be used 42263670Snsayer instead. 42363670Snsayer _GL_WARN_ON_USE is for functions with 'extern' linkage. 42463670Snsayer _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' 42563670Snsayer linkage. 42663670Snsayer 42763670Snsayer However, one of the reasons that a function is a portability trap is 42863670Snsayer if it has the wrong signature. Declaring FUNCTION with a different 42963670Snsayer signature in C is a compilation error, so this macro must use the 43063670Snsayer same type as any existing declaration so that programs that avoid 43163670Snsayer the problematic FUNCTION do not fail to compile merely because they 43263670Snsayer included a header that poisoned the function. But this implies that 43363670Snsayer _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already 43463670Snsayer have a declaration. Use of this macro implies that there must not 43563670Snsayer be any other macro hiding the declaration of FUNCTION; but 43663670Snsayer undefining FUNCTION first is part of the poisoning process anyway 43763670Snsayer (although for symbols that are provided only via a macro, the result 43863670Snsayer is a compilation error rather than a warning containing 43963670Snsayer "literal string"). Also note that in C++, it is only safe to use if 44063670Snsayer FUNCTION has no overloads. 44163670Snsayer 44263670Snsayer For an example, it is possible to poison 'getline' by: 44363670Snsayer - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], 44463670Snsayer [getline]) in configure.ac, which potentially defines 44563670Snsayer HAVE_RAW_DECL_GETLINE 44663670Snsayer - adding this code to a header that wraps the system <stdio.h>: 44763670Snsayer #undef getline 44863670Snsayer #if HAVE_RAW_DECL_GETLINE 44963670Snsayer _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" 45063670Snsayer "not universally present; use the gnulib module getline"); 45163670Snsayer #endif 45263670Snsayer 45363670Snsayer It is not possible to directly poison global variables. But it is 45463670Snsayer possible to write a wrapper accessor function, and poison that 45563670Snsayer (less common usage, like &environ, will cause a compilation error 45663670Snsayer rather than issue the nice warning, but the end result of informing 45763670Snsayer the developer about their portability problem is still achieved): 45863670Snsayer #if HAVE_RAW_DECL_ENVIRON 45963670Snsayer static char *** 46063670Snsayer rpl_environ (void) { return &environ; } 46163670Snsayer _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); 46263803Snsayer # undef environ 46363803Snsayer # define environ (*rpl_environ ()) 46463670Snsayer #endif 46563803Snsayer or better (avoiding contradictory use of 'static' and 'extern'): 46663803Snsayer #if HAVE_RAW_DECL_ENVIRON 46763803Snsayer static char *** 46863803Snsayer _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") 46963803Snsayer rpl_environ (void) { return &environ; } 47063803Snsayer # undef environ 47163803Snsayer # define environ (*rpl_environ ()) 47263670Snsayer #endif 47363670Snsayer */ 47463803Snsayer#ifndef _GL_WARN_ON_USE 47563803Snsayer 47663803Snsayer# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) 47763670Snsayer/* A compiler attribute is available in gcc versions 4.3.0 and later. */ 47863670Snsayer# define _GL_WARN_ON_USE(function, message) \ 47963670Snsayerextern __typeof__ (function) function __attribute__ ((__warning__ (message))) 48063670Snsayer# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ 48163670Snsayer __attribute__ ((__warning__ (message))) 48263670Snsayer# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 48363670Snsayer/* Verify the existence of the function. */ 48463670Snsayer# define _GL_WARN_ON_USE(function, message) \ 48563670Snsayerextern __typeof__ (function) function 48663670Snsayer# define _GL_WARN_ON_USE_ATTRIBUTE(message) 48763670Snsayer# else /* Unsupported. */ 48863670Snsayer# define _GL_WARN_ON_USE(function, message) \ 48963670Snsayer_GL_WARN_EXTERN_C int _gl_warn_on_use 49063670Snsayer# define _GL_WARN_ON_USE_ATTRIBUTE(message) 49163670Snsayer# endif 49263670Snsayer#endif 49363670Snsayer 49463670Snsayer/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") 49563670Snsayer is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the 49663670Snsayer function is declared with the given prototype, consisting of return type, 49763670Snsayer parameters, and attributes. 49863670Snsayer This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does 49963670Snsayer not work in this case. */ 50063670Snsayer#ifndef _GL_WARN_ON_USE_CXX 50163670Snsayer# if !defined __cplusplus 50263670Snsayer# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 50363670Snsayer _GL_WARN_ON_USE (function, msg) 50463670Snsayer# else 50563670Snsayer# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) 50663670Snsayer# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 50763670Snsayerextern rettype function parameters_and_attributes \ 50863670Snsayer __attribute__ ((__warning__ (msg))) 50963670Snsayer# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 51063670Snsayer/* Verify the existence of the function. */ 51163670Snsayer# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 51263670Snsayerextern rettype function parameters_and_attributes 51363670Snsayer# else /* Unsupported. */ 51463670Snsayer# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 51563670Snsayer_GL_WARN_EXTERN_C int _gl_warn_on_use 51663670Snsayer# endif 51763670Snsayer# endif 51863670Snsayer#endif 51963670Snsayer 52063670Snsayer/* _GL_WARN_EXTERN_C declaration; 52163670Snsayer performs the declaration with C linkage. */ 52263670Snsayer#ifndef _GL_WARN_EXTERN_C 52363670Snsayer# if defined __cplusplus 52463670Snsayer# define _GL_WARN_EXTERN_C extern "C" 52563670Snsayer# else 52663670Snsayer# define _GL_WARN_EXTERN_C extern 52763670Snsayer# endif 52863670Snsayer#endif 52963670Snsayer 53063670Snsayer#ifdef __cplusplus 53163670Snsayer/* Helper macros to define type-generic function FUNC as overloaded functions, 53263670Snsayer rather than as macros like in C. POSIX declares these with an argument of 53363670Snsayer real-floating (that is, one of float, double, or long double). */ 53463670Snsayer# define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \ 53563670Snsayerstatic inline int \ 53663670Snsayer_gl_cxx_ ## func ## f (float f) \ 53763670Snsayer{ \ 53863670Snsayer return func (f); \ 53963670Snsayer} \ 54063670Snsayerstatic inline int \ 54163670Snsayer_gl_cxx_ ## func ## d (double d) \ 54263670Snsayer{ \ 54363670Snsayer return func (d); \ 54463670Snsayer} \ 54563670Snsayerstatic inline int \ 54663670Snsayer_gl_cxx_ ## func ## l (long double l) \ 54763670Snsayer{ \ 54863670Snsayer return func (l); \ 54963670Snsayer} 55063670Snsayer# define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func,rpl_func,rettype) \ 55163670Snsayer_GL_BEGIN_NAMESPACE \ 55263670Snsayerinline rettype \ 55363670Snsayerrpl_func (float f) \ 55463670Snsayer{ \ 55563670Snsayer return _gl_cxx_ ## func ## f (f); \ 55663670Snsayer} \ 55763670Snsayerinline rettype \ 55863803Snsayerrpl_func (double d) \ 55963670Snsayer{ \ 56063670Snsayer return _gl_cxx_ ## func ## d (d); \ 56163670Snsayer} \ 56263670Snsayerinline rettype \ 56363803Snsayerrpl_func (long double l) \ 56463670Snsayer{ \ 56563670Snsayer return _gl_cxx_ ## func ## l (l); \ 56663670Snsayer} \ 56763670Snsayer_GL_END_NAMESPACE 56863670Snsayer#endif 56963670Snsayer 57063670Snsayer/* Helper macros to define a portability warning for the 57163803Snsayer classification macro FUNC called with VALUE. POSIX declares the 57263670Snsayer classification macros with an argument of real-floating (that is, 57363670Snsayer one of float, double, or long double). */ 57463670Snsayer#define _GL_WARN_REAL_FLOATING_DECL(func) \ 57563670Snsayer_GL_MATH_INLINE int \ 57663670Snsayer_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ 57763670Snsayer "use gnulib module " #func " for portability") \ 57863670Snsayerrpl_ ## func ## f (float f) \ 57963670Snsayer{ \ 58063670Snsayer return func (f); \ 58163670Snsayer} \ 58263670Snsayer_GL_MATH_INLINE int \ 58363670Snsayer_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ 58463670Snsayer "use gnulib module " #func " for portability") \ 58563670Snsayerrpl_ ## func ## d (double d) \ 58663670Snsayer{ \ 58763670Snsayer return func (d); \ 58863670Snsayer} \ 58963670Snsayer_GL_MATH_INLINE int \ 59063670Snsayer_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ 59163670Snsayer "use gnulib module " #func " for portability") \ 59263670Snsayerrpl_ ## func ## l (long double l) \ 59363670Snsayer{ \ 59463670Snsayer return func (l); \ 59563670Snsayer} 59663670Snsayer#define _GL_WARN_REAL_FLOATING_IMPL(func, value) \ 59763670Snsayer (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \ 59863670Snsayer : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \ 59963670Snsayer : rpl_ ## func ## l (value)) 60063670Snsayer 60163670Snsayer 60263670Snsayer#if 0 60363670Snsayer/* Pull in a function that fixes the 'int' to 'long double' conversion 60463670Snsayer of glibc 2.7. */ 60563670Snsayer_GL_EXTERN_C void _Qp_itoq (long double *, int); 60663670Snsayerstatic void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq; 60763670Snsayer#endif 60863670Snsayer 60963670Snsayer 61063670Snsayer/* For clang: Use __has_builtin to determine whether a builtin is available. */ 61163670Snsayer#ifndef __has_builtin 61263670Snsayer# define __has_builtin(name) 0 61363670Snsayer#endif 61463670Snsayer 61563670Snsayer 61663670Snsayer/* POSIX allows platforms that don't support NAN. But all major 61763670Snsayer machines in the past 15 years have supported something close to 61863670Snsayer IEEE NaN, so we define this unconditionally. We also must define 61963670Snsayer it on platforms like Solaris 10, where NAN is present but defined 62063670Snsayer as a function pointer rather than a floating point constant. */ 62163670Snsayer#if !defined NAN || 0 62263670Snsayer# if !GNULIB_defined_NAN 62363670Snsayer# undef NAN 62463670Snsayer /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler 62563670Snsayer choke on the expression 0.0 / 0.0. */ 62663670Snsayer# if defined __DECC || defined _MSC_VER 62763670Snsayer_GL_MATH_INLINE float 62863670Snsayer_NaN () 62963670Snsayer{ 63063670Snsayer static float zero = 0.0f; 63163670Snsayer return zero / zero; 63263670Snsayer} 63363670Snsayer# define NAN (_NaN()) 63463670Snsayer# else 63563670Snsayer# define NAN (0.0f / 0.0f) 63663670Snsayer# endif 63763670Snsayer# define GNULIB_defined_NAN 1 63863670Snsayer# endif 63963670Snsayer#endif 64063670Snsayer 64163670Snsayer/* Solaris 10 defines HUGE_VAL, but as a function pointer rather 64263670Snsayer than a floating point constant. */ 64363670Snsayer#if 0 64463670Snsayer# undef HUGE_VALF 64563670Snsayer# define HUGE_VALF (1.0f / 0.0f) 64663670Snsayer# undef HUGE_VAL 64763670Snsayer# define HUGE_VAL (1.0 / 0.0) 64863803Snsayer# undef HUGE_VALL 64963803Snsayer# define HUGE_VALL (1.0L / 0.0L) 65063670Snsayer#endif 65163670Snsayer 65263803Snsayer/* HUGE_VALF is a 'float' Infinity. */ 65363803Snsayer#ifndef HUGE_VALF 65463803Snsayer# if defined _MSC_VER 65563803Snsayer/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */ 65663670Snsayer# define HUGE_VALF (1e25f * 1e25f) 65763670Snsayer# else 65863670Snsayer# define HUGE_VALF (1.0f / 0.0f) 65963670Snsayer# endif 66063670Snsayer#endif 66163670Snsayer 66263670Snsayer/* HUGE_VAL is a 'double' Infinity. */ 66363670Snsayer#ifndef HUGE_VAL 66463670Snsayer# if defined _MSC_VER 66563670Snsayer/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */ 66663670Snsayer# define HUGE_VAL (1e250 * 1e250) 66763670Snsayer# else 66863670Snsayer# define HUGE_VAL (1.0 / 0.0) 66963670Snsayer# endif 67063670Snsayer#endif 67163670Snsayer 67263670Snsayer/* HUGE_VALL is a 'long double' Infinity. */ 67363670Snsayer#ifndef HUGE_VALL 67463670Snsayer# if defined _MSC_VER 67563670Snsayer/* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */ 67663803Snsayer# define HUGE_VALL (1e250L * 1e250L) 67763670Snsayer# else 67863670Snsayer# define HUGE_VALL (1.0L / 0.0L) 67963670Snsayer# endif 68063670Snsayer#endif 68163670Snsayer 68263670Snsayer 68363670Snsayer#if defined FP_ILOGB0 && defined FP_ILOGBNAN 68463670Snsayer /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct. */ 68563670Snsayer# if defined __HAIKU__ 68663670Snsayer /* Haiku: match what ilogb() does */ 68763670Snsayer# undef FP_ILOGB0 68863670Snsayer# undef FP_ILOGBNAN 68963670Snsayer# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ 69063670Snsayer# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ 69163670Snsayer# endif 69263670Snsayer#else 69363670Snsayer /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */ 69463803Snsayer# if defined __NetBSD__ || defined __sgi 69563803Snsayer /* NetBSD, IRIX 6.5: match what ilogb() does */ 69663670Snsayer# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ 69763670Snsayer# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ 69863670Snsayer# elif defined _AIX 69963670Snsayer /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */ 70063670Snsayer# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ 70163670Snsayer# define FP_ILOGBNAN 2147483647 /* INT_MAX */ 70263670Snsayer# elif defined __sun 70363670Snsayer /* Solaris 9: match what ilogb() does */ 70463670Snsayer# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ 70563670Snsayer# define FP_ILOGBNAN 2147483647 /* INT_MAX */ 70663670Snsayer# else 70763670Snsayer /* Gnulib defined values. */ 70863670Snsayer# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ 70963670Snsayer# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ 71063670Snsayer# endif 71163670Snsayer#endif 71263670Snsayer 71363670Snsayer 71463670Snsayer#if 0 71563670Snsayer# if 0 71663670Snsayer# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 71763670Snsayer# undef acosf 71863670Snsayer# define acosf rpl_acosf 71963670Snsayer# endif 72063803Snsayer_GL_FUNCDECL_RPL (acosf, float, (float x)); 72163803Snsayer_GL_CXXALIAS_RPL (acosf, float, (float x)); 72263670Snsayer# else 72363670Snsayer# if !1 72463670Snsayer# undef acosf 72563670Snsayer_GL_FUNCDECL_SYS (acosf, float, (float x)); 72663670Snsayer# endif 72763803Snsayer_GL_CXXALIAS_SYS (acosf, float, (float x)); 72863803Snsayer# endif 72963803Snsayer_GL_CXXALIASWARN (acosf); 73063803Snsayer#elif defined GNULIB_POSIXCHECK 73163670Snsayer# undef acosf 73263670Snsayer# if HAVE_RAW_DECL_ACOSF 73363670Snsayer_GL_WARN_ON_USE (acosf, "acosf is unportable - " 73463670Snsayer "use gnulib module acosf for portability"); 73563670Snsayer# endif 73663670Snsayer#endif 73763670Snsayer 73863670Snsayer#if 0 73963670Snsayer# if !1 || !1 74063670Snsayer# undef acosl 74163670Snsayer_GL_FUNCDECL_SYS (acosl, long double, (long double x)); 74263670Snsayer# endif 74363670Snsayer_GL_CXXALIAS_SYS (acosl, long double, (long double x)); 74463670Snsayer_GL_CXXALIASWARN (acosl); 74563670Snsayer#elif defined GNULIB_POSIXCHECK 74663670Snsayer# undef acosl 74763670Snsayer# if HAVE_RAW_DECL_ACOSL 74863670Snsayer_GL_WARN_ON_USE (acosl, "acosl is unportable - " 74963670Snsayer "use gnulib module acosl for portability"); 75063803Snsayer# endif 75163670Snsayer#endif 75263670Snsayer 75363670Snsayer 75463670Snsayer#if 0 75563670Snsayer# if 0 75663670Snsayer# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 75763670Snsayer# undef asinf 75863670Snsayer# define asinf rpl_asinf 75963670Snsayer# endif 76063670Snsayer_GL_FUNCDECL_RPL (asinf, float, (float x)); 76163670Snsayer_GL_CXXALIAS_RPL (asinf, float, (float x)); 76263670Snsayer# else 76363670Snsayer# if !1 76463670Snsayer# undef asinf 76563670Snsayer_GL_FUNCDECL_SYS (asinf, float, (float x)); 76663670Snsayer# endif 76763670Snsayer_GL_CXXALIAS_SYS (asinf, float, (float x)); 76863670Snsayer# endif 76963670Snsayer_GL_CXXALIASWARN (asinf); 77063670Snsayer#elif defined GNULIB_POSIXCHECK 77163670Snsayer# undef asinf 77263670Snsayer# if HAVE_RAW_DECL_ASINF 77363670Snsayer_GL_WARN_ON_USE (asinf, "asinf is unportable - " 77463670Snsayer "use gnulib module asinf for portability"); 77563670Snsayer# endif 77663670Snsayer#endif 77763670Snsayer 77863670Snsayer#if 0 77963670Snsayer# if !1 || !1 78063670Snsayer# undef asinl 78163670Snsayer_GL_FUNCDECL_SYS (asinl, long double, (long double x)); 78263670Snsayer# endif 78363670Snsayer_GL_CXXALIAS_SYS (asinl, long double, (long double x)); 78463670Snsayer_GL_CXXALIASWARN (asinl); 78563670Snsayer#elif defined GNULIB_POSIXCHECK 78663670Snsayer# undef asinl 78763670Snsayer# if HAVE_RAW_DECL_ASINL 78863670Snsayer_GL_WARN_ON_USE (asinl, "asinl is unportable - " 78963670Snsayer "use gnulib module asinl for portability"); 79063670Snsayer# endif 79163670Snsayer#endif 79263670Snsayer 79363670Snsayer 79463670Snsayer#if 0 79563670Snsayer# if 0 79663670Snsayer# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 79763670Snsayer# undef atanf 79863670Snsayer# define atanf rpl_atanf 79963803Snsayer# endif 80063803Snsayer_GL_FUNCDECL_RPL (atanf, float, (float x)); 80163670Snsayer_GL_CXXALIAS_RPL (atanf, float, (float x)); 80263670Snsayer# else 80363670Snsayer# if !1 80463670Snsayer# undef atanf 80563803Snsayer_GL_FUNCDECL_SYS (atanf, float, (float x)); 80663803Snsayer# endif 80763803Snsayer_GL_CXXALIAS_SYS (atanf, float, (float x)); 80863803Snsayer# endif 80963670Snsayer_GL_CXXALIASWARN (atanf); 81063670Snsayer#elif defined GNULIB_POSIXCHECK 81163670Snsayer# undef atanf 81263803Snsayer# if HAVE_RAW_DECL_ATANF 81363803Snsayer_GL_WARN_ON_USE (atanf, "atanf is unportable - " 81463803Snsayer "use gnulib module atanf for portability"); 81563670Snsayer# endif 81663670Snsayer#endif 81763670Snsayer 81863670Snsayer#if 0 81963670Snsayer# if !1 || !1 82063670Snsayer# undef atanl 82163670Snsayer_GL_FUNCDECL_SYS (atanl, long double, (long double x)); 82263670Snsayer# endif 82363670Snsayer_GL_CXXALIAS_SYS (atanl, long double, (long double x)); 82463670Snsayer_GL_CXXALIASWARN (atanl); 825#elif defined GNULIB_POSIXCHECK 826# undef atanl 827# if HAVE_RAW_DECL_ATANL 828_GL_WARN_ON_USE (atanl, "atanl is unportable - " 829 "use gnulib module atanl for portability"); 830# endif 831#endif 832 833 834#if 0 835# if 0 836# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 837# undef atan2f 838# define atan2f rpl_atan2f 839# endif 840_GL_FUNCDECL_RPL (atan2f, float, (float y, float x)); 841_GL_CXXALIAS_RPL (atan2f, float, (float y, float x)); 842# else 843# if !1 844# undef atan2f 845_GL_FUNCDECL_SYS (atan2f, float, (float y, float x)); 846# endif 847_GL_CXXALIAS_SYS (atan2f, float, (float y, float x)); 848# endif 849_GL_CXXALIASWARN (atan2f); 850#elif defined GNULIB_POSIXCHECK 851# undef atan2f 852# if HAVE_RAW_DECL_ATAN2F 853_GL_WARN_ON_USE (atan2f, "atan2f is unportable - " 854 "use gnulib module atan2f for portability"); 855# endif 856#endif 857 858 859#if 0 860# if 0 861# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 862# undef cbrtf 863# define cbrtf rpl_cbrtf 864# endif 865_GL_FUNCDECL_RPL (cbrtf, float, (float x)); 866_GL_CXXALIAS_RPL (cbrtf, float, (float x)); 867# else 868# if !1 869_GL_FUNCDECL_SYS (cbrtf, float, (float x)); 870# endif 871_GL_CXXALIAS_SYS (cbrtf, float, (float x)); 872# endif 873_GL_CXXALIASWARN (cbrtf); 874#elif defined GNULIB_POSIXCHECK 875# undef cbrtf 876# if HAVE_RAW_DECL_CBRTF 877_GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - " 878 "use gnulib module cbrtf for portability"); 879# endif 880#endif 881 882#if 0 883# if !1 884_GL_FUNCDECL_SYS (cbrt, double, (double x)); 885# endif 886_GL_CXXALIAS_SYS (cbrt, double, (double x)); 887# if __GLIBC__ >= 2 888_GL_CXXALIASWARN (cbrt); 889# endif 890#elif defined GNULIB_POSIXCHECK 891# undef cbrt 892# if HAVE_RAW_DECL_CBRT 893_GL_WARN_ON_USE (cbrt, "cbrt is unportable - " 894 "use gnulib module cbrt for portability"); 895# endif 896#endif 897 898#if 0 899# if 0 900# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 901# undef cbrtl 902# define cbrtl rpl_cbrtl 903# endif 904_GL_FUNCDECL_RPL (cbrtl, long double, (long double x)); 905_GL_CXXALIAS_RPL (cbrtl, long double, (long double x)); 906# else 907# if !1 908_GL_FUNCDECL_SYS (cbrtl, long double, (long double x)); 909# endif 910_GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); 911# endif 912_GL_CXXALIASWARN (cbrtl); 913#elif defined GNULIB_POSIXCHECK 914# undef cbrtl 915# if HAVE_RAW_DECL_CBRTL 916_GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - " 917 "use gnulib module cbrtl for portability"); 918# endif 919#endif 920 921 922#if 0 923# if 0 924# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 925# undef ceilf 926# define ceilf rpl_ceilf 927# endif 928_GL_FUNCDECL_RPL (ceilf, float, (float x)); 929_GL_CXXALIAS_RPL (ceilf, float, (float x)); 930# else 931# if !1 932# undef ceilf 933_GL_FUNCDECL_SYS (ceilf, float, (float x)); 934# endif 935_GL_CXXALIAS_SYS (ceilf, float, (float x)); 936# endif 937_GL_CXXALIASWARN (ceilf); 938#elif defined GNULIB_POSIXCHECK 939# undef ceilf 940# if HAVE_RAW_DECL_CEILF 941_GL_WARN_ON_USE (ceilf, "ceilf is unportable - " 942 "use gnulib module ceilf for portability"); 943# endif 944#endif 945 946#if 0 947# if 0 948# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 949# undef ceil 950# define ceil rpl_ceil 951# endif 952_GL_FUNCDECL_RPL (ceil, double, (double x)); 953_GL_CXXALIAS_RPL (ceil, double, (double x)); 954# else 955_GL_CXXALIAS_SYS (ceil, double, (double x)); 956# endif 957# if __GLIBC__ >= 2 958_GL_CXXALIASWARN (ceil); 959# endif 960#endif 961 962#if 0 963# if 0 964# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 965# undef ceill 966# define ceill rpl_ceill 967# endif 968_GL_FUNCDECL_RPL (ceill, long double, (long double x)); 969_GL_CXXALIAS_RPL (ceill, long double, (long double x)); 970# else 971# if !1 972# undef ceill 973_GL_FUNCDECL_SYS (ceill, long double, (long double x)); 974# endif 975_GL_CXXALIAS_SYS (ceill, long double, (long double x)); 976# endif 977_GL_CXXALIASWARN (ceill); 978#elif defined GNULIB_POSIXCHECK 979# undef ceill 980# if HAVE_RAW_DECL_CEILL 981_GL_WARN_ON_USE (ceill, "ceill is unportable - " 982 "use gnulib module ceill for portability"); 983# endif 984#endif 985 986 987#if 0 988# if !1 989# undef copysignf 990_GL_FUNCDECL_SYS (copysignf, float, (float x, float y)); 991# endif 992_GL_CXXALIAS_SYS (copysignf, float, (float x, float y)); 993_GL_CXXALIASWARN (copysignf); 994#elif defined GNULIB_POSIXCHECK 995# undef copysignf 996# if HAVE_RAW_DECL_COPYSIGNF 997_GL_WARN_ON_USE (copysignf, "copysignf is unportable - " 998 "use gnulib module copysignf for portability"); 999# endif 1000#endif 1001 1002#if 0 1003# if !1 1004_GL_FUNCDECL_SYS (copysign, double, (double x, double y)); 1005# endif 1006_GL_CXXALIAS_SYS (copysign, double, (double x, double y)); 1007# if __GLIBC__ >= 2 1008_GL_CXXALIASWARN (copysign); 1009# endif 1010#elif defined GNULIB_POSIXCHECK 1011# undef copysign 1012# if HAVE_RAW_DECL_COPYSIGN 1013_GL_WARN_ON_USE (copysign, "copysign is unportable - " 1014 "use gnulib module copysign for portability"); 1015# endif 1016#endif 1017 1018#if 0 1019# if !1 1020_GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y)); 1021# endif 1022_GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y)); 1023_GL_CXXALIASWARN (copysignl); 1024#elif defined GNULIB_POSIXCHECK 1025# undef copysignl 1026# if HAVE_RAW_DECL_COPYSIGNL 1027_GL_WARN_ON_USE (copysign, "copysignl is unportable - " 1028 "use gnulib module copysignl for portability"); 1029# endif 1030#endif 1031 1032 1033#if 0 1034# if 0 1035# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1036# undef cosf 1037# define cosf rpl_cosf 1038# endif 1039_GL_FUNCDECL_RPL (cosf, float, (float x)); 1040_GL_CXXALIAS_RPL (cosf, float, (float x)); 1041# else 1042# if !1 1043# undef cosf 1044_GL_FUNCDECL_SYS (cosf, float, (float x)); 1045# endif 1046_GL_CXXALIAS_SYS (cosf, float, (float x)); 1047# endif 1048_GL_CXXALIASWARN (cosf); 1049#elif defined GNULIB_POSIXCHECK 1050# undef cosf 1051# if HAVE_RAW_DECL_COSF 1052_GL_WARN_ON_USE (cosf, "cosf is unportable - " 1053 "use gnulib module cosf for portability"); 1054# endif 1055#endif 1056 1057#if 0 1058# if !1 || !1 1059# undef cosl 1060_GL_FUNCDECL_SYS (cosl, long double, (long double x)); 1061# endif 1062_GL_CXXALIAS_SYS (cosl, long double, (long double x)); 1063_GL_CXXALIASWARN (cosl); 1064#elif defined GNULIB_POSIXCHECK 1065# undef cosl 1066# if HAVE_RAW_DECL_COSL 1067_GL_WARN_ON_USE (cosl, "cosl is unportable - " 1068 "use gnulib module cosl for portability"); 1069# endif 1070#endif 1071 1072 1073#if 0 1074# if 0 1075# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1076# undef coshf 1077# define coshf rpl_coshf 1078# endif 1079_GL_FUNCDECL_RPL (coshf, float, (float x)); 1080_GL_CXXALIAS_RPL (coshf, float, (float x)); 1081# else 1082# if !1 1083# undef coshf 1084_GL_FUNCDECL_SYS (coshf, float, (float x)); 1085# endif 1086_GL_CXXALIAS_SYS (coshf, float, (float x)); 1087# endif 1088_GL_CXXALIASWARN (coshf); 1089#elif defined GNULIB_POSIXCHECK 1090# undef coshf 1091# if HAVE_RAW_DECL_COSHF 1092_GL_WARN_ON_USE (coshf, "coshf is unportable - " 1093 "use gnulib module coshf for portability"); 1094# endif 1095#endif 1096 1097 1098#if 0 1099# if 0 1100# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1101# undef expf 1102# define expf rpl_expf 1103# endif 1104_GL_FUNCDECL_RPL (expf, float, (float x)); 1105_GL_CXXALIAS_RPL (expf, float, (float x)); 1106# else 1107# if !1 1108# undef expf 1109_GL_FUNCDECL_SYS (expf, float, (float x)); 1110# endif 1111_GL_CXXALIAS_SYS (expf, float, (float x)); 1112# endif 1113_GL_CXXALIASWARN (expf); 1114#elif defined GNULIB_POSIXCHECK 1115# undef expf 1116# if HAVE_RAW_DECL_EXPF 1117_GL_WARN_ON_USE (expf, "expf is unportable - " 1118 "use gnulib module expf for portability"); 1119# endif 1120#endif 1121 1122#if 0 1123# if 0 1124# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1125# undef expl 1126# define expl rpl_expl 1127# endif 1128_GL_FUNCDECL_RPL (expl, long double, (long double x)); 1129_GL_CXXALIAS_RPL (expl, long double, (long double x)); 1130# else 1131# if !1 || !1 1132# undef expl 1133_GL_FUNCDECL_SYS (expl, long double, (long double x)); 1134# endif 1135_GL_CXXALIAS_SYS (expl, long double, (long double x)); 1136# endif 1137_GL_CXXALIASWARN (expl); 1138#elif defined GNULIB_POSIXCHECK 1139# undef expl 1140# if HAVE_RAW_DECL_EXPL 1141_GL_WARN_ON_USE (expl, "expl is unportable - " 1142 "use gnulib module expl for portability"); 1143# endif 1144#endif 1145 1146 1147#if 0 1148# if !1 1149_GL_FUNCDECL_SYS (exp2f, float, (float x)); 1150# endif 1151_GL_CXXALIAS_SYS (exp2f, float, (float x)); 1152_GL_CXXALIASWARN (exp2f); 1153#elif defined GNULIB_POSIXCHECK 1154# undef exp2f 1155# if HAVE_RAW_DECL_EXP2F 1156_GL_WARN_ON_USE (exp2f, "exp2f is unportable - " 1157 "use gnulib module exp2f for portability"); 1158# endif 1159#endif 1160 1161#if 0 1162# if 0 1163# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1164# undef exp2 1165# define exp2 rpl_exp2 1166# endif 1167_GL_FUNCDECL_RPL (exp2, double, (double x)); 1168_GL_CXXALIAS_RPL (exp2, double, (double x)); 1169# else 1170# if !1 1171_GL_FUNCDECL_SYS (exp2, double, (double x)); 1172# endif 1173_GL_CXXALIAS_SYS (exp2, double, (double x)); 1174# endif 1175# if __GLIBC__ >= 2 1176_GL_CXXALIASWARN (exp2); 1177# endif 1178#elif defined GNULIB_POSIXCHECK 1179# undef exp2 1180# if HAVE_RAW_DECL_EXP2 1181_GL_WARN_ON_USE (exp2, "exp2 is unportable - " 1182 "use gnulib module exp2 for portability"); 1183# endif 1184#endif 1185 1186#if 0 1187# if 0 1188# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1189# undef exp2l 1190# define exp2l rpl_exp2l 1191# endif 1192_GL_FUNCDECL_RPL (exp2l, long double, (long double x)); 1193_GL_CXXALIAS_RPL (exp2l, long double, (long double x)); 1194# else 1195# if !1 1196# undef exp2l 1197_GL_FUNCDECL_SYS (exp2l, long double, (long double x)); 1198# endif 1199_GL_CXXALIAS_SYS (exp2l, long double, (long double x)); 1200# endif 1201_GL_CXXALIASWARN (exp2l); 1202#elif defined GNULIB_POSIXCHECK 1203# undef exp2l 1204# if HAVE_RAW_DECL_EXP2L 1205_GL_WARN_ON_USE (exp2l, "exp2l is unportable - " 1206 "use gnulib module exp2l for portability"); 1207# endif 1208#endif 1209 1210 1211#if 0 1212# if 0 1213# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1214# undef expm1f 1215# define expm1f rpl_expm1f 1216# endif 1217_GL_FUNCDECL_RPL (expm1f, float, (float x)); 1218_GL_CXXALIAS_RPL (expm1f, float, (float x)); 1219# else 1220# if !1 1221_GL_FUNCDECL_SYS (expm1f, float, (float x)); 1222# endif 1223_GL_CXXALIAS_SYS (expm1f, float, (float x)); 1224# endif 1225_GL_CXXALIASWARN (expm1f); 1226#elif defined GNULIB_POSIXCHECK 1227# undef expm1f 1228# if HAVE_RAW_DECL_EXPM1F 1229_GL_WARN_ON_USE (expm1f, "expm1f is unportable - " 1230 "use gnulib module expm1f for portability"); 1231# endif 1232#endif 1233 1234#if 0 1235# if 0 1236# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1237# undef expm1 1238# define expm1 rpl_expm1 1239# endif 1240_GL_FUNCDECL_RPL (expm1, double, (double x)); 1241_GL_CXXALIAS_RPL (expm1, double, (double x)); 1242# else 1243# if !1 1244_GL_FUNCDECL_SYS (expm1, double, (double x)); 1245# endif 1246_GL_CXXALIAS_SYS (expm1, double, (double x)); 1247# endif 1248# if __GLIBC__ >= 2 1249_GL_CXXALIASWARN (expm1); 1250# endif 1251#elif defined GNULIB_POSIXCHECK 1252# undef expm1 1253# if HAVE_RAW_DECL_EXPM1 1254_GL_WARN_ON_USE (expm1, "expm1 is unportable - " 1255 "use gnulib module expm1 for portability"); 1256# endif 1257#endif 1258 1259#if 0 1260# if 0 1261# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1262# undef expm1l 1263# define expm1l rpl_expm1l 1264# endif 1265_GL_FUNCDECL_RPL (expm1l, long double, (long double x)); 1266_GL_CXXALIAS_RPL (expm1l, long double, (long double x)); 1267# else 1268# if !1 1269# undef expm1l 1270# if !(defined __cplusplus && defined _AIX) 1271_GL_FUNCDECL_SYS (expm1l, long double, (long double x)); 1272# endif 1273# endif 1274_GL_CXXALIAS_SYS (expm1l, long double, (long double x)); 1275# endif 1276_GL_CXXALIASWARN (expm1l); 1277#elif defined GNULIB_POSIXCHECK 1278# undef expm1l 1279# if HAVE_RAW_DECL_EXPM1L 1280_GL_WARN_ON_USE (expm1l, "expm1l is unportable - " 1281 "use gnulib module expm1l for portability"); 1282# endif 1283#endif 1284 1285 1286#if 0 1287# if !1 1288# undef fabsf 1289_GL_FUNCDECL_SYS (fabsf, float, (float x)); 1290# endif 1291_GL_CXXALIAS_SYS (fabsf, float, (float x)); 1292_GL_CXXALIASWARN (fabsf); 1293#elif defined GNULIB_POSIXCHECK 1294# undef fabsf 1295# if HAVE_RAW_DECL_FABSF 1296_GL_WARN_ON_USE (fabsf, "fabsf is unportable - " 1297 "use gnulib module fabsf for portability"); 1298# endif 1299#endif 1300 1301#if 0 1302# if 0 1303# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1304# undef fabsl 1305# define fabsl rpl_fabsl 1306# endif 1307_GL_FUNCDECL_RPL (fabsl, long double, (long double x)); 1308_GL_CXXALIAS_RPL (fabsl, long double, (long double x)); 1309# else 1310# if !1 1311# undef fabsl 1312_GL_FUNCDECL_SYS (fabsl, long double, (long double x)); 1313# endif 1314_GL_CXXALIAS_SYS (fabsl, long double, (long double x)); 1315# endif 1316_GL_CXXALIASWARN (fabsl); 1317#elif defined GNULIB_POSIXCHECK 1318# undef fabsl 1319# if HAVE_RAW_DECL_FABSL 1320_GL_WARN_ON_USE (fabsl, "fabsl is unportable - " 1321 "use gnulib module fabsl for portability"); 1322# endif 1323#endif 1324 1325 1326#if 0 1327# if 0 1328# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1329# undef floorf 1330# define floorf rpl_floorf 1331# endif 1332_GL_FUNCDECL_RPL (floorf, float, (float x)); 1333_GL_CXXALIAS_RPL (floorf, float, (float x)); 1334# else 1335# if !1 1336# undef floorf 1337_GL_FUNCDECL_SYS (floorf, float, (float x)); 1338# endif 1339_GL_CXXALIAS_SYS (floorf, float, (float x)); 1340# endif 1341_GL_CXXALIASWARN (floorf); 1342#elif defined GNULIB_POSIXCHECK 1343# undef floorf 1344# if HAVE_RAW_DECL_FLOORF 1345_GL_WARN_ON_USE (floorf, "floorf is unportable - " 1346 "use gnulib module floorf for portability"); 1347# endif 1348#endif 1349 1350#if 0 1351# if 0 1352# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1353# undef floor 1354# define floor rpl_floor 1355# endif 1356_GL_FUNCDECL_RPL (floor, double, (double x)); 1357_GL_CXXALIAS_RPL (floor, double, (double x)); 1358# else 1359_GL_CXXALIAS_SYS (floor, double, (double x)); 1360# endif 1361# if __GLIBC__ >= 2 1362_GL_CXXALIASWARN (floor); 1363# endif 1364#endif 1365 1366#if 0 1367# if 0 1368# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1369# undef floorl 1370# define floorl rpl_floorl 1371# endif 1372_GL_FUNCDECL_RPL (floorl, long double, (long double x)); 1373_GL_CXXALIAS_RPL (floorl, long double, (long double x)); 1374# else 1375# if !1 1376# undef floorl 1377_GL_FUNCDECL_SYS (floorl, long double, (long double x)); 1378# endif 1379_GL_CXXALIAS_SYS (floorl, long double, (long double x)); 1380# endif 1381_GL_CXXALIASWARN (floorl); 1382#elif defined GNULIB_POSIXCHECK 1383# undef floorl 1384# if HAVE_RAW_DECL_FLOORL 1385_GL_WARN_ON_USE (floorl, "floorl is unportable - " 1386 "use gnulib module floorl for portability"); 1387# endif 1388#endif 1389 1390 1391#if 0 1392# if 0 1393# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1394# undef fmaf 1395# define fmaf rpl_fmaf 1396# endif 1397_GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z)); 1398_GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z)); 1399# else 1400# if !1 1401# undef fmaf 1402_GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z)); 1403# endif 1404_GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z)); 1405# endif 1406_GL_CXXALIASWARN (fmaf); 1407#elif defined GNULIB_POSIXCHECK 1408# undef fmaf 1409# if HAVE_RAW_DECL_FMAF 1410_GL_WARN_ON_USE (fmaf, "fmaf is unportable - " 1411 "use gnulib module fmaf for portability"); 1412# endif 1413#endif 1414 1415#if 0 1416# if 0 1417# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1418# undef fma 1419# define fma rpl_fma 1420# endif 1421_GL_FUNCDECL_RPL (fma, double, (double x, double y, double z)); 1422_GL_CXXALIAS_RPL (fma, double, (double x, double y, double z)); 1423# else 1424# if !1 1425# undef fma 1426_GL_FUNCDECL_SYS (fma, double, (double x, double y, double z)); 1427# endif 1428_GL_CXXALIAS_SYS (fma, double, (double x, double y, double z)); 1429# endif 1430# if __GLIBC__ >= 2 1431_GL_CXXALIASWARN (fma); 1432# endif 1433#elif defined GNULIB_POSIXCHECK 1434# undef fma 1435# if HAVE_RAW_DECL_FMA 1436_GL_WARN_ON_USE (fma, "fma is unportable - " 1437 "use gnulib module fma for portability"); 1438# endif 1439#endif 1440 1441#if 0 1442# if 0 1443# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1444# undef fmal 1445# define fmal rpl_fmal 1446# endif 1447_GL_FUNCDECL_RPL (fmal, long double, 1448 (long double x, long double y, long double z)); 1449_GL_CXXALIAS_RPL (fmal, long double, 1450 (long double x, long double y, long double z)); 1451# else 1452# if !1 1453# undef fmal 1454# if !(defined __cplusplus && defined _AIX) 1455_GL_FUNCDECL_SYS (fmal, long double, 1456 (long double x, long double y, long double z)); 1457# endif 1458# endif 1459_GL_CXXALIAS_SYS (fmal, long double, 1460 (long double x, long double y, long double z)); 1461# endif 1462_GL_CXXALIASWARN (fmal); 1463#elif defined GNULIB_POSIXCHECK 1464# undef fmal 1465# if HAVE_RAW_DECL_FMAL 1466_GL_WARN_ON_USE (fmal, "fmal is unportable - " 1467 "use gnulib module fmal for portability"); 1468# endif 1469#endif 1470 1471 1472#if 0 1473# if 0 1474# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1475# undef fmodf 1476# define fmodf rpl_fmodf 1477# endif 1478_GL_FUNCDECL_RPL (fmodf, float, (float x, float y)); 1479_GL_CXXALIAS_RPL (fmodf, float, (float x, float y)); 1480# else 1481# if !1 1482# undef fmodf 1483_GL_FUNCDECL_SYS (fmodf, float, (float x, float y)); 1484# endif 1485_GL_CXXALIAS_SYS (fmodf, float, (float x, float y)); 1486# endif 1487_GL_CXXALIASWARN (fmodf); 1488#elif defined GNULIB_POSIXCHECK 1489# undef fmodf 1490# if HAVE_RAW_DECL_FMODF 1491_GL_WARN_ON_USE (fmodf, "fmodf is unportable - " 1492 "use gnulib module fmodf for portability"); 1493# endif 1494#endif 1495 1496#if 0 1497# if 0 1498# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1499# undef fmod 1500# define fmod rpl_fmod 1501# endif 1502_GL_FUNCDECL_RPL (fmod, double, (double x, double y)); 1503_GL_CXXALIAS_RPL (fmod, double, (double x, double y)); 1504# else 1505_GL_CXXALIAS_SYS (fmod, double, (double x, double y)); 1506# endif 1507# if __GLIBC__ >= 2 1508_GL_CXXALIASWARN (fmod); 1509# endif 1510#elif defined GNULIB_POSIXCHECK 1511# undef fmod 1512# if HAVE_RAW_DECL_FMOD 1513_GL_WARN_ON_USE (fmod, "fmod has portability problems - " 1514 "use gnulib module fmod for portability"); 1515# endif 1516#endif 1517 1518#if 0 1519# if 0 1520# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1521# undef fmodl 1522# define fmodl rpl_fmodl 1523# endif 1524_GL_FUNCDECL_RPL (fmodl, long double, (long double x, long double y)); 1525_GL_CXXALIAS_RPL (fmodl, long double, (long double x, long double y)); 1526# else 1527# if !1 1528# undef fmodl 1529_GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y)); 1530# endif 1531_GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y)); 1532# endif 1533_GL_CXXALIASWARN (fmodl); 1534#elif defined GNULIB_POSIXCHECK 1535# undef fmodl 1536# if HAVE_RAW_DECL_FMODL 1537_GL_WARN_ON_USE (fmodl, "fmodl is unportable - " 1538 "use gnulib module fmodl for portability"); 1539# endif 1540#endif 1541 1542 1543/* Write x as 1544 x = mantissa * 2^exp 1545 where 1546 If x finite and nonzero: 0.5 <= |mantissa| < 1.0. 1547 If x is zero: mantissa = x, exp = 0. 1548 If x is infinite or NaN: mantissa = x, exp unspecified. 1549 Store exp in *EXPPTR and return mantissa. */ 1550#if 0 1551# if 0 1552# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1553# undef frexpf 1554# define frexpf rpl_frexpf 1555# endif 1556_GL_FUNCDECL_RPL (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); 1557_GL_CXXALIAS_RPL (frexpf, float, (float x, int *expptr)); 1558# else 1559# if !1 1560# undef frexpf 1561_GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); 1562# endif 1563_GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr)); 1564# endif 1565_GL_CXXALIASWARN (frexpf); 1566#elif defined GNULIB_POSIXCHECK 1567# undef frexpf 1568# if HAVE_RAW_DECL_FREXPF 1569_GL_WARN_ON_USE (frexpf, "frexpf is unportable - " 1570 "use gnulib module frexpf for portability"); 1571# endif 1572#endif 1573 1574/* Write x as 1575 x = mantissa * 2^exp 1576 where 1577 If x finite and nonzero: 0.5 <= |mantissa| < 1.0. 1578 If x is zero: mantissa = x, exp = 0. 1579 If x is infinite or NaN: mantissa = x, exp unspecified. 1580 Store exp in *EXPPTR and return mantissa. */ 1581#if 1 1582# if 0 1583# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1584# undef frexp 1585# define frexp rpl_frexp 1586# endif 1587_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2))); 1588_GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr)); 1589# else 1590_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr)); 1591# endif 1592# if __GLIBC__ >= 2 1593_GL_CXXALIASWARN1 (frexp, double, (double x, int *expptr)); 1594# endif 1595#elif defined GNULIB_POSIXCHECK 1596# undef frexp 1597/* Assume frexp is always declared. */ 1598_GL_WARN_ON_USE (frexp, "frexp is unportable - " 1599 "use gnulib module frexp for portability"); 1600#endif 1601 1602/* Write x as 1603 x = mantissa * 2^exp 1604 where 1605 If x finite and nonzero: 0.5 <= |mantissa| < 1.0. 1606 If x is zero: mantissa = x, exp = 0. 1607 If x is infinite or NaN: mantissa = x, exp unspecified. 1608 Store exp in *EXPPTR and return mantissa. */ 1609#if 1 && 0 1610# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1611# undef frexpl 1612# define frexpl rpl_frexpl 1613# endif 1614_GL_FUNCDECL_RPL (frexpl, long double, 1615 (long double x, int *expptr) _GL_ARG_NONNULL ((2))); 1616_GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr)); 1617#else 1618# if !1 1619_GL_FUNCDECL_SYS (frexpl, long double, 1620 (long double x, int *expptr) _GL_ARG_NONNULL ((2))); 1621# endif 1622# if 1 1623_GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr)); 1624# endif 1625#endif 1626#if 1 && !(0 && !1) 1627_GL_CXXALIASWARN (frexpl); 1628#endif 1629#if !1 && defined GNULIB_POSIXCHECK 1630# undef frexpl 1631# if HAVE_RAW_DECL_FREXPL 1632_GL_WARN_ON_USE (frexpl, "frexpl is unportable - " 1633 "use gnulib module frexpl for portability"); 1634# endif 1635#endif 1636 1637 1638/* Return sqrt(x^2+y^2). */ 1639#if 0 1640# if 0 1641# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1642# undef hypotf 1643# define hypotf rpl_hypotf 1644# endif 1645_GL_FUNCDECL_RPL (hypotf, float, (float x, float y)); 1646_GL_CXXALIAS_RPL (hypotf, float, (float x, float y)); 1647# else 1648# if !1 1649_GL_FUNCDECL_SYS (hypotf, float, (float x, float y)); 1650# endif 1651_GL_CXXALIAS_SYS (hypotf, float, (float x, float y)); 1652# endif 1653_GL_CXXALIASWARN (hypotf); 1654#elif defined GNULIB_POSIXCHECK 1655# undef hypotf 1656# if HAVE_RAW_DECL_HYPOTF 1657_GL_WARN_ON_USE (hypotf, "hypotf is unportable - " 1658 "use gnulib module hypotf for portability"); 1659# endif 1660#endif 1661 1662/* Return sqrt(x^2+y^2). */ 1663#if 0 1664# if 0 1665# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1666# undef hypot 1667# define hypot rpl_hypot 1668# endif 1669_GL_FUNCDECL_RPL (hypot, double, (double x, double y)); 1670_GL_CXXALIAS_RPL (hypot, double, (double x, double y)); 1671# else 1672_GL_CXXALIAS_SYS (hypot, double, (double x, double y)); 1673# endif 1674# if __GLIBC__ >= 2 1675_GL_CXXALIASWARN (hypot); 1676# endif 1677#elif defined GNULIB_POSIXCHECK 1678# undef hypot 1679# if HAVE_RAW_DECL_HYPOT 1680_GL_WARN_ON_USE (hypotf, "hypot has portability problems - " 1681 "use gnulib module hypot for portability"); 1682# endif 1683#endif 1684 1685/* Return sqrt(x^2+y^2). */ 1686#if 0 1687# if 0 1688# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1689# undef hypotl 1690# define hypotl rpl_hypotl 1691# endif 1692_GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y)); 1693_GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y)); 1694# else 1695# if !1 1696_GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y)); 1697# endif 1698_GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y)); 1699# endif 1700_GL_CXXALIASWARN (hypotl); 1701#elif defined GNULIB_POSIXCHECK 1702# undef hypotl 1703# if HAVE_RAW_DECL_HYPOTL 1704_GL_WARN_ON_USE (hypotl, "hypotl is unportable - " 1705 "use gnulib module hypotl for portability"); 1706# endif 1707#endif 1708 1709 1710#if 0 1711# if 0 1712# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1713# undef ilogbf 1714# define ilogbf rpl_ilogbf 1715# endif 1716_GL_FUNCDECL_RPL (ilogbf, int, (float x)); 1717_GL_CXXALIAS_RPL (ilogbf, int, (float x)); 1718# else 1719# if !1 1720_GL_FUNCDECL_SYS (ilogbf, int, (float x)); 1721# endif 1722_GL_CXXALIAS_SYS (ilogbf, int, (float x)); 1723# endif 1724_GL_CXXALIASWARN (ilogbf); 1725#elif defined GNULIB_POSIXCHECK 1726# undef ilogbf 1727# if HAVE_RAW_DECL_ILOGBF 1728_GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - " 1729 "use gnulib module ilogbf for portability"); 1730# endif 1731#endif 1732 1733#if 0 1734# if 0 1735# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1736# undef ilogb 1737# define ilogb rpl_ilogb 1738# endif 1739_GL_FUNCDECL_RPL (ilogb, int, (double x)); 1740_GL_CXXALIAS_RPL (ilogb, int, (double x)); 1741# else 1742# if !1 1743_GL_FUNCDECL_SYS (ilogb, int, (double x)); 1744# endif 1745_GL_CXXALIAS_SYS (ilogb, int, (double x)); 1746# endif 1747# if __GLIBC__ >= 2 1748_GL_CXXALIASWARN (ilogb); 1749# endif 1750#elif defined GNULIB_POSIXCHECK 1751# undef ilogb 1752# if HAVE_RAW_DECL_ILOGB 1753_GL_WARN_ON_USE (ilogb, "ilogb is unportable - " 1754 "use gnulib module ilogb for portability"); 1755# endif 1756#endif 1757 1758#if 0 1759# if 0 1760# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1761# undef ilogbl 1762# define ilogbl rpl_ilogbl 1763# endif 1764_GL_FUNCDECL_RPL (ilogbl, int, (long double x)); 1765_GL_CXXALIAS_RPL (ilogbl, int, (long double x)); 1766# else 1767# if !1 1768_GL_FUNCDECL_SYS (ilogbl, int, (long double x)); 1769# endif 1770_GL_CXXALIAS_SYS (ilogbl, int, (long double x)); 1771# endif 1772_GL_CXXALIASWARN (ilogbl); 1773#elif defined GNULIB_POSIXCHECK 1774# undef ilogbl 1775# if HAVE_RAW_DECL_ILOGBL 1776_GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " 1777 "use gnulib module ilogbl for portability"); 1778# endif 1779#endif 1780 1781 1782/* Return x * 2^exp. */ 1783#if 0 1784# if !1 1785# undef ldexpf 1786_GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp)); 1787# endif 1788_GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp)); 1789_GL_CXXALIASWARN (ldexpf); 1790#elif defined GNULIB_POSIXCHECK 1791# undef ldexpf 1792# if HAVE_RAW_DECL_LDEXPF 1793_GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " 1794 "use gnulib module ldexpf for portability"); 1795# endif 1796#endif 1797 1798/* Return x * 2^exp. */ 1799#if 0 && 0 1800# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1801# undef ldexpl 1802# define ldexpl rpl_ldexpl 1803# endif 1804_GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp)); 1805_GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp)); 1806#else 1807# if !1 1808_GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp)); 1809# endif 1810# if 0 1811_GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp)); 1812# endif 1813#endif 1814#if 0 1815_GL_CXXALIASWARN (ldexpl); 1816#endif 1817#if !0 && defined GNULIB_POSIXCHECK 1818# undef ldexpl 1819# if HAVE_RAW_DECL_LDEXPL 1820_GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " 1821 "use gnulib module ldexpl for portability"); 1822# endif 1823#endif 1824 1825 1826#if 0 1827# if 0 1828# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1829# undef logf 1830# define logf rpl_logf 1831# endif 1832_GL_FUNCDECL_RPL (logf, float, (float x)); 1833_GL_CXXALIAS_RPL (logf, float, (float x)); 1834# else 1835# if !1 1836# undef logf 1837_GL_FUNCDECL_SYS (logf, float, (float x)); 1838# endif 1839_GL_CXXALIAS_SYS (logf, float, (float x)); 1840# endif 1841_GL_CXXALIASWARN (logf); 1842#elif defined GNULIB_POSIXCHECK 1843# undef logf 1844# if HAVE_RAW_DECL_LOGF 1845_GL_WARN_ON_USE (logf, "logf is unportable - " 1846 "use gnulib module logf for portability"); 1847# endif 1848#endif 1849 1850#if 0 1851# if 0 1852# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1853# undef log 1854# define log rpl_log 1855# endif 1856_GL_FUNCDECL_RPL (log, double, (double x)); 1857_GL_CXXALIAS_RPL (log, double, (double x)); 1858# else 1859_GL_CXXALIAS_SYS (log, double, (double x)); 1860# endif 1861# if __GLIBC__ >= 2 1862_GL_CXXALIASWARN (log); 1863# endif 1864#elif defined GNULIB_POSIXCHECK 1865# undef log 1866# if HAVE_RAW_DECL_LOG 1867_GL_WARN_ON_USE (log, "log has portability problems - " 1868 "use gnulib module log for portability"); 1869# endif 1870#endif 1871 1872#if 0 1873# if 0 1874# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1875# undef logl 1876# define logl rpl_logl 1877# endif 1878_GL_FUNCDECL_RPL (logl, long double, (long double x)); 1879_GL_CXXALIAS_RPL (logl, long double, (long double x)); 1880# else 1881# if !1 || !1 1882# undef logl 1883_GL_FUNCDECL_SYS (logl, long double, (long double x)); 1884# endif 1885_GL_CXXALIAS_SYS (logl, long double, (long double x)); 1886# endif 1887_GL_CXXALIASWARN (logl); 1888#elif defined GNULIB_POSIXCHECK 1889# undef logl 1890# if HAVE_RAW_DECL_LOGL 1891_GL_WARN_ON_USE (logl, "logl is unportable - " 1892 "use gnulib module logl for portability"); 1893# endif 1894#endif 1895 1896 1897#if 0 1898# if 0 1899# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1900# undef log10f 1901# define log10f rpl_log10f 1902# endif 1903_GL_FUNCDECL_RPL (log10f, float, (float x)); 1904_GL_CXXALIAS_RPL (log10f, float, (float x)); 1905# else 1906# if !1 1907# undef log10f 1908_GL_FUNCDECL_SYS (log10f, float, (float x)); 1909# endif 1910_GL_CXXALIAS_SYS (log10f, float, (float x)); 1911# endif 1912_GL_CXXALIASWARN (log10f); 1913#elif defined GNULIB_POSIXCHECK 1914# undef log10f 1915# if HAVE_RAW_DECL_LOG10F 1916_GL_WARN_ON_USE (log10f, "log10f is unportable - " 1917 "use gnulib module log10f for portability"); 1918# endif 1919#endif 1920 1921#if 0 1922# if 0 1923# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1924# undef log10 1925# define log10 rpl_log10 1926# endif 1927_GL_FUNCDECL_RPL (log10, double, (double x)); 1928_GL_CXXALIAS_RPL (log10, double, (double x)); 1929# else 1930_GL_CXXALIAS_SYS (log10, double, (double x)); 1931# endif 1932# if __GLIBC__ >= 2 1933_GL_CXXALIASWARN (log10); 1934# endif 1935#elif defined GNULIB_POSIXCHECK 1936# undef log10 1937# if HAVE_RAW_DECL_LOG10 1938_GL_WARN_ON_USE (log10, "log10 has portability problems - " 1939 "use gnulib module log10 for portability"); 1940# endif 1941#endif 1942 1943#if 0 1944# if 0 1945# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1946# undef log10l 1947# define log10l rpl_log10l 1948# endif 1949_GL_FUNCDECL_RPL (log10l, long double, (long double x)); 1950_GL_CXXALIAS_RPL (log10l, long double, (long double x)); 1951# else 1952# if !1 || !1 1953# undef log10l 1954_GL_FUNCDECL_SYS (log10l, long double, (long double x)); 1955# endif 1956_GL_CXXALIAS_SYS (log10l, long double, (long double x)); 1957# endif 1958_GL_CXXALIASWARN (log10l); 1959#elif defined GNULIB_POSIXCHECK 1960# undef log10l 1961# if HAVE_RAW_DECL_LOG10L 1962_GL_WARN_ON_USE (log10l, "log10l is unportable - " 1963 "use gnulib module log10l for portability"); 1964# endif 1965#endif 1966 1967 1968#if 0 1969# if 0 1970# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1971# undef log1pf 1972# define log1pf rpl_log1pf 1973# endif 1974_GL_FUNCDECL_RPL (log1pf, float, (float x)); 1975_GL_CXXALIAS_RPL (log1pf, float, (float x)); 1976# else 1977# if !1 1978_GL_FUNCDECL_SYS (log1pf, float, (float x)); 1979# endif 1980_GL_CXXALIAS_SYS (log1pf, float, (float x)); 1981# endif 1982_GL_CXXALIASWARN (log1pf); 1983#elif defined GNULIB_POSIXCHECK 1984# undef log1pf 1985# if HAVE_RAW_DECL_LOG1PF 1986_GL_WARN_ON_USE (log1pf, "log1pf is unportable - " 1987 "use gnulib module log1pf for portability"); 1988# endif 1989#endif 1990 1991#if 0 1992# if 0 1993# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1994# undef log1p 1995# define log1p rpl_log1p 1996# endif 1997_GL_FUNCDECL_RPL (log1p, double, (double x)); 1998_GL_CXXALIAS_RPL (log1p, double, (double x)); 1999# else 2000# if !1 2001_GL_FUNCDECL_SYS (log1p, double, (double x)); 2002# endif 2003_GL_CXXALIAS_SYS (log1p, double, (double x)); 2004# endif 2005# if __GLIBC__ >= 2 2006_GL_CXXALIASWARN (log1p); 2007# endif 2008#elif defined GNULIB_POSIXCHECK 2009# undef log1p 2010# if HAVE_RAW_DECL_LOG1P 2011_GL_WARN_ON_USE (log1p, "log1p has portability problems - " 2012 "use gnulib module log1p for portability"); 2013# endif 2014#endif 2015 2016#if 0 2017# if 0 2018# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2019# undef log1pl 2020# define log1pl rpl_log1pl 2021# endif 2022_GL_FUNCDECL_RPL (log1pl, long double, (long double x)); 2023_GL_CXXALIAS_RPL (log1pl, long double, (long double x)); 2024# else 2025# if !1 2026_GL_FUNCDECL_SYS (log1pl, long double, (long double x)); 2027# endif 2028_GL_CXXALIAS_SYS (log1pl, long double, (long double x)); 2029# endif 2030_GL_CXXALIASWARN (log1pl); 2031#elif defined GNULIB_POSIXCHECK 2032# undef log1pl 2033# if HAVE_RAW_DECL_LOG1PL 2034_GL_WARN_ON_USE (log1pl, "log1pl has portability problems - " 2035 "use gnulib module log1pl for portability"); 2036# endif 2037#endif 2038 2039 2040#if 0 2041# if 0 2042# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2043# undef log2f 2044# define log2f rpl_log2f 2045# endif 2046_GL_FUNCDECL_RPL (log2f, float, (float x)); 2047_GL_CXXALIAS_RPL (log2f, float, (float x)); 2048# else 2049# if !1 2050# undef log2f 2051_GL_FUNCDECL_SYS (log2f, float, (float x)); 2052# endif 2053_GL_CXXALIAS_SYS (log2f, float, (float x)); 2054# endif 2055_GL_CXXALIASWARN (log2f); 2056#elif defined GNULIB_POSIXCHECK 2057# undef log2f 2058# if HAVE_RAW_DECL_LOG2F 2059_GL_WARN_ON_USE (log2f, "log2f is unportable - " 2060 "use gnulib module log2f for portability"); 2061# endif 2062#endif 2063 2064#if 0 2065# if 0 2066# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2067# undef log2 2068# define log2 rpl_log2 2069# endif 2070_GL_FUNCDECL_RPL (log2, double, (double x)); 2071_GL_CXXALIAS_RPL (log2, double, (double x)); 2072# else 2073# if !1 2074# undef log2 2075_GL_FUNCDECL_SYS (log2, double, (double x)); 2076# endif 2077_GL_CXXALIAS_SYS (log2, double, (double x)); 2078# endif 2079# if __GLIBC__ >= 2 2080_GL_CXXALIASWARN (log2); 2081# endif 2082#elif defined GNULIB_POSIXCHECK 2083# undef log2 2084# if HAVE_RAW_DECL_LOG2 2085_GL_WARN_ON_USE (log2, "log2 is unportable - " 2086 "use gnulib module log2 for portability"); 2087# endif 2088#endif 2089 2090#if 0 2091# if 0 2092# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2093# undef log2l 2094# define log2l rpl_log2l 2095# endif 2096_GL_FUNCDECL_RPL (log2l, long double, (long double x)); 2097_GL_CXXALIAS_RPL (log2l, long double, (long double x)); 2098# else 2099# if !1 2100_GL_FUNCDECL_SYS (log2l, long double, (long double x)); 2101# endif 2102_GL_CXXALIAS_SYS (log2l, long double, (long double x)); 2103# endif 2104_GL_CXXALIASWARN (log2l); 2105#elif defined GNULIB_POSIXCHECK 2106# undef log2l 2107# if HAVE_RAW_DECL_LOG2L 2108_GL_WARN_ON_USE (log2l, "log2l is unportable - " 2109 "use gnulib module log2l for portability"); 2110# endif 2111#endif 2112 2113 2114#if 0 2115# if 0 2116# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2117# undef logbf 2118# define logbf rpl_logbf 2119# endif 2120_GL_FUNCDECL_RPL (logbf, float, (float x)); 2121_GL_CXXALIAS_RPL (logbf, float, (float x)); 2122# else 2123# if !1 2124_GL_FUNCDECL_SYS (logbf, float, (float x)); 2125# endif 2126_GL_CXXALIAS_SYS (logbf, float, (float x)); 2127# endif 2128_GL_CXXALIASWARN (logbf); 2129#elif defined GNULIB_POSIXCHECK 2130# undef logbf 2131# if HAVE_RAW_DECL_LOGBF 2132_GL_WARN_ON_USE (logbf, "logbf is unportable - " 2133 "use gnulib module logbf for portability"); 2134# endif 2135#endif 2136 2137#if 0 2138# if 0 2139# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2140# undef logb 2141# define logb rpl_logb 2142# endif 2143_GL_FUNCDECL_RPL (logb, double, (double x)); 2144_GL_CXXALIAS_RPL (logb, double, (double x)); 2145# else 2146# if !1 2147_GL_FUNCDECL_SYS (logb, double, (double x)); 2148# endif 2149_GL_CXXALIAS_SYS (logb, double, (double x)); 2150# endif 2151# if __GLIBC__ >= 2 2152_GL_CXXALIASWARN (logb); 2153# endif 2154#elif defined GNULIB_POSIXCHECK 2155# undef logb 2156# if HAVE_RAW_DECL_LOGB 2157_GL_WARN_ON_USE (logb, "logb is unportable - " 2158 "use gnulib module logb for portability"); 2159# endif 2160#endif 2161 2162#if 0 2163# if 0 2164# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2165# undef logbl 2166# define logbl rpl_logbl 2167# endif 2168_GL_FUNCDECL_RPL (logbl, long double, (long double x)); 2169_GL_CXXALIAS_RPL (logbl, long double, (long double x)); 2170# else 2171# if !1 2172_GL_FUNCDECL_SYS (logbl, long double, (long double x)); 2173# endif 2174_GL_CXXALIAS_SYS (logbl, long double, (long double x)); 2175# endif 2176_GL_CXXALIASWARN (logbl); 2177#elif defined GNULIB_POSIXCHECK 2178# undef logbl 2179# if HAVE_RAW_DECL_LOGBL 2180_GL_WARN_ON_USE (logbl, "logbl is unportable - " 2181 "use gnulib module logbl for portability"); 2182# endif 2183#endif 2184 2185 2186#if 0 2187# if 0 2188# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2189# undef modff 2190# define modff rpl_modff 2191# endif 2192_GL_FUNCDECL_RPL (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); 2193_GL_CXXALIAS_RPL (modff, float, (float x, float *iptr)); 2194# else 2195# if !1 2196# undef modff 2197_GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); 2198# endif 2199_GL_CXXALIAS_SYS (modff, float, (float x, float *iptr)); 2200# endif 2201_GL_CXXALIASWARN (modff); 2202#elif defined GNULIB_POSIXCHECK 2203# undef modff 2204# if HAVE_RAW_DECL_MODFF 2205_GL_WARN_ON_USE (modff, "modff is unportable - " 2206 "use gnulib module modff for portability"); 2207# endif 2208#endif 2209 2210#if 0 2211# if 0 2212# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2213# undef modf 2214# define modf rpl_modf 2215# endif 2216_GL_FUNCDECL_RPL (modf, double, (double x, double *iptr) _GL_ARG_NONNULL ((2))); 2217_GL_CXXALIAS_RPL (modf, double, (double x, double *iptr)); 2218# else 2219_GL_CXXALIAS_SYS (modf, double, (double x, double *iptr)); 2220# endif 2221# if __GLIBC__ >= 2 2222_GL_CXXALIASWARN (modf); 2223# endif 2224#elif defined GNULIB_POSIXCHECK 2225# undef modf 2226# if HAVE_RAW_DECL_MODF 2227_GL_WARN_ON_USE (modf, "modf has portability problems - " 2228 "use gnulib module modf for portability"); 2229# endif 2230#endif 2231 2232#if 0 2233# if 0 2234# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2235# undef modfl 2236# define modfl rpl_modfl 2237# endif 2238_GL_FUNCDECL_RPL (modfl, long double, (long double x, long double *iptr) 2239 _GL_ARG_NONNULL ((2))); 2240_GL_CXXALIAS_RPL (modfl, long double, (long double x, long double *iptr)); 2241# else 2242# if !1 2243# undef modfl 2244_GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr) 2245 _GL_ARG_NONNULL ((2))); 2246# endif 2247_GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr)); 2248# endif 2249_GL_CXXALIASWARN (modfl); 2250#elif defined GNULIB_POSIXCHECK 2251# undef modfl 2252# if HAVE_RAW_DECL_MODFL 2253_GL_WARN_ON_USE (modfl, "modfl is unportable - " 2254 "use gnulib module modfl for portability"); 2255# endif 2256#endif 2257 2258 2259#if 0 2260# if !1 2261# undef powf 2262_GL_FUNCDECL_SYS (powf, float, (float x, float y)); 2263# endif 2264_GL_CXXALIAS_SYS (powf, float, (float x, float y)); 2265_GL_CXXALIASWARN (powf); 2266#elif defined GNULIB_POSIXCHECK 2267# undef powf 2268# if HAVE_RAW_DECL_POWF 2269_GL_WARN_ON_USE (powf, "powf is unportable - " 2270 "use gnulib module powf for portability"); 2271# endif 2272#endif 2273 2274 2275#if 0 2276# if 0 2277# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2278# undef remainderf 2279# define remainderf rpl_remainderf 2280# endif 2281_GL_FUNCDECL_RPL (remainderf, float, (float x, float y)); 2282_GL_CXXALIAS_RPL (remainderf, float, (float x, float y)); 2283# else 2284# if !1 2285_GL_FUNCDECL_SYS (remainderf, float, (float x, float y)); 2286# endif 2287_GL_CXXALIAS_SYS (remainderf, float, (float x, float y)); 2288# endif 2289_GL_CXXALIASWARN (remainderf); 2290#elif defined GNULIB_POSIXCHECK 2291# undef remainderf 2292# if HAVE_RAW_DECL_REMAINDERF 2293_GL_WARN_ON_USE (remainderf, "remainderf is unportable - " 2294 "use gnulib module remainderf for portability"); 2295# endif 2296#endif 2297 2298#if 0 2299# if 0 2300# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2301# undef remainder 2302# define remainder rpl_remainder 2303# endif 2304_GL_FUNCDECL_RPL (remainder, double, (double x, double y)); 2305_GL_CXXALIAS_RPL (remainder, double, (double x, double y)); 2306# else 2307# if !1 || !1 2308_GL_FUNCDECL_SYS (remainder, double, (double x, double y)); 2309# endif 2310_GL_CXXALIAS_SYS (remainder, double, (double x, double y)); 2311# endif 2312# if __GLIBC__ >= 2 2313_GL_CXXALIASWARN (remainder); 2314# endif 2315#elif defined GNULIB_POSIXCHECK 2316# undef remainder 2317# if HAVE_RAW_DECL_REMAINDER 2318_GL_WARN_ON_USE (remainder, "remainder is unportable - " 2319 "use gnulib module remainder for portability"); 2320# endif 2321#endif 2322 2323#if 0 2324# if 0 2325# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2326# undef remainderl 2327# define remainderl rpl_remainderl 2328# endif 2329_GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y)); 2330_GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y)); 2331# else 2332# if !1 2333# undef remainderl 2334# if !(defined __cplusplus && defined _AIX) 2335_GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y)); 2336# endif 2337# endif 2338_GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y)); 2339# endif 2340_GL_CXXALIASWARN (remainderl); 2341#elif defined GNULIB_POSIXCHECK 2342# undef remainderl 2343# if HAVE_RAW_DECL_REMAINDERL 2344_GL_WARN_ON_USE (remainderl, "remainderl is unportable - " 2345 "use gnulib module remainderl for portability"); 2346# endif 2347#endif 2348 2349 2350#if 0 2351# if !1 2352_GL_FUNCDECL_SYS (rintf, float, (float x)); 2353# endif 2354_GL_CXXALIAS_SYS (rintf, float, (float x)); 2355_GL_CXXALIASWARN (rintf); 2356#elif defined GNULIB_POSIXCHECK 2357# undef rintf 2358# if HAVE_RAW_DECL_RINTF 2359_GL_WARN_ON_USE (rintf, "rintf is unportable - " 2360 "use gnulib module rintf for portability"); 2361# endif 2362#endif 2363 2364#if 0 2365# if !1 2366_GL_FUNCDECL_SYS (rint, double, (double x)); 2367# endif 2368_GL_CXXALIAS_SYS (rint, double, (double x)); 2369# if __GLIBC__ >= 2 2370_GL_CXXALIASWARN (rint); 2371# endif 2372#elif defined GNULIB_POSIXCHECK 2373# undef rint 2374# if HAVE_RAW_DECL_RINT 2375_GL_WARN_ON_USE (rint, "rint is unportable - " 2376 "use gnulib module rint for portability"); 2377# endif 2378#endif 2379 2380#if 0 2381# if 0 2382# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2383# undef rintl 2384# define rintl rpl_rintl 2385# endif 2386_GL_FUNCDECL_RPL (rintl, long double, (long double x)); 2387_GL_CXXALIAS_RPL (rintl, long double, (long double x)); 2388# else 2389# if !1 2390_GL_FUNCDECL_SYS (rintl, long double, (long double x)); 2391# endif 2392_GL_CXXALIAS_SYS (rintl, long double, (long double x)); 2393# endif 2394_GL_CXXALIASWARN (rintl); 2395#elif defined GNULIB_POSIXCHECK 2396# undef rintl 2397# if HAVE_RAW_DECL_RINTL 2398_GL_WARN_ON_USE (rintl, "rintl is unportable - " 2399 "use gnulib module rintl for portability"); 2400# endif 2401#endif 2402 2403 2404#if 0 2405# if 0 2406# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2407# undef roundf 2408# define roundf rpl_roundf 2409# endif 2410_GL_FUNCDECL_RPL (roundf, float, (float x)); 2411_GL_CXXALIAS_RPL (roundf, float, (float x)); 2412# else 2413# if !1 2414_GL_FUNCDECL_SYS (roundf, float, (float x)); 2415# endif 2416_GL_CXXALIAS_SYS (roundf, float, (float x)); 2417# endif 2418_GL_CXXALIASWARN (roundf); 2419#elif defined GNULIB_POSIXCHECK 2420# undef roundf 2421# if HAVE_RAW_DECL_ROUNDF 2422_GL_WARN_ON_USE (roundf, "roundf is unportable - " 2423 "use gnulib module roundf for portability"); 2424# endif 2425#endif 2426 2427#if 0 2428# if 0 2429# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2430# undef round 2431# define round rpl_round 2432# endif 2433_GL_FUNCDECL_RPL (round, double, (double x)); 2434_GL_CXXALIAS_RPL (round, double, (double x)); 2435# else 2436# if !1 2437_GL_FUNCDECL_SYS (round, double, (double x)); 2438# endif 2439_GL_CXXALIAS_SYS (round, double, (double x)); 2440# endif 2441# if __GLIBC__ >= 2 2442_GL_CXXALIASWARN (round); 2443# endif 2444#elif defined GNULIB_POSIXCHECK 2445# undef round 2446# if HAVE_RAW_DECL_ROUND 2447_GL_WARN_ON_USE (round, "round is unportable - " 2448 "use gnulib module round for portability"); 2449# endif 2450#endif 2451 2452#if 0 2453# if 0 2454# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2455# undef roundl 2456# define roundl rpl_roundl 2457# endif 2458_GL_FUNCDECL_RPL (roundl, long double, (long double x)); 2459_GL_CXXALIAS_RPL (roundl, long double, (long double x)); 2460# else 2461# if !1 2462# undef roundl 2463# if !(defined __cplusplus && defined _AIX) 2464_GL_FUNCDECL_SYS (roundl, long double, (long double x)); 2465# endif 2466# endif 2467_GL_CXXALIAS_SYS (roundl, long double, (long double x)); 2468# endif 2469_GL_CXXALIASWARN (roundl); 2470#elif defined GNULIB_POSIXCHECK 2471# undef roundl 2472# if HAVE_RAW_DECL_ROUNDL 2473_GL_WARN_ON_USE (roundl, "roundl is unportable - " 2474 "use gnulib module roundl for portability"); 2475# endif 2476#endif 2477 2478 2479#if 0 2480# if 0 2481# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2482# undef sinf 2483# define sinf rpl_sinf 2484# endif 2485_GL_FUNCDECL_RPL (sinf, float, (float x)); 2486_GL_CXXALIAS_RPL (sinf, float, (float x)); 2487# else 2488# if !1 2489 # undef sinf 2490_GL_FUNCDECL_SYS (sinf, float, (float x)); 2491# endif 2492_GL_CXXALIAS_SYS (sinf, float, (float x)); 2493# endif 2494_GL_CXXALIASWARN (sinf); 2495#elif defined GNULIB_POSIXCHECK 2496# undef sinf 2497# if HAVE_RAW_DECL_SINF 2498_GL_WARN_ON_USE (sinf, "sinf is unportable - " 2499 "use gnulib module sinf for portability"); 2500# endif 2501#endif 2502 2503#if 0 2504# if !1 || !1 2505# undef sinl 2506_GL_FUNCDECL_SYS (sinl, long double, (long double x)); 2507# endif 2508_GL_CXXALIAS_SYS (sinl, long double, (long double x)); 2509_GL_CXXALIASWARN (sinl); 2510#elif defined GNULIB_POSIXCHECK 2511# undef sinl 2512# if HAVE_RAW_DECL_SINL 2513_GL_WARN_ON_USE (sinl, "sinl is unportable - " 2514 "use gnulib module sinl for portability"); 2515# endif 2516#endif 2517 2518 2519#if 0 2520# if 0 2521# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2522# undef sinhf 2523# define sinhf rpl_sinhf 2524# endif 2525_GL_FUNCDECL_RPL (sinhf, float, (float x)); 2526_GL_CXXALIAS_RPL (sinhf, float, (float x)); 2527# else 2528# if !1 2529# undef sinhf 2530_GL_FUNCDECL_SYS (sinhf, float, (float x)); 2531# endif 2532_GL_CXXALIAS_SYS (sinhf, float, (float x)); 2533# endif 2534_GL_CXXALIASWARN (sinhf); 2535#elif defined GNULIB_POSIXCHECK 2536# undef sinhf 2537# if HAVE_RAW_DECL_SINHF 2538_GL_WARN_ON_USE (sinhf, "sinhf is unportable - " 2539 "use gnulib module sinhf for portability"); 2540# endif 2541#endif 2542 2543 2544#if 0 2545# if 0 2546# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2547# undef sqrtf 2548# define sqrtf rpl_sqrtf 2549# endif 2550_GL_FUNCDECL_RPL (sqrtf, float, (float x)); 2551_GL_CXXALIAS_RPL (sqrtf, float, (float x)); 2552# else 2553# if !1 2554# undef sqrtf 2555_GL_FUNCDECL_SYS (sqrtf, float, (float x)); 2556# endif 2557_GL_CXXALIAS_SYS (sqrtf, float, (float x)); 2558# endif 2559_GL_CXXALIASWARN (sqrtf); 2560#elif defined GNULIB_POSIXCHECK 2561# undef sqrtf 2562# if HAVE_RAW_DECL_SQRTF 2563_GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - " 2564 "use gnulib module sqrtf for portability"); 2565# endif 2566#endif 2567 2568#if 0 2569# if 0 2570# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2571# undef sqrtl 2572# define sqrtl rpl_sqrtl 2573# endif 2574_GL_FUNCDECL_RPL (sqrtl, long double, (long double x)); 2575_GL_CXXALIAS_RPL (sqrtl, long double, (long double x)); 2576# else 2577# if !1 || !1 2578# undef sqrtl 2579_GL_FUNCDECL_SYS (sqrtl, long double, (long double x)); 2580# endif 2581_GL_CXXALIAS_SYS (sqrtl, long double, (long double x)); 2582# endif 2583_GL_CXXALIASWARN (sqrtl); 2584#elif defined GNULIB_POSIXCHECK 2585# undef sqrtl 2586# if HAVE_RAW_DECL_SQRTL 2587_GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " 2588 "use gnulib module sqrtl for portability"); 2589# endif 2590#endif 2591 2592 2593#if 0 2594# if 0 2595# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2596# undef tanf 2597# define tanf rpl_tanf 2598# endif 2599_GL_FUNCDECL_RPL (tanf, float, (float x)); 2600_GL_CXXALIAS_RPL (tanf, float, (float x)); 2601# else 2602# if !1 2603# undef tanf 2604_GL_FUNCDECL_SYS (tanf, float, (float x)); 2605# endif 2606_GL_CXXALIAS_SYS (tanf, float, (float x)); 2607# endif 2608_GL_CXXALIASWARN (tanf); 2609#elif defined GNULIB_POSIXCHECK 2610# undef tanf 2611# if HAVE_RAW_DECL_TANF 2612_GL_WARN_ON_USE (tanf, "tanf is unportable - " 2613 "use gnulib module tanf for portability"); 2614# endif 2615#endif 2616 2617#if 0 2618# if !1 || !1 2619# undef tanl 2620_GL_FUNCDECL_SYS (tanl, long double, (long double x)); 2621# endif 2622_GL_CXXALIAS_SYS (tanl, long double, (long double x)); 2623_GL_CXXALIASWARN (tanl); 2624#elif defined GNULIB_POSIXCHECK 2625# undef tanl 2626# if HAVE_RAW_DECL_TANL 2627_GL_WARN_ON_USE (tanl, "tanl is unportable - " 2628 "use gnulib module tanl for portability"); 2629# endif 2630#endif 2631 2632 2633#if 0 2634# if 0 2635# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2636# undef tanhf 2637# define tanhf rpl_tanhf 2638# endif 2639_GL_FUNCDECL_RPL (tanhf, float, (float x)); 2640_GL_CXXALIAS_RPL (tanhf, float, (float x)); 2641# else 2642# if !1 2643# undef tanhf 2644_GL_FUNCDECL_SYS (tanhf, float, (float x)); 2645# endif 2646_GL_CXXALIAS_SYS (tanhf, float, (float x)); 2647# endif 2648_GL_CXXALIASWARN (tanhf); 2649#elif defined GNULIB_POSIXCHECK 2650# undef tanhf 2651# if HAVE_RAW_DECL_TANHF 2652_GL_WARN_ON_USE (tanhf, "tanhf is unportable - " 2653 "use gnulib module tanhf for portability"); 2654# endif 2655#endif 2656 2657 2658#if 0 2659# if 0 2660# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2661# undef truncf 2662# define truncf rpl_truncf 2663# endif 2664_GL_FUNCDECL_RPL (truncf, float, (float x)); 2665_GL_CXXALIAS_RPL (truncf, float, (float x)); 2666# else 2667# if !1 2668_GL_FUNCDECL_SYS (truncf, float, (float x)); 2669# endif 2670_GL_CXXALIAS_SYS (truncf, float, (float x)); 2671# endif 2672_GL_CXXALIASWARN (truncf); 2673#elif defined GNULIB_POSIXCHECK 2674# undef truncf 2675# if HAVE_RAW_DECL_TRUNCF 2676_GL_WARN_ON_USE (truncf, "truncf is unportable - " 2677 "use gnulib module truncf for portability"); 2678# endif 2679#endif 2680 2681#if 0 2682# if 0 2683# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2684# undef trunc 2685# define trunc rpl_trunc 2686# endif 2687_GL_FUNCDECL_RPL (trunc, double, (double x)); 2688_GL_CXXALIAS_RPL (trunc, double, (double x)); 2689# else 2690# if !1 2691_GL_FUNCDECL_SYS (trunc, double, (double x)); 2692# endif 2693_GL_CXXALIAS_SYS (trunc, double, (double x)); 2694# endif 2695# if __GLIBC__ >= 2 2696_GL_CXXALIASWARN (trunc); 2697# endif 2698#elif defined GNULIB_POSIXCHECK 2699# undef trunc 2700# if HAVE_RAW_DECL_TRUNC 2701_GL_WARN_ON_USE (trunc, "trunc is unportable - " 2702 "use gnulib module trunc for portability"); 2703# endif 2704#endif 2705 2706#if 0 2707# if 0 2708# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 2709# undef truncl 2710# define truncl rpl_truncl 2711# endif 2712_GL_FUNCDECL_RPL (truncl, long double, (long double x)); 2713_GL_CXXALIAS_RPL (truncl, long double, (long double x)); 2714# else 2715# if !1 2716_GL_FUNCDECL_SYS (truncl, long double, (long double x)); 2717# endif 2718_GL_CXXALIAS_SYS (truncl, long double, (long double x)); 2719# endif 2720_GL_CXXALIASWARN (truncl); 2721#elif defined GNULIB_POSIXCHECK 2722# undef truncl 2723# if HAVE_RAW_DECL_TRUNCL 2724_GL_WARN_ON_USE (truncl, "truncl is unportable - " 2725 "use gnulib module truncl for portability"); 2726# endif 2727#endif 2728 2729 2730/* Definitions of function-like macros come here, after the function 2731 declarations. */ 2732 2733 2734#if 0 2735# if 0 2736_GL_EXTERN_C int gl_isfinitef (float x); 2737_GL_EXTERN_C int gl_isfinited (double x); 2738_GL_EXTERN_C int gl_isfinitel (long double x); 2739# undef isfinite 2740# define isfinite(x) \ 2741 (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \ 2742 sizeof (x) == sizeof (double) ? gl_isfinited (x) : \ 2743 gl_isfinitef (x)) 2744# endif 2745# ifdef __cplusplus 2746# if defined isfinite || defined GNULIB_NAMESPACE 2747_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) 2748# undef isfinite 2749# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) 2750 /* This platform's <cmath> possibly defines isfinite through a set of inline 2751 functions. */ 2752_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool) 2753# define isfinite rpl_isfinite 2754# else 2755_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool) 2756# endif 2757# endif 2758# endif 2759#elif defined GNULIB_POSIXCHECK 2760# if defined isfinite 2761_GL_WARN_REAL_FLOATING_DECL (isfinite); 2762# undef isfinite 2763# define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x) 2764# endif 2765#endif 2766 2767 2768#if 0 2769# if 0 2770_GL_EXTERN_C int gl_isinff (float x); 2771_GL_EXTERN_C int gl_isinfd (double x); 2772_GL_EXTERN_C int gl_isinfl (long double x); 2773# undef isinf 2774# define isinf(x) \ 2775 (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \ 2776 sizeof (x) == sizeof (double) ? gl_isinfd (x) : \ 2777 gl_isinff (x)) 2778# endif 2779# ifdef __cplusplus 2780# if defined isinf || defined GNULIB_NAMESPACE 2781_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) 2782# undef isinf 2783# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) 2784 /* This platform's <cmath> possibly defines isinf through a set of inline 2785 functions. */ 2786_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool) 2787# define isinf rpl_isinf 2788# else 2789_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool) 2790# endif 2791# endif 2792# endif 2793#elif defined GNULIB_POSIXCHECK 2794# if defined isinf 2795_GL_WARN_REAL_FLOATING_DECL (isinf); 2796# undef isinf 2797# define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x) 2798# endif 2799#endif 2800 2801 2802#if 0 2803/* Test for NaN for 'float' numbers. */ 2804# if 1 2805/* The original <math.h> included above provides a declaration of isnan macro 2806 or (older) isnanf function. */ 2807# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) 2808 /* GCC 4.0 and newer provides three built-ins for isnan. */ 2809# undef isnanf 2810# define isnanf(x) __builtin_isnanf ((float)(x)) 2811# elif defined isnan 2812# undef isnanf 2813# define isnanf(x) isnan ((float)(x)) 2814# endif 2815# else 2816/* Test whether X is a NaN. */ 2817# undef isnanf 2818# define isnanf rpl_isnanf 2819_GL_EXTERN_C int isnanf (float x); 2820# endif 2821#endif 2822 2823#if 0 2824/* Test for NaN for 'double' numbers. 2825 This function is a gnulib extension, unlike isnan() which applied only 2826 to 'double' numbers earlier but now is a type-generic macro. */ 2827# if 1 2828/* The original <math.h> included above provides a declaration of isnan 2829 macro. */ 2830# if __GNUC__ >= 4 2831 /* GCC 4.0 and newer provides three built-ins for isnan. */ 2832# undef isnand 2833# define isnand(x) __builtin_isnan ((double)(x)) 2834# else 2835# undef isnand 2836# define isnand(x) isnan ((double)(x)) 2837# endif 2838# else 2839/* Test whether X is a NaN. */ 2840# undef isnand 2841# define isnand rpl_isnand 2842_GL_EXTERN_C int isnand (double x); 2843# endif 2844#endif 2845 2846#if 0 2847/* Test for NaN for 'long double' numbers. */ 2848# if 1 2849/* The original <math.h> included above provides a declaration of isnan 2850 macro or (older) isnanl function. */ 2851# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) 2852 /* GCC 4.0 and newer provides three built-ins for isnan. */ 2853# undef isnanl 2854# define isnanl(x) __builtin_isnanl ((long double)(x)) 2855# elif defined isnan 2856# undef isnanl 2857# define isnanl(x) isnan ((long double)(x)) 2858# endif 2859# else 2860/* Test whether X is a NaN. */ 2861# undef isnanl 2862# define isnanl rpl_isnanl 2863_GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; 2864# endif 2865#endif 2866 2867/* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ 2868#if 0 2869# if 0 2870/* We can't just use the isnanf macro (e.g.) as exposed by 2871 isnanf.h (e.g.) here, because those may end up being macros 2872 that recursively expand back to isnan. So use the gnulib 2873 replacements for them directly. */ 2874# if 1 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) 2875# define gl_isnan_f(x) __builtin_isnanf ((float)(x)) 2876# else 2877_GL_EXTERN_C int rpl_isnanf (float x); 2878# define gl_isnan_f(x) rpl_isnanf (x) 2879# endif 2880# if 1 && __GNUC__ >= 4 2881# define gl_isnan_d(x) __builtin_isnan ((double)(x)) 2882# else 2883_GL_EXTERN_C int rpl_isnand (double x); 2884# define gl_isnan_d(x) rpl_isnand (x) 2885# endif 2886# if 1 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) 2887# define gl_isnan_l(x) __builtin_isnanl ((long double)(x)) 2888# else 2889_GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; 2890# define gl_isnan_l(x) rpl_isnanl (x) 2891# endif 2892# undef isnan 2893# define isnan(x) \ 2894 (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ 2895 sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ 2896 gl_isnan_f (x)) 2897# elif __GNUC__ >= 4 && (!defined __clang__ || (__has_builtin (__builtin_isnanf) && __has_builtin (__builtin_isnanl))) 2898# undef isnan 2899# define isnan(x) \ 2900 (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \ 2901 sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ 2902 __builtin_isnanf ((float)(x))) 2903# endif 2904# ifdef __cplusplus 2905# if defined isnan || defined GNULIB_NAMESPACE 2906_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) 2907# undef isnan 2908# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) 2909 /* This platform's <cmath> possibly defines isnan through a set of inline 2910 functions. */ 2911_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool) 2912# define isnan rpl_isnan 2913# else 2914_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool) 2915# endif 2916# endif 2917# else 2918/* Ensure isnan is a macro. */ 2919# ifndef isnan 2920# define isnan isnan 2921# endif 2922# endif 2923#elif defined GNULIB_POSIXCHECK 2924# if defined isnan 2925_GL_WARN_REAL_FLOATING_DECL (isnan); 2926# undef isnan 2927# define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x) 2928# endif 2929#endif 2930 2931 2932#if 0 2933# if (0 \ 2934 && (!defined __cplusplus || __cplusplus < 201103)) 2935# undef signbit 2936 /* GCC 4.0 and newer provides three built-ins for signbit. */ 2937# define signbit(x) \ 2938 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ 2939 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ 2940 __builtin_signbitf (x)) 2941# endif 2942# if 0 && !GNULIB_defined_signbit 2943# undef signbit 2944_GL_EXTERN_C int gl_signbitf (float arg); 2945_GL_EXTERN_C int gl_signbitd (double arg); 2946_GL_EXTERN_C int gl_signbitl (long double arg); 2947# if __GNUC__ >= 2 && !defined __STRICT_ANSI__ 2948# define _GL_NUM_UINT_WORDS(type) \ 2949 ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) 2950# if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf 2951# define gl_signbitf_OPTIMIZED_MACRO 2952# define gl_signbitf(arg) \ 2953 ({ union { float _value; \ 2954 unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \ 2955 } _m; \ 2956 _m._value = (arg); \ 2957 (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \ 2958 }) 2959# endif 2960# if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd 2961# define gl_signbitd_OPTIMIZED_MACRO 2962# define gl_signbitd(arg) \ 2963 ({ union { double _value; \ 2964 unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \ 2965 } _m; \ 2966 _m._value = (arg); \ 2967 (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \ 2968 }) 2969# endif 2970# if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl 2971# define gl_signbitl_OPTIMIZED_MACRO 2972# define gl_signbitl(arg) \ 2973 ({ union { long double _value; \ 2974 unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \ 2975 } _m; \ 2976 _m._value = (arg); \ 2977 (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \ 2978 }) 2979# endif 2980# endif 2981# define signbit(x) \ 2982 (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ 2983 sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ 2984 gl_signbitf (x)) 2985# define GNULIB_defined_signbit 1 2986# endif 2987# ifdef __cplusplus 2988# if defined signbit || defined GNULIB_NAMESPACE 2989_GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) 2990# undef signbit 2991# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) 2992 /* This platform's <cmath> possibly defines signbit through a set of inline 2993 functions. */ 2994_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool) 2995# define signbit rpl_signbit 2996# else 2997_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool) 2998# endif 2999# endif 3000# endif 3001#elif defined GNULIB_POSIXCHECK 3002# if defined signbit 3003_GL_WARN_REAL_FLOATING_DECL (signbit); 3004# undef signbit 3005# define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x) 3006# endif 3007#endif 3008 3009_GL_INLINE_HEADER_END 3010 3011#endif /* _GL_MATH_H */ 3012#endif /* _GL_MATH_H */ 3013