c99_protos.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
  1. /* Declarations of various C99 functions
  2. Copyright (C) 2004-2015 Free Software Foundation, Inc.
  3. This file is part of the GNU Fortran 95 runtime library (libgfortran).
  4. Libgfortran 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, or (at your option)
  7. any later version.
  8. Libgfortran 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. Under Section 7 of GPL version 3, you are granted additional
  13. permissions described in the GCC Runtime Library Exception, version
  14. 3.1, as published by the Free Software Foundation.
  15. You should have received a copy of the GNU General Public License and
  16. a copy of the GCC Runtime Library Exception along with this program;
  17. see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  18. <http://www.gnu.org/licenses/>. */
  19. #ifndef C99_PROTOS_H
  20. #define C99_PROTOS_H 1
  21. /* float variants of libm functions */
  22. #ifndef HAVE_ACOSF
  23. #define HAVE_ACOSF 1
  24. extern float acosf(float);
  25. #endif
  26. #if HAVE_ACOSH && !HAVE_ACOSHF
  27. #define HAVE_ACOSHF 1
  28. extern float acoshf(float);
  29. #endif
  30. #ifndef HAVE_ASINF
  31. #define HAVE_ASINF 1
  32. extern float asinf(float);
  33. #endif
  34. #if HAVE_ASINH && !HAVE_ASINHF
  35. #define HAVE_ASINHF 1
  36. extern float asinhf(float);
  37. #endif
  38. #ifndef HAVE_ATAN2F
  39. #define HAVE_ATAN2F 1
  40. extern float atan2f(float, float);
  41. #endif
  42. #ifndef HAVE_ATANF
  43. #define HAVE_ATANF 1
  44. extern float atanf(float);
  45. #endif
  46. #if HAVE_ATANH && !HAVE_ATANHF
  47. #define HAVE_ATANHF 1
  48. extern float atanhf(float);
  49. #endif
  50. #ifndef HAVE_CEILF
  51. #define HAVE_CEILF 1
  52. extern float ceilf(float);
  53. #endif
  54. #ifndef HAVE_COPYSIGNF
  55. #define HAVE_COPYSIGNF 1
  56. extern float copysignf(float, float);
  57. #endif
  58. #ifndef HAVE_COSF
  59. #define HAVE_COSF 1
  60. extern float cosf(float);
  61. #endif
  62. #ifndef HAVE_COSHF
  63. #define HAVE_COSHF 1
  64. extern float coshf(float);
  65. #endif
  66. #ifndef HAVE_EXPF
  67. #define HAVE_EXPF 1
  68. extern float expf(float);
  69. #endif
  70. #ifndef HAVE_FABSF
  71. #define HAVE_FABSF 1
  72. extern float fabsf(float);
  73. #endif
  74. #ifndef HAVE_FLOORF
  75. #define HAVE_FLOORF 1
  76. extern float floorf(float);
  77. #endif
  78. #ifndef HAVE_FLOORL
  79. #define HAVE_FLOORL 1
  80. extern long double floorl (long double x);
  81. #endif
  82. #ifndef HAVE_FMODF
  83. #define HAVE_FMODF 1
  84. extern float fmodf (float x, float y);
  85. #endif
  86. #ifndef HAVE_FMODL
  87. #define HAVE_FMODL 1
  88. extern long double fmodl (long double x, long double y);
  89. #endif
  90. #ifndef HAVE_FREXPF
  91. #define HAVE_FREXPF 1
  92. extern float frexpf(float, int *);
  93. #endif
  94. #ifndef HAVE_HYPOTF
  95. #define HAVE_HYPOTF 1
  96. extern float hypotf(float, float);
  97. #endif
  98. #ifndef HAVE_LOGF
  99. #define HAVE_LOGF 1
  100. extern float logf(float);
  101. #endif
  102. #ifndef HAVE_LOG10F
  103. #define HAVE_LOG10F 1
  104. extern float log10f(float);
  105. #endif
  106. #ifndef HAVE_SCALBN
  107. #define HAVE_SCALBN 1
  108. extern double scalbn(double, int);
  109. #endif
  110. #ifndef HAVE_SCALBNF
  111. #define HAVE_SCALBNF 1
  112. extern float scalbnf(float, int);
  113. #endif
  114. #ifndef HAVE_SINF
  115. #define HAVE_SINF 1
  116. extern float sinf(float);
  117. #endif
  118. #ifndef HAVE_SINHF
  119. #define HAVE_SINHF 1
  120. extern float sinhf(float);
  121. #endif
  122. #ifndef HAVE_SQRTF
  123. #define HAVE_SQRTF 1
  124. extern float sqrtf(float);
  125. #endif
  126. #ifndef HAVE_TANF
  127. #define HAVE_TANF 1
  128. extern float tanf(float);
  129. #endif
  130. #ifndef HAVE_TANHF
  131. #define HAVE_TANHF 1
  132. extern float tanhf(float);
  133. #endif
  134. #ifndef HAVE_TRUNC
  135. #define HAVE_TRUNC 1
  136. extern double trunc(double);
  137. #endif
  138. #ifndef HAVE_TRUNCF
  139. #define HAVE_TRUNCF 1
  140. extern float truncf(float);
  141. #endif
  142. #ifndef HAVE_NEXTAFTERF
  143. #define HAVE_NEXTAFTERF 1
  144. extern float nextafterf(float, float);
  145. #endif
  146. #ifndef HAVE_POWF
  147. #define HAVE_POWF 1
  148. extern float powf(float, float);
  149. #endif
  150. #ifndef HAVE_ROUND
  151. #define HAVE_ROUND 1
  152. extern double round(double);
  153. #endif
  154. #ifndef HAVE_ROUNDF
  155. #define HAVE_ROUNDF 1
  156. extern float roundf(float);
  157. #endif
  158. #if !defined(HAVE_ROUNDL)
  159. #define HAVE_ROUNDL 1
  160. extern long double roundl(long double);
  161. #endif
  162. #if !defined(HAVE_LROUNDF) && defined(HAVE_ROUNDF)
  163. #define HAVE_LROUNDF 1
  164. long int lroundf (float);
  165. #endif
  166. #if !defined(HAVE_LROUND) && defined(HAVE_ROUND)
  167. #define HAVE_LROUND 1
  168. long int lround (double);
  169. #endif
  170. #if !defined(HAVE_LROUNDL) && defined(HAVE_ROUNDL)
  171. #define HAVE_LROUNDL 1
  172. long int lroundl (long double);
  173. #endif
  174. #if !defined(HAVE_LLROUNDF) && defined(HAVE_ROUNDF)
  175. #define HAVE_LLROUNDF 1
  176. long long int llroundf (float);
  177. #endif
  178. #if !defined(HAVE_LLROUND) && defined(HAVE_ROUND)
  179. #define HAVE_LLROUND 1
  180. long long int llround (double);
  181. #endif
  182. #if !defined(HAVE_LLROUNDL) && defined(HAVE_ROUNDL)
  183. #define HAVE_LLROUNDL 1
  184. long long int llroundl (long double);
  185. #endif
  186. /* Wrappers for systems without the various C99 single precision Bessel
  187. functions. */
  188. #if defined(HAVE_J0) && ! defined(HAVE_J0F)
  189. #define HAVE_J0F 1
  190. extern float j0f (float);
  191. #endif
  192. #if defined(HAVE_J1) && !defined(HAVE_J1F)
  193. #define HAVE_J1F 1
  194. extern float j1f (float);
  195. #endif
  196. #if defined(HAVE_JN) && !defined(HAVE_JNF)
  197. #define HAVE_JNF 1
  198. extern float jnf (int, float);
  199. #endif
  200. #if defined(HAVE_Y0) && !defined(HAVE_Y0F)
  201. #define HAVE_Y0F 1
  202. extern float y0f (float);
  203. #endif
  204. #if defined(HAVE_Y1) && !defined(HAVE_Y1F)
  205. #define HAVE_Y1F 1
  206. extern float y1f (float);
  207. #endif
  208. #if defined(HAVE_YN) && !defined(HAVE_YNF)
  209. #define HAVE_YNF 1
  210. extern float ynf (int, float);
  211. #endif
  212. /* Wrappers for systems without the C99 erff() and erfcf() functions. */
  213. #if defined(HAVE_ERF) && !defined(HAVE_ERFF)
  214. #define HAVE_ERFF 1
  215. extern float erff (float);
  216. #endif
  217. #if defined(HAVE_ERFC) && !defined(HAVE_ERFCF)
  218. #define HAVE_ERFCF 1
  219. extern float erfcf (float);
  220. #endif
  221. /* log10l is needed on all platforms for decimal I/O */
  222. #ifndef HAVE_LOG10L
  223. #define HAVE_LOG10L 1
  224. extern long double log10l(long double);
  225. #endif
  226. /* complex math functions */
  227. #if !defined(HAVE_CABSF)
  228. #define HAVE_CABSF 1
  229. extern float cabsf (float complex);
  230. #endif
  231. #if !defined(HAVE_CABS)
  232. #define HAVE_CABS 1
  233. extern double cabs (double complex);
  234. #endif
  235. #if !defined(HAVE_CABSL) && defined(HAVE_HYPOTL)
  236. #define HAVE_CABSL 1
  237. extern long double cabsl (long double complex);
  238. #endif
  239. #if !defined(HAVE_CARGF)
  240. #define HAVE_CARGF 1
  241. extern float cargf (float complex);
  242. #endif
  243. #if !defined(HAVE_CARG)
  244. #define HAVE_CARG 1
  245. extern double carg (double complex);
  246. #endif
  247. #if !defined(HAVE_CARGL) && defined(HAVE_ATAN2L)
  248. #define HAVE_CARGL 1
  249. extern long double cargl (long double complex);
  250. #endif
  251. #if !defined(HAVE_CEXPF)
  252. #define HAVE_CEXPF 1
  253. extern float complex cexpf (float complex);
  254. #endif
  255. #if !defined(HAVE_CEXP)
  256. #define HAVE_CEXP 1
  257. extern double complex cexp (double complex);
  258. #endif
  259. #if !defined(HAVE_CEXPL) && defined(HAVE_COSL) && defined(HAVE_SINL) && defined(EXPL)
  260. #define HAVE_CEXPL 1
  261. extern long double complex cexpl (long double complex);
  262. #endif
  263. #if !defined(HAVE_CLOGF)
  264. #define HAVE_CLOGF 1
  265. extern float complex clogf (float complex);
  266. #endif
  267. #if !defined(HAVE_CLOG)
  268. #define HAVE_CLOG 1
  269. extern double complex clog (double complex);
  270. #endif
  271. #if !defined(HAVE_CLOGL) && defined(HAVE_LOGL) && defined(HAVE_CABSL) && defined(HAVE_CARGL)
  272. #define HAVE_CLOGL 1
  273. extern long double complex clogl (long double complex);
  274. #endif
  275. #if !defined(HAVE_CLOG10F)
  276. #define HAVE_CLOG10F 1
  277. extern float complex clog10f (float complex);
  278. #endif
  279. #if !defined(HAVE_CLOG10)
  280. #define HAVE_CLOG10 1
  281. extern double complex clog10 (double complex);
  282. #endif
  283. #if !defined(HAVE_CLOG10L) && defined(HAVE_LOG10L) && defined(HAVE_CABSL) && defined(HAVE_CARGL)
  284. #define HAVE_CLOG10L 1
  285. extern long double complex clog10l (long double complex);
  286. #endif
  287. #if !defined(HAVE_CPOWF)
  288. #define HAVE_CPOWF 1
  289. extern float complex cpowf (float complex, float complex);
  290. #endif
  291. #if !defined(HAVE_CPOW)
  292. #define HAVE_CPOW 1
  293. extern double complex cpow (double complex, double complex);
  294. #endif
  295. #if !defined(HAVE_CPOWL) && defined(HAVE_CEXPL) && defined(HAVE_CLOGL)
  296. #define HAVE_CPOWL 1
  297. extern long double complex cpowl (long double complex, long double complex);
  298. #endif
  299. #if !defined(HAVE_CSQRTF)
  300. #define HAVE_CSQRTF 1
  301. extern float complex csqrtf (float complex);
  302. #endif
  303. #if !defined(HAVE_CSQRT)
  304. #define HAVE_CSQRT 1
  305. extern double complex csqrt (double complex);
  306. #endif
  307. #if !defined(HAVE_CSQRTL) && defined(HAVE_COPYSIGNL) && defined(HAVE_SQRTL) && defined(HAVE_FABSL) && defined(HAVE_HYPOTL)
  308. #define HAVE_CSQRTL 1
  309. extern long double complex csqrtl (long double complex);
  310. #endif
  311. #if !defined(HAVE_CSINHF)
  312. #define HAVE_CSINHF 1
  313. extern float complex csinhf (float complex);
  314. #endif
  315. #if !defined(HAVE_CSINH)
  316. #define HAVE_CSINH 1
  317. extern double complex csinh (double complex);
  318. #endif
  319. #if !defined(HAVE_CSINHL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
  320. #define HAVE_CSINHL 1
  321. extern long double complex csinhl (long double complex);
  322. #endif
  323. #if !defined(HAVE_CCOSHF)
  324. #define HAVE_CCOSHF 1
  325. extern float complex ccoshf (float complex);
  326. #endif
  327. #if !defined(HAVE_CCOSH)
  328. #define HAVE_CCOSH 1
  329. extern double complex ccosh (double complex);
  330. #endif
  331. #if !defined(HAVE_CCOSHL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
  332. #define HAVE_CCOSHL 1
  333. extern long double complex ccoshl (long double complex);
  334. #endif
  335. #if !defined(HAVE_CTANHF)
  336. #define HAVE_CTANHF 1
  337. extern float complex ctanhf (float complex);
  338. #endif
  339. #if !defined(HAVE_CTANH)
  340. #define HAVE_CTANH 1
  341. extern double complex ctanh (double complex);
  342. #endif
  343. #if !defined(HAVE_CTANHL) && defined(HAVE_TANL) && defined(HAVE_TANHL)
  344. #define HAVE_CTANHL 1
  345. extern long double complex ctanhl (long double complex);
  346. #endif
  347. #if !defined(HAVE_CSINF)
  348. #define HAVE_CSINF 1
  349. extern float complex csinf (float complex);
  350. #endif
  351. #if !defined(HAVE_CSIN)
  352. #define HAVE_CSIN 1
  353. extern double complex csin (double complex);
  354. #endif
  355. #if !defined(HAVE_CSINL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
  356. #define HAVE_CSINL 1
  357. extern long double complex csinl (long double complex);
  358. #endif
  359. #if !defined(HAVE_CCOSF)
  360. #define HAVE_CCOSF 1
  361. extern float complex ccosf (float complex);
  362. #endif
  363. #if !defined(HAVE_CCOS)
  364. #define HAVE_CCOS 1
  365. extern double complex ccos (double complex);
  366. #endif
  367. #if !defined(HAVE_CCOSL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
  368. #define HAVE_CCOSL 1
  369. extern long double complex ccosl (long double complex);
  370. #endif
  371. #if !defined(HAVE_CTANF)
  372. #define HAVE_CTANF 1
  373. extern float complex ctanf (float complex);
  374. #endif
  375. #if !defined(HAVE_CTAN)
  376. #define HAVE_CTAN 1
  377. extern double complex ctan (double complex);
  378. #endif
  379. #if !defined(HAVE_CTANL) && defined(HAVE_TANL) && defined(HAVE_TANHL)
  380. #define HAVE_CTANL 1
  381. extern long double complex ctanl (long double complex);
  382. #endif
  383. /* Complex ACOS. */
  384. #if !defined(HAVE_CACOSF) && defined(HAVE_CLOGF) && defined(HAVE_CSQRTF)
  385. #define HAVE_CACOSF 1
  386. extern complex float cacosf (complex float z);
  387. #endif
  388. #if !defined(HAVE_CACOS) && defined(HAVE_CLOG) && defined(HAVE_CSQRT)
  389. #define HAVE_CACOS 1
  390. extern complex double cacos (complex double z);
  391. #endif
  392. #if !defined(HAVE_CACOSL) && defined(HAVE_CLOGL) && defined(HAVE_CSQRTL)
  393. #define HAVE_CACOSL 1
  394. extern complex long double cacosl (complex long double z);
  395. #endif
  396. /* Complex ASIN. */
  397. #if !defined(HAVE_CASINF) && defined(HAVE_CLOGF) && defined(HAVE_CSQRTF)
  398. #define HAVE_CASINF 1
  399. extern complex float casinf (complex float z);
  400. #endif
  401. #if !defined(HAVE_CASIN) && defined(HAVE_CLOG) && defined(HAVE_CSQRT)
  402. #define HAVE_CASIN 1
  403. extern complex double casin (complex double z);
  404. #endif
  405. #if !defined(HAVE_CASINL) && defined(HAVE_CLOGL) && defined(HAVE_CSQRTL)
  406. #define HAVE_CASINL 1
  407. extern complex long double casinl (complex long double z);
  408. #endif
  409. /* Complex ATAN. */
  410. #if !defined(HAVE_CATANF) && defined(HAVE_CLOGF)
  411. #define HAVE_CATANF 1
  412. extern complex float catanf (complex float z);
  413. #endif
  414. #if !defined(HAVE_CATAN) && defined(HAVE_CLOG)
  415. #define HAVE_CATAN 1
  416. extern complex double catan (complex double z);
  417. #endif
  418. #if !defined(HAVE_CATANL) && defined(HAVE_CLOGL)
  419. #define HAVE_CATANL 1
  420. extern complex long double catanl (complex long double z);
  421. #endif
  422. /* Complex ASINH. */
  423. #if !defined(HAVE_CASINHF) && defined(HAVE_CLOGF) && defined(HAVE_CSQRTF)
  424. #define HAVE_CASINHF 1
  425. extern complex float casinhf (complex float z);
  426. #endif
  427. #if !defined(HAVE_CASINH) && defined(HAVE_CLOG) && defined(HAVE_CSQRT)
  428. #define HAVE_CASINH 1
  429. extern complex double casinh (complex double z);
  430. #endif
  431. #if !defined(HAVE_CASINHL) && defined(HAVE_CLOGL) && defined(HAVE_CSQRTL)
  432. #define HAVE_CASINHL 1
  433. extern complex long double casinhl (complex long double z);
  434. #endif
  435. /* Complex ACOSH. */
  436. #if !defined(HAVE_CACOSHF) && defined(HAVE_CLOGF) && defined(HAVE_CSQRTF)
  437. #define HAVE_CACOSHF 1
  438. extern complex float cacoshf (complex float z);
  439. #endif
  440. #if !defined(HAVE_CACOSH) && defined(HAVE_CLOG) && defined(HAVE_CSQRT)
  441. #define HAVE_CACOSH 1
  442. extern complex double cacosh (complex double z);
  443. #endif
  444. #if !defined(HAVE_CACOSHL) && defined(HAVE_CLOGL) && defined(HAVE_CSQRTL)
  445. #define HAVE_CACOSHL 1
  446. extern complex long double cacoshl (complex long double z);
  447. #endif
  448. /* Complex ATANH. */
  449. #if !defined(HAVE_CATANHF) && defined(HAVE_CLOGF)
  450. #define HAVE_CATANHF 1
  451. extern complex float catanhf (complex float z);
  452. #endif
  453. #if !defined(HAVE_CATANH) && defined(HAVE_CLOG)
  454. #define HAVE_CATANH 1
  455. extern complex double catanh (complex double z);
  456. #endif
  457. #if !defined(HAVE_CATANHL) && defined(HAVE_CLOGL)
  458. #define HAVE_CATANHL 1
  459. extern complex long double catanhl (complex long double z);
  460. #endif
  461. /* Gamma-related prototypes. */
  462. #if !defined(HAVE_TGAMMA)
  463. #define HAVE_TGAMMA 1
  464. extern double tgamma (double);
  465. #endif
  466. #if !defined(HAVE_LGAMMA)
  467. #define HAVE_LGAMMA 1
  468. extern double lgamma (double);
  469. #endif
  470. #if defined(HAVE_TGAMMA) && !defined(HAVE_TGAMMAF)
  471. #define HAVE_TGAMMAF 1
  472. extern float tgammaf (float);
  473. #endif
  474. #if defined(HAVE_LGAMMA) && !defined(HAVE_LGAMMAF)
  475. #define HAVE_LGAMMAF 1
  476. extern float lgammaf (float);
  477. #endif
  478. #endif /* C99_PROTOS_H */