]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgfortran/c99_protos.h
Update copyright years.
[thirdparty/gcc.git] / libgfortran / c99_protos.h
CommitLineData
6e4d9244 1/* Declarations of various C99 functions
a5544970 2 Copyright (C) 2004-2019 Free Software Foundation, Inc.
6e4d9244
EB
3
4This file is part of the GNU Fortran 95 runtime library (libgfortran).
5
748086b7
JJ
6Libgfortran is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 3, or (at your option)
9any later version.
6e4d9244
EB
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
748086b7 14GNU General Public License for more details.
6e4d9244 15
748086b7
JJ
16Under Section 7 of GPL version 3, you are granted additional
17permissions described in the GCC Runtime Library Exception, version
183.1, as published by the Free Software Foundation.
57dea9f6 19
748086b7
JJ
20You should have received a copy of the GNU General Public License and
21a copy of the GCC Runtime Library Exception along with this program;
22see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23<http://www.gnu.org/licenses/>. */
6e4d9244
EB
24
25#ifndef C99_PROTOS_H
2cdc88b6 26#define C99_PROTOS_H 1
6e4d9244 27
1409cd0b 28/* float variants of libm functions */
6e4d9244 29#ifndef HAVE_ACOSF
2cdc88b6 30#define HAVE_ACOSF 1
6e4d9244
EB
31extern float acosf(float);
32#endif
33
22ae47e2 34#if HAVE_ACOSH && !HAVE_ACOSHF
2cdc88b6 35#define HAVE_ACOSHF 1
f02d008e
JD
36extern float acoshf(float);
37#endif
38
6e4d9244 39#ifndef HAVE_ASINF
2cdc88b6 40#define HAVE_ASINF 1
6e4d9244
EB
41extern float asinf(float);
42#endif
43
22ae47e2 44#if HAVE_ASINH && !HAVE_ASINHF
2cdc88b6 45#define HAVE_ASINHF 1
f02d008e
JD
46extern float asinhf(float);
47#endif
48
6e4d9244 49#ifndef HAVE_ATAN2F
2cdc88b6 50#define HAVE_ATAN2F 1
6e4d9244
EB
51extern float atan2f(float, float);
52#endif
53
54#ifndef HAVE_ATANF
2cdc88b6 55#define HAVE_ATANF 1
6e4d9244
EB
56extern float atanf(float);
57#endif
58
22ae47e2 59#if HAVE_ATANH && !HAVE_ATANHF
2cdc88b6 60#define HAVE_ATANHF 1
f02d008e
JD
61extern float atanhf(float);
62#endif
63
6e4d9244 64#ifndef HAVE_CEILF
2cdc88b6 65#define HAVE_CEILF 1
6e4d9244
EB
66extern float ceilf(float);
67#endif
68
69#ifndef HAVE_COPYSIGNF
2cdc88b6 70#define HAVE_COPYSIGNF 1
6e4d9244
EB
71extern float copysignf(float, float);
72#endif
73
74#ifndef HAVE_COSF
2cdc88b6 75#define HAVE_COSF 1
6e4d9244
EB
76extern float cosf(float);
77#endif
78
79#ifndef HAVE_COSHF
2cdc88b6 80#define HAVE_COSHF 1
6e4d9244
EB
81extern float coshf(float);
82#endif
83
84#ifndef HAVE_EXPF
2cdc88b6 85#define HAVE_EXPF 1
6e4d9244
EB
86extern float expf(float);
87#endif
88
89#ifndef HAVE_FABSF
2cdc88b6 90#define HAVE_FABSF 1
6e4d9244
EB
91extern float fabsf(float);
92#endif
93
94#ifndef HAVE_FLOORF
2cdc88b6 95#define HAVE_FLOORF 1
6e4d9244
EB
96extern float floorf(float);
97#endif
98
eb647f7d
FXC
99#ifndef HAVE_FLOORL
100#define HAVE_FLOORL 1
101extern long double floorl (long double x);
102#endif
103
104#ifndef HAVE_FMODF
105#define HAVE_FMODF 1
106extern float fmodf (float x, float y);
107#endif
108
109#ifndef HAVE_FMODL
110#define HAVE_FMODL 1
111extern long double fmodl (long double x, long double y);
112#endif
113
6e4d9244 114#ifndef HAVE_FREXPF
2cdc88b6 115#define HAVE_FREXPF 1
6e4d9244
EB
116extern float frexpf(float, int *);
117#endif
118
119#ifndef HAVE_HYPOTF
2cdc88b6 120#define HAVE_HYPOTF 1
6e4d9244
EB
121extern float hypotf(float, float);
122#endif
123
124#ifndef HAVE_LOGF
2cdc88b6 125#define HAVE_LOGF 1
6e4d9244
EB
126extern float logf(float);
127#endif
128
129#ifndef HAVE_LOG10F
2cdc88b6 130#define HAVE_LOG10F 1
6e4d9244
EB
131extern float log10f(float);
132#endif
133
ae973d6a 134#ifndef HAVE_SCALBN
2cdc88b6 135#define HAVE_SCALBN 1
ae973d6a
FXC
136extern double scalbn(double, int);
137#endif
138
6e4d9244 139#ifndef HAVE_SCALBNF
2cdc88b6 140#define HAVE_SCALBNF 1
6e4d9244
EB
141extern float scalbnf(float, int);
142#endif
143
144#ifndef HAVE_SINF
2cdc88b6 145#define HAVE_SINF 1
6e4d9244
EB
146extern float sinf(float);
147#endif
148
149#ifndef HAVE_SINHF
2cdc88b6 150#define HAVE_SINHF 1
6e4d9244
EB
151extern float sinhf(float);
152#endif
153
154#ifndef HAVE_SQRTF
2cdc88b6 155#define HAVE_SQRTF 1
6e4d9244
EB
156extern float sqrtf(float);
157#endif
158
159#ifndef HAVE_TANF
2cdc88b6 160#define HAVE_TANF 1
6e4d9244
EB
161extern float tanf(float);
162#endif
163
164#ifndef HAVE_TANHF
2cdc88b6 165#define HAVE_TANHF 1
6e4d9244
EB
166extern float tanhf(float);
167#endif
168
69a2d125 169#ifndef HAVE_TRUNC
2cdc88b6 170#define HAVE_TRUNC 1
1409cd0b 171extern double trunc(double);
69a2d125
EB
172#endif
173
174#ifndef HAVE_TRUNCF
2cdc88b6 175#define HAVE_TRUNCF 1
1409cd0b 176extern float truncf(float);
69a2d125
EB
177#endif
178
6e4d9244 179#ifndef HAVE_NEXTAFTERF
2cdc88b6 180#define HAVE_NEXTAFTERF 1
6e4d9244
EB
181extern float nextafterf(float, float);
182#endif
183
184#ifndef HAVE_POWF
2cdc88b6 185#define HAVE_POWF 1
6e4d9244
EB
186extern float powf(float, float);
187#endif
188
189#ifndef HAVE_ROUND
2cdc88b6 190#define HAVE_ROUND 1
6e4d9244
EB
191extern double round(double);
192#endif
193
194#ifndef HAVE_ROUNDF
2cdc88b6 195#define HAVE_ROUNDF 1
6e4d9244
EB
196extern float roundf(float);
197#endif
198
c120ef14 199#if !defined(HAVE_ROUNDL)
94f548c2
FXC
200#define HAVE_ROUNDL 1
201extern long double roundl(long double);
202#endif
203
204
205
206#if !defined(HAVE_LROUNDF) && defined(HAVE_ROUNDF)
207#define HAVE_LROUNDF 1
208long int lroundf (float);
209#endif
210
211#if !defined(HAVE_LROUND) && defined(HAVE_ROUND)
212#define HAVE_LROUND 1
213long int lround (double);
214#endif
215
216#if !defined(HAVE_LROUNDL) && defined(HAVE_ROUNDL)
217#define HAVE_LROUNDL 1
218long int lroundl (long double);
219#endif
220
221#if !defined(HAVE_LLROUNDF) && defined(HAVE_ROUNDF)
222#define HAVE_LLROUNDF 1
223long long int llroundf (float);
224#endif
225
226#if !defined(HAVE_LLROUND) && defined(HAVE_ROUND)
227#define HAVE_LLROUND 1
228long long int llround (double);
229#endif
230
231#if !defined(HAVE_LLROUNDL) && defined(HAVE_ROUNDL)
232#define HAVE_LLROUNDL 1
233long long int llroundl (long double);
234#endif
235
7afebb02
FXC
236/* Wrappers for systems without the various C99 single precision Bessel
237 functions. */
238
239#if defined(HAVE_J0) && ! defined(HAVE_J0F)
240#define HAVE_J0F 1
241extern float j0f (float);
242#endif
243
244#if defined(HAVE_J1) && !defined(HAVE_J1F)
245#define HAVE_J1F 1
246extern float j1f (float);
247#endif
248
249#if defined(HAVE_JN) && !defined(HAVE_JNF)
250#define HAVE_JNF 1
251extern float jnf (int, float);
252#endif
253
254#if defined(HAVE_Y0) && !defined(HAVE_Y0F)
255#define HAVE_Y0F 1
256extern float y0f (float);
257#endif
258
259#if defined(HAVE_Y1) && !defined(HAVE_Y1F)
260#define HAVE_Y1F 1
261extern float y1f (float);
262#endif
263
264#if defined(HAVE_YN) && !defined(HAVE_YNF)
265#define HAVE_YNF 1
266extern float ynf (int, float);
267#endif
268
269
270/* Wrappers for systems without the C99 erff() and erfcf() functions. */
271
272#if defined(HAVE_ERF) && !defined(HAVE_ERFF)
273#define HAVE_ERFF 1
274extern float erff (float);
275#endif
276
277#if defined(HAVE_ERFC) && !defined(HAVE_ERFCF)
278#define HAVE_ERFCF 1
279extern float erfcf (float);
280#endif
281
282
1409cd0b
FXC
283
284/* log10l is needed on all platforms for decimal I/O */
32aa3bff 285#ifndef HAVE_LOG10L
2cdc88b6 286#define HAVE_LOG10L 1
32aa3bff
FXC
287extern long double log10l(long double);
288#endif
289
1409cd0b
FXC
290
291/* complex math functions */
292
293#if !defined(HAVE_CABSF)
2cdc88b6 294#define HAVE_CABSF 1
1409cd0b
FXC
295extern float cabsf (float complex);
296#endif
297
298#if !defined(HAVE_CABS)
2cdc88b6 299#define HAVE_CABS 1
1409cd0b
FXC
300extern double cabs (double complex);
301#endif
302
303#if !defined(HAVE_CABSL) && defined(HAVE_HYPOTL)
2cdc88b6 304#define HAVE_CABSL 1
1409cd0b
FXC
305extern long double cabsl (long double complex);
306#endif
307
308
309#if !defined(HAVE_CARGF)
2cdc88b6 310#define HAVE_CARGF 1
1409cd0b
FXC
311extern float cargf (float complex);
312#endif
313
314#if !defined(HAVE_CARG)
2cdc88b6 315#define HAVE_CARG 1
1409cd0b
FXC
316extern double carg (double complex);
317#endif
318
319#if !defined(HAVE_CARGL) && defined(HAVE_ATAN2L)
2cdc88b6 320#define HAVE_CARGL 1
1409cd0b
FXC
321extern long double cargl (long double complex);
322#endif
323
324
325#if !defined(HAVE_CEXPF)
2cdc88b6 326#define HAVE_CEXPF 1
1409cd0b
FXC
327extern float complex cexpf (float complex);
328#endif
329
330#if !defined(HAVE_CEXP)
2cdc88b6 331#define HAVE_CEXP 1
1409cd0b
FXC
332extern double complex cexp (double complex);
333#endif
334
0751254a 335#if !defined(HAVE_CEXPL) && defined(HAVE_COSL) && defined(HAVE_SINL) && defined(HAVE_EXPL)
2cdc88b6 336#define HAVE_CEXPL 1
1409cd0b
FXC
337extern long double complex cexpl (long double complex);
338#endif
339
340
341#if !defined(HAVE_CLOGF)
2cdc88b6 342#define HAVE_CLOGF 1
1409cd0b
FXC
343extern float complex clogf (float complex);
344#endif
345
346#if !defined(HAVE_CLOG)
2cdc88b6 347#define HAVE_CLOG 1
1409cd0b
FXC
348extern double complex clog (double complex);
349#endif
350
351#if !defined(HAVE_CLOGL) && defined(HAVE_LOGL) && defined(HAVE_CABSL) && defined(HAVE_CARGL)
2cdc88b6 352#define HAVE_CLOGL 1
1409cd0b
FXC
353extern long double complex clogl (long double complex);
354#endif
355
356
357#if !defined(HAVE_CLOG10F)
2cdc88b6 358#define HAVE_CLOG10F 1
1409cd0b
FXC
359extern float complex clog10f (float complex);
360#endif
361
362#if !defined(HAVE_CLOG10)
2cdc88b6 363#define HAVE_CLOG10 1
1409cd0b
FXC
364extern double complex clog10 (double complex);
365#endif
366
367#if !defined(HAVE_CLOG10L) && defined(HAVE_LOG10L) && defined(HAVE_CABSL) && defined(HAVE_CARGL)
2cdc88b6 368#define HAVE_CLOG10L 1
1409cd0b
FXC
369extern long double complex clog10l (long double complex);
370#endif
371
372
373#if !defined(HAVE_CPOWF)
2cdc88b6 374#define HAVE_CPOWF 1
1409cd0b
FXC
375extern float complex cpowf (float complex, float complex);
376#endif
377
378#if !defined(HAVE_CPOW)
2cdc88b6 379#define HAVE_CPOW 1
1409cd0b
FXC
380extern double complex cpow (double complex, double complex);
381#endif
382
383#if !defined(HAVE_CPOWL) && defined(HAVE_CEXPL) && defined(HAVE_CLOGL)
2cdc88b6 384#define HAVE_CPOWL 1
1409cd0b
FXC
385extern long double complex cpowl (long double complex, long double complex);
386#endif
387
388
389#if !defined(HAVE_CSQRTF)
2cdc88b6 390#define HAVE_CSQRTF 1
1409cd0b
FXC
391extern float complex csqrtf (float complex);
392#endif
393
394#if !defined(HAVE_CSQRT)
2cdc88b6 395#define HAVE_CSQRT 1
1409cd0b
FXC
396extern double complex csqrt (double complex);
397#endif
398
399#if !defined(HAVE_CSQRTL) && defined(HAVE_COPYSIGNL) && defined(HAVE_SQRTL) && defined(HAVE_FABSL) && defined(HAVE_HYPOTL)
2cdc88b6 400#define HAVE_CSQRTL 1
1409cd0b
FXC
401extern long double complex csqrtl (long double complex);
402#endif
403
404
405#if !defined(HAVE_CSINHF)
2cdc88b6 406#define HAVE_CSINHF 1
1409cd0b
FXC
407extern float complex csinhf (float complex);
408#endif
409
410#if !defined(HAVE_CSINH)
2cdc88b6 411#define HAVE_CSINH 1
1409cd0b
FXC
412extern double complex csinh (double complex);
413#endif
414
415#if !defined(HAVE_CSINHL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
2cdc88b6 416#define HAVE_CSINHL 1
1409cd0b
FXC
417extern long double complex csinhl (long double complex);
418#endif
419
420
421#if !defined(HAVE_CCOSHF)
2cdc88b6 422#define HAVE_CCOSHF 1
1409cd0b
FXC
423extern float complex ccoshf (float complex);
424#endif
425
426#if !defined(HAVE_CCOSH)
2cdc88b6 427#define HAVE_CCOSH 1
1409cd0b
FXC
428extern double complex ccosh (double complex);
429#endif
430
431#if !defined(HAVE_CCOSHL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
2cdc88b6 432#define HAVE_CCOSHL 1
1409cd0b
FXC
433extern long double complex ccoshl (long double complex);
434#endif
435
436
437#if !defined(HAVE_CTANHF)
2cdc88b6 438#define HAVE_CTANHF 1
1409cd0b
FXC
439extern float complex ctanhf (float complex);
440#endif
441
442#if !defined(HAVE_CTANH)
2cdc88b6 443#define HAVE_CTANH 1
1409cd0b
FXC
444extern double complex ctanh (double complex);
445#endif
446
447#if !defined(HAVE_CTANHL) && defined(HAVE_TANL) && defined(HAVE_TANHL)
2cdc88b6 448#define HAVE_CTANHL 1
1409cd0b
FXC
449extern long double complex ctanhl (long double complex);
450#endif
451
452
453#if !defined(HAVE_CSINF)
2cdc88b6 454#define HAVE_CSINF 1
1409cd0b
FXC
455extern float complex csinf (float complex);
456#endif
457
458#if !defined(HAVE_CSIN)
2cdc88b6 459#define HAVE_CSIN 1
1409cd0b
FXC
460extern double complex csin (double complex);
461#endif
462
463#if !defined(HAVE_CSINL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
2cdc88b6 464#define HAVE_CSINL 1
1409cd0b
FXC
465extern long double complex csinl (long double complex);
466#endif
467
468
469#if !defined(HAVE_CCOSF)
2cdc88b6 470#define HAVE_CCOSF 1
1409cd0b
FXC
471extern float complex ccosf (float complex);
472#endif
473
474#if !defined(HAVE_CCOS)
2cdc88b6 475#define HAVE_CCOS 1
1409cd0b
FXC
476extern double complex ccos (double complex);
477#endif
478
479#if !defined(HAVE_CCOSL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
2cdc88b6 480#define HAVE_CCOSL 1
1409cd0b
FXC
481extern long double complex ccosl (long double complex);
482#endif
483
484
485#if !defined(HAVE_CTANF)
2cdc88b6 486#define HAVE_CTANF 1
1409cd0b
FXC
487extern float complex ctanf (float complex);
488#endif
489
490#if !defined(HAVE_CTAN)
2cdc88b6 491#define HAVE_CTAN 1
1409cd0b
FXC
492extern double complex ctan (double complex);
493#endif
494
495#if !defined(HAVE_CTANL) && defined(HAVE_TANL) && defined(HAVE_TANHL)
2cdc88b6 496#define HAVE_CTANL 1
1409cd0b
FXC
497extern long double complex ctanl (long double complex);
498#endif
499
500
504ed63a
TB
501/* Complex ACOS. */
502
503#if !defined(HAVE_CACOSF) && defined(HAVE_CLOGF) && defined(HAVE_CSQRTF)
504#define HAVE_CACOSF 1
505extern complex float cacosf (complex float z);
506#endif
507
508#if !defined(HAVE_CACOS) && defined(HAVE_CLOG) && defined(HAVE_CSQRT)
509#define HAVE_CACOS 1
510extern complex double cacos (complex double z);
511#endif
512
513#if !defined(HAVE_CACOSL) && defined(HAVE_CLOGL) && defined(HAVE_CSQRTL)
514#define HAVE_CACOSL 1
515extern complex long double cacosl (complex long double z);
516#endif
517
518
519/* Complex ASIN. */
520
521#if !defined(HAVE_CASINF) && defined(HAVE_CLOGF) && defined(HAVE_CSQRTF)
522#define HAVE_CASINF 1
523extern complex float casinf (complex float z);
524#endif
525
526#if !defined(HAVE_CASIN) && defined(HAVE_CLOG) && defined(HAVE_CSQRT)
527#define HAVE_CASIN 1
528extern complex double casin (complex double z);
529#endif
530
531#if !defined(HAVE_CASINL) && defined(HAVE_CLOGL) && defined(HAVE_CSQRTL)
532#define HAVE_CASINL 1
533extern complex long double casinl (complex long double z);
534#endif
535
536
537/* Complex ATAN. */
538
539#if !defined(HAVE_CATANF) && defined(HAVE_CLOGF)
540#define HAVE_CATANF 1
541extern complex float catanf (complex float z);
542#endif
543
544#if !defined(HAVE_CATAN) && defined(HAVE_CLOG)
545#define HAVE_CATAN 1
546extern complex double catan (complex double z);
547#endif
548
549#if !defined(HAVE_CATANL) && defined(HAVE_CLOGL)
550#define HAVE_CATANL 1
551extern complex long double catanl (complex long double z);
552#endif
553
554
555/* Complex ASINH. */
556
557#if !defined(HAVE_CASINHF) && defined(HAVE_CLOGF) && defined(HAVE_CSQRTF)
558#define HAVE_CASINHF 1
559extern complex float casinhf (complex float z);
560#endif
561
562
563#if !defined(HAVE_CASINH) && defined(HAVE_CLOG) && defined(HAVE_CSQRT)
564#define HAVE_CASINH 1
565extern complex double casinh (complex double z);
566#endif
567
568#if !defined(HAVE_CASINHL) && defined(HAVE_CLOGL) && defined(HAVE_CSQRTL)
569#define HAVE_CASINHL 1
570extern complex long double casinhl (complex long double z);
571#endif
572
573
574/* Complex ACOSH. */
575
576#if !defined(HAVE_CACOSHF) && defined(HAVE_CLOGF) && defined(HAVE_CSQRTF)
577#define HAVE_CACOSHF 1
578extern complex float cacoshf (complex float z);
579#endif
580
581#if !defined(HAVE_CACOSH) && defined(HAVE_CLOG) && defined(HAVE_CSQRT)
582#define HAVE_CACOSH 1
583extern complex double cacosh (complex double z);
584#endif
585
586#if !defined(HAVE_CACOSHL) && defined(HAVE_CLOGL) && defined(HAVE_CSQRTL)
587#define HAVE_CACOSHL 1
588extern complex long double cacoshl (complex long double z);
589#endif
590
591
592/* Complex ATANH. */
593
594#if !defined(HAVE_CATANHF) && defined(HAVE_CLOGF)
595#define HAVE_CATANHF 1
596extern complex float catanhf (complex float z);
597#endif
598
599#if !defined(HAVE_CATANH) && defined(HAVE_CLOG)
600#define HAVE_CATANH 1
601extern complex double catanh (complex double z);
602#endif
603
604#if !defined(HAVE_CATANHL) && defined(HAVE_CLOGL)
605#define HAVE_CATANHL 1
606extern complex long double catanhl (complex long double z);
607#endif
608
609
fb0a0e15
FXC
610/* Gamma-related prototypes. */
611#if !defined(HAVE_TGAMMA)
612#define HAVE_TGAMMA 1
613extern double tgamma (double);
614#endif
615
616#if !defined(HAVE_LGAMMA)
617#define HAVE_LGAMMA 1
618extern double lgamma (double);
619#endif
620
621#if defined(HAVE_TGAMMA) && !defined(HAVE_TGAMMAF)
622#define HAVE_TGAMMAF 1
623extern float tgammaf (float);
624#endif
625
626#if defined(HAVE_LGAMMA) && !defined(HAVE_LGAMMAF)
627#define HAVE_LGAMMAF 1
628extern float lgammaf (float);
629#endif
630
631
6e4d9244
EB
632#endif /* C99_PROTOS_H */
633