math.in.h 76 KB

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