]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgfortran/c99_protos.h
MAINTAINERS: Update my email address in WAA section.
[thirdparty/gcc.git] / libgfortran / c99_protos.h
CommitLineData
6e4d9244 1/* Declarations of various C99 functions
36ae8a61 2 Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
6e4d9244
EB
3
4This file is part of the GNU Fortran 95 runtime library (libgfortran).
5
6Libgfortran is free software; you can redistribute it and/or
7modify it under the terms of the GNU Lesser General Public
8License as published by the Free Software Foundation; either
9version 2.1 of the License, or (at your option) any later version.
10
11Libgfortran is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU Lesser General Public License for more details.
15
16You should have received a copy of the GNU Lesser General Public
17License along with libgfortran; see the file COPYING.LIB. If not,
fe2ae685
KC
18write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19Boston, MA 02110-1301, USA. */
6e4d9244 20
57dea9f6
TM
21/* As a special exception, if you link this library with other files,
22 some of which are compiled with GCC, to produce an executable,
23 this library does not by itself cause the resulting executable
24 to be covered by the GNU General Public License.
25 This exception does not however invalidate any other reasons why
26 the executable file might be covered by the GNU General Public License. */
27
6e4d9244
EB
28
29#ifndef C99_PROTOS_H
2cdc88b6 30#define C99_PROTOS_H 1
6e4d9244 31
1409cd0b 32/* float variants of libm functions */
6e4d9244 33#ifndef HAVE_ACOSF
2cdc88b6 34#define HAVE_ACOSF 1
6e4d9244
EB
35extern float acosf(float);
36#endif
37
22ae47e2 38#if HAVE_ACOSH && !HAVE_ACOSHF
2cdc88b6 39#define HAVE_ACOSHF 1
f02d008e
JD
40extern float acoshf(float);
41#endif
42
6e4d9244 43#ifndef HAVE_ASINF
2cdc88b6 44#define HAVE_ASINF 1
6e4d9244
EB
45extern float asinf(float);
46#endif
47
22ae47e2 48#if HAVE_ASINH && !HAVE_ASINHF
2cdc88b6 49#define HAVE_ASINHF 1
f02d008e
JD
50extern float asinhf(float);
51#endif
52
6e4d9244 53#ifndef HAVE_ATAN2F
2cdc88b6 54#define HAVE_ATAN2F 1
6e4d9244
EB
55extern float atan2f(float, float);
56#endif
57
58#ifndef HAVE_ATANF
2cdc88b6 59#define HAVE_ATANF 1
6e4d9244
EB
60extern float atanf(float);
61#endif
62
22ae47e2 63#if HAVE_ATANH && !HAVE_ATANHF
2cdc88b6 64#define HAVE_ATANHF 1
f02d008e
JD
65extern float atanhf(float);
66#endif
67
6e4d9244 68#ifndef HAVE_CEILF
2cdc88b6 69#define HAVE_CEILF 1
6e4d9244
EB
70extern float ceilf(float);
71#endif
72
73#ifndef HAVE_COPYSIGNF
2cdc88b6 74#define HAVE_COPYSIGNF 1
6e4d9244
EB
75extern float copysignf(float, float);
76#endif
77
78#ifndef HAVE_COSF
2cdc88b6 79#define HAVE_COSF 1
6e4d9244
EB
80extern float cosf(float);
81#endif
82
83#ifndef HAVE_COSHF
2cdc88b6 84#define HAVE_COSHF 1
6e4d9244
EB
85extern float coshf(float);
86#endif
87
88#ifndef HAVE_EXPF
2cdc88b6 89#define HAVE_EXPF 1
6e4d9244
EB
90extern float expf(float);
91#endif
92
93#ifndef HAVE_FABSF
2cdc88b6 94#define HAVE_FABSF 1
6e4d9244
EB
95extern float fabsf(float);
96#endif
97
98#ifndef HAVE_FLOORF
2cdc88b6 99#define HAVE_FLOORF 1
6e4d9244
EB
100extern float floorf(float);
101#endif
102
eb647f7d
FXC
103#ifndef HAVE_FLOORL
104#define HAVE_FLOORL 1
105extern long double floorl (long double x);
106#endif
107
108#ifndef HAVE_FMODF
109#define HAVE_FMODF 1
110extern float fmodf (float x, float y);
111#endif
112
113#ifndef HAVE_FMODL
114#define HAVE_FMODL 1
115extern long double fmodl (long double x, long double y);
116#endif
117
6e4d9244 118#ifndef HAVE_FREXPF
2cdc88b6 119#define HAVE_FREXPF 1
6e4d9244
EB
120extern float frexpf(float, int *);
121#endif
122
123#ifndef HAVE_HYPOTF
2cdc88b6 124#define HAVE_HYPOTF 1
6e4d9244
EB
125extern float hypotf(float, float);
126#endif
127
128#ifndef HAVE_LOGF
2cdc88b6 129#define HAVE_LOGF 1
6e4d9244
EB
130extern float logf(float);
131#endif
132
133#ifndef HAVE_LOG10F
2cdc88b6 134#define HAVE_LOG10F 1
6e4d9244
EB
135extern float log10f(float);
136#endif
137
ae973d6a 138#ifndef HAVE_SCALBN
2cdc88b6 139#define HAVE_SCALBN 1
ae973d6a
FXC
140extern double scalbn(double, int);
141#endif
142
6e4d9244 143#ifndef HAVE_SCALBNF
2cdc88b6 144#define HAVE_SCALBNF 1
6e4d9244
EB
145extern float scalbnf(float, int);
146#endif
147
148#ifndef HAVE_SINF
2cdc88b6 149#define HAVE_SINF 1
6e4d9244
EB
150extern float sinf(float);
151#endif
152
153#ifndef HAVE_SINHF
2cdc88b6 154#define HAVE_SINHF 1
6e4d9244
EB
155extern float sinhf(float);
156#endif
157
158#ifndef HAVE_SQRTF
2cdc88b6 159#define HAVE_SQRTF 1
6e4d9244
EB
160extern float sqrtf(float);
161#endif
162
163#ifndef HAVE_TANF
2cdc88b6 164#define HAVE_TANF 1
6e4d9244
EB
165extern float tanf(float);
166#endif
167
168#ifndef HAVE_TANHF
2cdc88b6 169#define HAVE_TANHF 1
6e4d9244
EB
170extern float tanhf(float);
171#endif
172
69a2d125 173#ifndef HAVE_TRUNC
2cdc88b6 174#define HAVE_TRUNC 1
1409cd0b 175extern double trunc(double);
69a2d125
EB
176#endif
177
178#ifndef HAVE_TRUNCF
2cdc88b6 179#define HAVE_TRUNCF 1
1409cd0b 180extern float truncf(float);
69a2d125
EB
181#endif
182
6e4d9244 183#ifndef HAVE_NEXTAFTERF
2cdc88b6 184#define HAVE_NEXTAFTERF 1
6e4d9244
EB
185extern float nextafterf(float, float);
186#endif
187
188#ifndef HAVE_POWF
2cdc88b6 189#define HAVE_POWF 1
6e4d9244
EB
190extern float powf(float, float);
191#endif
192
193#ifndef HAVE_ROUND
2cdc88b6 194#define HAVE_ROUND 1
6e4d9244
EB
195extern double round(double);
196#endif
197
198#ifndef HAVE_ROUNDF
2cdc88b6 199#define HAVE_ROUNDF 1
6e4d9244
EB
200extern float roundf(float);
201#endif
202
c120ef14 203#if !defined(HAVE_ROUNDL)
94f548c2
FXC
204#define HAVE_ROUNDL 1
205extern long double roundl(long double);
206#endif
207
208
209
210#if !defined(HAVE_LROUNDF) && defined(HAVE_ROUNDF)
211#define HAVE_LROUNDF 1
212long int lroundf (float);
213#endif
214
215#if !defined(HAVE_LROUND) && defined(HAVE_ROUND)
216#define HAVE_LROUND 1
217long int lround (double);
218#endif
219
220#if !defined(HAVE_LROUNDL) && defined(HAVE_ROUNDL)
221#define HAVE_LROUNDL 1
222long int lroundl (long double);
223#endif
224
225#if !defined(HAVE_LLROUNDF) && defined(HAVE_ROUNDF)
226#define HAVE_LLROUNDF 1
227long long int llroundf (float);
228#endif
229
230#if !defined(HAVE_LLROUND) && defined(HAVE_ROUND)
231#define HAVE_LLROUND 1
232long long int llround (double);
233#endif
234
235#if !defined(HAVE_LLROUNDL) && defined(HAVE_ROUNDL)
236#define HAVE_LLROUNDL 1
237long long int llroundl (long double);
238#endif
239
7afebb02
FXC
240/* Wrappers for systems without the various C99 single precision Bessel
241 functions. */
242
243#if defined(HAVE_J0) && ! defined(HAVE_J0F)
244#define HAVE_J0F 1
245extern float j0f (float);
246#endif
247
248#if defined(HAVE_J1) && !defined(HAVE_J1F)
249#define HAVE_J1F 1
250extern float j1f (float);
251#endif
252
253#if defined(HAVE_JN) && !defined(HAVE_JNF)
254#define HAVE_JNF 1
255extern float jnf (int, float);
256#endif
257
258#if defined(HAVE_Y0) && !defined(HAVE_Y0F)
259#define HAVE_Y0F 1
260extern float y0f (float);
261#endif
262
263#if defined(HAVE_Y1) && !defined(HAVE_Y1F)
264#define HAVE_Y1F 1
265extern float y1f (float);
266#endif
267
268#if defined(HAVE_YN) && !defined(HAVE_YNF)
269#define HAVE_YNF 1
270extern float ynf (int, float);
271#endif
272
273
274/* Wrappers for systems without the C99 erff() and erfcf() functions. */
275
276#if defined(HAVE_ERF) && !defined(HAVE_ERFF)
277#define HAVE_ERFF 1
278extern float erff (float);
279#endif
280
281#if defined(HAVE_ERFC) && !defined(HAVE_ERFCF)
282#define HAVE_ERFCF 1
283extern float erfcf (float);
284#endif
285
286
1409cd0b
FXC
287
288/* log10l is needed on all platforms for decimal I/O */
32aa3bff 289#ifndef HAVE_LOG10L
2cdc88b6 290#define HAVE_LOG10L 1
32aa3bff
FXC
291extern long double log10l(long double);
292#endif
293
1409cd0b
FXC
294
295/* complex math functions */
296
297#if !defined(HAVE_CABSF)
2cdc88b6 298#define HAVE_CABSF 1
1409cd0b
FXC
299extern float cabsf (float complex);
300#endif
301
302#if !defined(HAVE_CABS)
2cdc88b6 303#define HAVE_CABS 1
1409cd0b
FXC
304extern double cabs (double complex);
305#endif
306
307#if !defined(HAVE_CABSL) && defined(HAVE_HYPOTL)
2cdc88b6 308#define HAVE_CABSL 1
1409cd0b
FXC
309extern long double cabsl (long double complex);
310#endif
311
312
313#if !defined(HAVE_CARGF)
2cdc88b6 314#define HAVE_CARGF 1
1409cd0b
FXC
315extern float cargf (float complex);
316#endif
317
318#if !defined(HAVE_CARG)
2cdc88b6 319#define HAVE_CARG 1
1409cd0b
FXC
320extern double carg (double complex);
321#endif
322
323#if !defined(HAVE_CARGL) && defined(HAVE_ATAN2L)
2cdc88b6 324#define HAVE_CARGL 1
1409cd0b
FXC
325extern long double cargl (long double complex);
326#endif
327
328
329#if !defined(HAVE_CEXPF)
2cdc88b6 330#define HAVE_CEXPF 1
1409cd0b
FXC
331extern float complex cexpf (float complex);
332#endif
333
334#if !defined(HAVE_CEXP)
2cdc88b6 335#define HAVE_CEXP 1
1409cd0b
FXC
336extern double complex cexp (double complex);
337#endif
338
339#if !defined(HAVE_CEXPL) && defined(HAVE_COSL) && defined(HAVE_SINL) && defined(EXPL)
2cdc88b6 340#define HAVE_CEXPL 1
1409cd0b
FXC
341extern long double complex cexpl (long double complex);
342#endif
343
344
345#if !defined(HAVE_CLOGF)
2cdc88b6 346#define HAVE_CLOGF 1
1409cd0b
FXC
347extern float complex clogf (float complex);
348#endif
349
350#if !defined(HAVE_CLOG)
2cdc88b6 351#define HAVE_CLOG 1
1409cd0b
FXC
352extern double complex clog (double complex);
353#endif
354
355#if !defined(HAVE_CLOGL) && defined(HAVE_LOGL) && defined(HAVE_CABSL) && defined(HAVE_CARGL)
2cdc88b6 356#define HAVE_CLOGL 1
1409cd0b
FXC
357extern long double complex clogl (long double complex);
358#endif
359
360
361#if !defined(HAVE_CLOG10F)
2cdc88b6 362#define HAVE_CLOG10F 1
1409cd0b
FXC
363extern float complex clog10f (float complex);
364#endif
365
366#if !defined(HAVE_CLOG10)
2cdc88b6 367#define HAVE_CLOG10 1
1409cd0b
FXC
368extern double complex clog10 (double complex);
369#endif
370
371#if !defined(HAVE_CLOG10L) && defined(HAVE_LOG10L) && defined(HAVE_CABSL) && defined(HAVE_CARGL)
2cdc88b6 372#define HAVE_CLOG10L 1
1409cd0b
FXC
373extern long double complex clog10l (long double complex);
374#endif
375
376
377#if !defined(HAVE_CPOWF)
2cdc88b6 378#define HAVE_CPOWF 1
1409cd0b
FXC
379extern float complex cpowf (float complex, float complex);
380#endif
381
382#if !defined(HAVE_CPOW)
2cdc88b6 383#define HAVE_CPOW 1
1409cd0b
FXC
384extern double complex cpow (double complex, double complex);
385#endif
386
387#if !defined(HAVE_CPOWL) && defined(HAVE_CEXPL) && defined(HAVE_CLOGL)
2cdc88b6 388#define HAVE_CPOWL 1
1409cd0b
FXC
389extern long double complex cpowl (long double complex, long double complex);
390#endif
391
392
393#if !defined(HAVE_CSQRTF)
2cdc88b6 394#define HAVE_CSQRTF 1
1409cd0b
FXC
395extern float complex csqrtf (float complex);
396#endif
397
398#if !defined(HAVE_CSQRT)
2cdc88b6 399#define HAVE_CSQRT 1
1409cd0b
FXC
400extern double complex csqrt (double complex);
401#endif
402
403#if !defined(HAVE_CSQRTL) && defined(HAVE_COPYSIGNL) && defined(HAVE_SQRTL) && defined(HAVE_FABSL) && defined(HAVE_HYPOTL)
2cdc88b6 404#define HAVE_CSQRTL 1
1409cd0b
FXC
405extern long double complex csqrtl (long double complex);
406#endif
407
408
409#if !defined(HAVE_CSINHF)
2cdc88b6 410#define HAVE_CSINHF 1
1409cd0b
FXC
411extern float complex csinhf (float complex);
412#endif
413
414#if !defined(HAVE_CSINH)
2cdc88b6 415#define HAVE_CSINH 1
1409cd0b
FXC
416extern double complex csinh (double complex);
417#endif
418
419#if !defined(HAVE_CSINHL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
2cdc88b6 420#define HAVE_CSINHL 1
1409cd0b
FXC
421extern long double complex csinhl (long double complex);
422#endif
423
424
425#if !defined(HAVE_CCOSHF)
2cdc88b6 426#define HAVE_CCOSHF 1
1409cd0b
FXC
427extern float complex ccoshf (float complex);
428#endif
429
430#if !defined(HAVE_CCOSH)
2cdc88b6 431#define HAVE_CCOSH 1
1409cd0b
FXC
432extern double complex ccosh (double complex);
433#endif
434
435#if !defined(HAVE_CCOSHL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
2cdc88b6 436#define HAVE_CCOSHL 1
1409cd0b
FXC
437extern long double complex ccoshl (long double complex);
438#endif
439
440
441#if !defined(HAVE_CTANHF)
2cdc88b6 442#define HAVE_CTANHF 1
1409cd0b
FXC
443extern float complex ctanhf (float complex);
444#endif
445
446#if !defined(HAVE_CTANH)
2cdc88b6 447#define HAVE_CTANH 1
1409cd0b
FXC
448extern double complex ctanh (double complex);
449#endif
450
451#if !defined(HAVE_CTANHL) && defined(HAVE_TANL) && defined(HAVE_TANHL)
2cdc88b6 452#define HAVE_CTANHL 1
1409cd0b
FXC
453extern long double complex ctanhl (long double complex);
454#endif
455
456
457#if !defined(HAVE_CSINF)
2cdc88b6 458#define HAVE_CSINF 1
1409cd0b
FXC
459extern float complex csinf (float complex);
460#endif
461
462#if !defined(HAVE_CSIN)
2cdc88b6 463#define HAVE_CSIN 1
1409cd0b
FXC
464extern double complex csin (double complex);
465#endif
466
467#if !defined(HAVE_CSINL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
2cdc88b6 468#define HAVE_CSINL 1
1409cd0b
FXC
469extern long double complex csinl (long double complex);
470#endif
471
472
473#if !defined(HAVE_CCOSF)
2cdc88b6 474#define HAVE_CCOSF 1
1409cd0b
FXC
475extern float complex ccosf (float complex);
476#endif
477
478#if !defined(HAVE_CCOS)
2cdc88b6 479#define HAVE_CCOS 1
1409cd0b
FXC
480extern double complex ccos (double complex);
481#endif
482
483#if !defined(HAVE_CCOSL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
2cdc88b6 484#define HAVE_CCOSL 1
1409cd0b
FXC
485extern long double complex ccosl (long double complex);
486#endif
487
488
489#if !defined(HAVE_CTANF)
2cdc88b6 490#define HAVE_CTANF 1
1409cd0b
FXC
491extern float complex ctanf (float complex);
492#endif
493
494#if !defined(HAVE_CTAN)
2cdc88b6 495#define HAVE_CTAN 1
1409cd0b
FXC
496extern double complex ctan (double complex);
497#endif
498
499#if !defined(HAVE_CTANL) && defined(HAVE_TANL) && defined(HAVE_TANHL)
2cdc88b6 500#define HAVE_CTANL 1
1409cd0b
FXC
501extern long double complex ctanl (long double complex);
502#endif
503
504
fb0a0e15
FXC
505/* Gamma-related prototypes. */
506#if !defined(HAVE_TGAMMA)
507#define HAVE_TGAMMA 1
508extern double tgamma (double);
509#endif
510
511#if !defined(HAVE_LGAMMA)
512#define HAVE_LGAMMA 1
513extern double lgamma (double);
514#endif
515
516#if defined(HAVE_TGAMMA) && !defined(HAVE_TGAMMAF)
517#define HAVE_TGAMMAF 1
518extern float tgammaf (float);
519#endif
520
521#if defined(HAVE_LGAMMA) && !defined(HAVE_LGAMMAF)
522#define HAVE_LGAMMAF 1
523extern float lgammaf (float);
524#endif
525
526
6e4d9244
EB
527#endif /* C99_PROTOS_H */
528