math.in.h 77 KB

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