math.in.h 77 KB

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