math.in.h 76 KB

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