* builtins.c (fold_builtin_fmin_fmax): Handle NaN arguments.
[official-gcc.git] / libgfortran / c99_protos.h
blob26c0aa2b54702c1d9ef1315bc3c5e825ed2edf93
1 /* Declarations of various C99 functions
2 Copyright (C) 2004, 2006 Free Software Foundation, Inc.
4 This file is part of the GNU Fortran 95 runtime library (libgfortran).
6 Libgfortran is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 Libgfortran is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with libgfortran; see the file COPYING.LIB. If not,
18 write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */
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. */
29 #ifndef C99_PROTOS_H
30 #define C99_PROTOS_H 1
32 /* float variants of libm functions */
33 #ifndef HAVE_ACOSF
34 #define HAVE_ACOSF 1
35 extern float acosf(float);
36 #endif
38 #if HAVE_ACOSH && !HAVE_ACOSHF
39 #define HAVE_ACOSHF 1
40 extern float acoshf(float);
41 #endif
43 #ifndef HAVE_ASINF
44 #define HAVE_ASINF 1
45 extern float asinf(float);
46 #endif
48 #if HAVE_ASINH && !HAVE_ASINHF
49 #define HAVE_ASINHF 1
50 extern float asinhf(float);
51 #endif
53 #ifndef HAVE_ATAN2F
54 #define HAVE_ATAN2F 1
55 extern float atan2f(float, float);
56 #endif
58 #ifndef HAVE_ATANF
59 #define HAVE_ATANF 1
60 extern float atanf(float);
61 #endif
63 #if HAVE_ATANH && !HAVE_ATANHF
64 #define HAVE_ATANHF 1
65 extern float atanhf(float);
66 #endif
68 #ifndef HAVE_CEILF
69 #define HAVE_CEILF 1
70 extern float ceilf(float);
71 #endif
73 #ifndef HAVE_COPYSIGNF
74 #define HAVE_COPYSIGNF 1
75 extern float copysignf(float, float);
76 #endif
78 #ifndef HAVE_COSF
79 #define HAVE_COSF 1
80 extern float cosf(float);
81 #endif
83 #ifndef HAVE_COSHF
84 #define HAVE_COSHF 1
85 extern float coshf(float);
86 #endif
88 #ifndef HAVE_EXPF
89 #define HAVE_EXPF 1
90 extern float expf(float);
91 #endif
93 #ifndef HAVE_FABSF
94 #define HAVE_FABSF 1
95 extern float fabsf(float);
96 #endif
98 #ifndef HAVE_FLOORF
99 #define HAVE_FLOORF 1
100 extern float floorf(float);
101 #endif
103 #ifndef HAVE_FREXPF
104 #define HAVE_FREXPF 1
105 extern float frexpf(float, int *);
106 #endif
108 #ifndef HAVE_HYPOTF
109 #define HAVE_HYPOTF 1
110 extern float hypotf(float, float);
111 #endif
113 #ifndef HAVE_LOGF
114 #define HAVE_LOGF 1
115 extern float logf(float);
116 #endif
118 #ifndef HAVE_LOG10F
119 #define HAVE_LOG10F 1
120 extern float log10f(float);
121 #endif
123 #ifndef HAVE_SCALBN
124 #define HAVE_SCALBN 1
125 extern double scalbn(double, int);
126 #endif
128 #ifndef HAVE_SCALBNF
129 #define HAVE_SCALBNF 1
130 extern float scalbnf(float, int);
131 #endif
133 #ifndef HAVE_SINF
134 #define HAVE_SINF 1
135 extern float sinf(float);
136 #endif
138 #ifndef HAVE_SINHF
139 #define HAVE_SINHF 1
140 extern float sinhf(float);
141 #endif
143 #ifndef HAVE_SQRTF
144 #define HAVE_SQRTF 1
145 extern float sqrtf(float);
146 #endif
148 #ifndef HAVE_TANF
149 #define HAVE_TANF 1
150 extern float tanf(float);
151 #endif
153 #ifndef HAVE_TANHF
154 #define HAVE_TANHF 1
155 extern float tanhf(float);
156 #endif
158 #ifndef HAVE_TRUNC
159 #define HAVE_TRUNC 1
160 extern double trunc(double);
161 #endif
163 #ifndef HAVE_TRUNCF
164 #define HAVE_TRUNCF 1
165 extern float truncf(float);
166 #endif
168 #ifndef HAVE_NEXTAFTERF
169 #define HAVE_NEXTAFTERF 1
170 extern float nextafterf(float, float);
171 #endif
173 #ifndef HAVE_POWF
174 #define HAVE_POWF 1
175 extern float powf(float, float);
176 #endif
178 #ifndef HAVE_ROUND
179 #define HAVE_ROUND 1
180 extern double round(double);
181 #endif
183 #ifndef HAVE_ROUNDF
184 #define HAVE_ROUNDF 1
185 extern float roundf(float);
186 #endif
188 /* Wrappers for systems without the various C99 single precision Bessel
189 functions. */
191 #if defined(HAVE_J0) && ! defined(HAVE_J0F)
192 #define HAVE_J0F 1
193 extern float j0f (float);
194 #endif
196 #if defined(HAVE_J1) && !defined(HAVE_J1F)
197 #define HAVE_J1F 1
198 extern float j1f (float);
199 #endif
201 #if defined(HAVE_JN) && !defined(HAVE_JNF)
202 #define HAVE_JNF 1
203 extern float jnf (int, float);
204 #endif
206 #if defined(HAVE_Y0) && !defined(HAVE_Y0F)
207 #define HAVE_Y0F 1
208 extern float y0f (float);
209 #endif
211 #if defined(HAVE_Y1) && !defined(HAVE_Y1F)
212 #define HAVE_Y1F 1
213 extern float y1f (float);
214 #endif
216 #if defined(HAVE_YN) && !defined(HAVE_YNF)
217 #define HAVE_YNF 1
218 extern float ynf (int, float);
219 #endif
222 /* Wrappers for systems without the C99 erff() and erfcf() functions. */
224 #if defined(HAVE_ERF) && !defined(HAVE_ERFF)
225 #define HAVE_ERFF 1
226 extern float erff (float);
227 #endif
229 #if defined(HAVE_ERFC) && !defined(HAVE_ERFCF)
230 #define HAVE_ERFCF 1
231 extern float erfcf (float);
232 #endif
236 /* log10l is needed on all platforms for decimal I/O */
237 #ifndef HAVE_LOG10L
238 #define HAVE_LOG10L 1
239 extern long double log10l(long double);
240 #endif
243 /* complex math functions */
245 #if !defined(HAVE_CABSF)
246 #define HAVE_CABSF 1
247 extern float cabsf (float complex);
248 #endif
250 #if !defined(HAVE_CABS)
251 #define HAVE_CABS 1
252 extern double cabs (double complex);
253 #endif
255 #if !defined(HAVE_CABSL) && defined(HAVE_HYPOTL)
256 #define HAVE_CABSL 1
257 extern long double cabsl (long double complex);
258 #endif
261 #if !defined(HAVE_CARGF)
262 #define HAVE_CARGF 1
263 extern float cargf (float complex);
264 #endif
266 #if !defined(HAVE_CARG)
267 #define HAVE_CARG 1
268 extern double carg (double complex);
269 #endif
271 #if !defined(HAVE_CARGL) && defined(HAVE_ATAN2L)
272 #define HAVE_CARGL 1
273 extern long double cargl (long double complex);
274 #endif
277 #if !defined(HAVE_CEXPF)
278 #define HAVE_CEXPF 1
279 extern float complex cexpf (float complex);
280 #endif
282 #if !defined(HAVE_CEXP)
283 #define HAVE_CEXP 1
284 extern double complex cexp (double complex);
285 #endif
287 #if !defined(HAVE_CEXPL) && defined(HAVE_COSL) && defined(HAVE_SINL) && defined(EXPL)
288 #define HAVE_CEXPL 1
289 extern long double complex cexpl (long double complex);
290 #endif
293 #if !defined(HAVE_CLOGF)
294 #define HAVE_CLOGF 1
295 extern float complex clogf (float complex);
296 #endif
298 #if !defined(HAVE_CLOG)
299 #define HAVE_CLOG 1
300 extern double complex clog (double complex);
301 #endif
303 #if !defined(HAVE_CLOGL) && defined(HAVE_LOGL) && defined(HAVE_CABSL) && defined(HAVE_CARGL)
304 #define HAVE_CLOGL 1
305 extern long double complex clogl (long double complex);
306 #endif
309 #if !defined(HAVE_CLOG10F)
310 #define HAVE_CLOG10F 1
311 extern float complex clog10f (float complex);
312 #endif
314 #if !defined(HAVE_CLOG10)
315 #define HAVE_CLOG10 1
316 extern double complex clog10 (double complex);
317 #endif
319 #if !defined(HAVE_CLOG10L) && defined(HAVE_LOG10L) && defined(HAVE_CABSL) && defined(HAVE_CARGL)
320 #define HAVE_CLOG10L 1
321 extern long double complex clog10l (long double complex);
322 #endif
325 #if !defined(HAVE_CPOWF)
326 #define HAVE_CPOWF 1
327 extern float complex cpowf (float complex, float complex);
328 #endif
330 #if !defined(HAVE_CPOW)
331 #define HAVE_CPOW 1
332 extern double complex cpow (double complex, double complex);
333 #endif
335 #if !defined(HAVE_CPOWL) && defined(HAVE_CEXPL) && defined(HAVE_CLOGL)
336 #define HAVE_CPOWL 1
337 extern long double complex cpowl (long double complex, long double complex);
338 #endif
341 #if !defined(HAVE_CSQRTF)
342 #define HAVE_CSQRTF 1
343 extern float complex csqrtf (float complex);
344 #endif
346 #if !defined(HAVE_CSQRT)
347 #define HAVE_CSQRT 1
348 extern double complex csqrt (double complex);
349 #endif
351 #if !defined(HAVE_CSQRTL) && defined(HAVE_COPYSIGNL) && defined(HAVE_SQRTL) && defined(HAVE_FABSL) && defined(HAVE_HYPOTL)
352 #define HAVE_CSQRTL 1
353 extern long double complex csqrtl (long double complex);
354 #endif
357 #if !defined(HAVE_CSINHF)
358 #define HAVE_CSINHF 1
359 extern float complex csinhf (float complex);
360 #endif
362 #if !defined(HAVE_CSINH)
363 #define HAVE_CSINH 1
364 extern double complex csinh (double complex);
365 #endif
367 #if !defined(HAVE_CSINHL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
368 #define HAVE_CSINHL 1
369 extern long double complex csinhl (long double complex);
370 #endif
373 #if !defined(HAVE_CCOSHF)
374 #define HAVE_CCOSHF 1
375 extern float complex ccoshf (float complex);
376 #endif
378 #if !defined(HAVE_CCOSH)
379 #define HAVE_CCOSH 1
380 extern double complex ccosh (double complex);
381 #endif
383 #if !defined(HAVE_CCOSHL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
384 #define HAVE_CCOSHL 1
385 extern long double complex ccoshl (long double complex);
386 #endif
389 #if !defined(HAVE_CTANHF)
390 #define HAVE_CTANHF 1
391 extern float complex ctanhf (float complex);
392 #endif
394 #if !defined(HAVE_CTANH)
395 #define HAVE_CTANH 1
396 extern double complex ctanh (double complex);
397 #endif
399 #if !defined(HAVE_CTANHL) && defined(HAVE_TANL) && defined(HAVE_TANHL)
400 #define HAVE_CTANHL 1
401 extern long double complex ctanhl (long double complex);
402 #endif
405 #if !defined(HAVE_CSINF)
406 #define HAVE_CSINF 1
407 extern float complex csinf (float complex);
408 #endif
410 #if !defined(HAVE_CSIN)
411 #define HAVE_CSIN 1
412 extern double complex csin (double complex);
413 #endif
415 #if !defined(HAVE_CSINL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
416 #define HAVE_CSINL 1
417 extern long double complex csinl (long double complex);
418 #endif
421 #if !defined(HAVE_CCOSF)
422 #define HAVE_CCOSF 1
423 extern float complex ccosf (float complex);
424 #endif
426 #if !defined(HAVE_CCOS)
427 #define HAVE_CCOS 1
428 extern double complex ccos (double complex);
429 #endif
431 #if !defined(HAVE_CCOSL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
432 #define HAVE_CCOSL 1
433 extern long double complex ccosl (long double complex);
434 #endif
437 #if !defined(HAVE_CTANF)
438 #define HAVE_CTANF 1
439 extern float complex ctanf (float complex);
440 #endif
442 #if !defined(HAVE_CTAN)
443 #define HAVE_CTAN 1
444 extern double complex ctan (double complex);
445 #endif
447 #if !defined(HAVE_CTANL) && defined(HAVE_TANL) && defined(HAVE_TANHL)
448 #define HAVE_CTANL 1
449 extern long double complex ctanl (long double complex);
450 #endif
453 #endif /* C99_PROTOS_H */