math.h 73 KB

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