aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/intrinsics/c99_functions.c
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <coudert@clipper.ens.fr>2006-11-25 18:22:53 +0100
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2006-11-25 17:22:53 +0000
commit7afebb02328cbaeae28f6954f6e4c2999007099a (patch)
tree7b1a43b523ba701ba6ef1200cc8b3c34a25a1e66 /libgfortran/intrinsics/c99_functions.c
parent9406549c9ff749822cba6ea283708ef950d70ab3 (diff)
downloadgcc-7afebb02328cbaeae28f6954f6e4c2999007099a.zip
gcc-7afebb02328cbaeae28f6954f6e4c2999007099a.tar.gz
gcc-7afebb02328cbaeae28f6954f6e4c2999007099a.tar.bz2
Makefile.am: Remove intrinsics/erf.c and intrinsics/bessel.c.
* Makefile.am: Remove intrinsics/erf.c and intrinsics/bessel.c. * Makefile.in: Regenerate. * intrinsics/erf.c: Remove. * intrinsics/bessel.c: Remove. * c99_protos.h: Add prototypes for bessel and error functions. * intrinsics/c99_functions.c: Move content for intrinsics/erf.c and intrinsics/bessel.c here. From-SVN: r119204
Diffstat (limited to 'libgfortran/intrinsics/c99_functions.c')
-rw-r--r--libgfortran/intrinsics/c99_functions.c95
1 files changed, 95 insertions, 0 deletions
diff --git a/libgfortran/intrinsics/c99_functions.c b/libgfortran/intrinsics/c99_functions.c
index 86867a2..96b5ef8 100644
--- a/libgfortran/intrinsics/c99_functions.c
+++ b/libgfortran/intrinsics/c99_functions.c
@@ -76,6 +76,101 @@ float complex clog10f(float complex);
double complex clog10(double complex);
long double complex clog10l(long double complex);
+
+/* Wrappers for systems without the various C99 single precision Bessel
+ functions. */
+
+#if defined(HAVE_J0) && ! defined(HAVE_J0F)
+#define HAVE_J0F 1
+extern float j0f (float);
+
+float
+j0f (float x)
+{
+ return (float) j0 ((double) x);
+}
+#endif
+
+#if defined(HAVE_J1) && !defined(HAVE_J1F)
+#define HAVE_J1F 1
+extern float j1f (float);
+
+float j1f (float x)
+{
+ return (float) j1 ((double) x);
+}
+#endif
+
+#if defined(HAVE_JN) && !defined(HAVE_JNF)
+#define HAVE_JNF 1
+extern float jnf (int, float);
+
+float
+jnf (int n, float x)
+{
+ return (float) jn (n, (double) x);
+}
+#endif
+
+#if defined(HAVE_Y0) && !defined(HAVE_Y0F)
+#define HAVE_Y0F 1
+extern float y0f (float);
+
+float
+y0f (float x)
+{
+ return (float) y0 ((double) x);
+}
+#endif
+
+#if defined(HAVE_Y1) && !defined(HAVE_Y1F)
+#define HAVE_Y1F 1
+extern float y1f (float);
+
+float
+y1f (float x)
+{
+ return (float) y1 ((double) x);
+}
+#endif
+
+#if defined(HAVE_YN) && !defined(HAVE_YNF)
+#define HAVE_YNF 1
+extern float ynf (int, float);
+
+float
+ynf (int n, float x)
+{
+ return (float) yn (n, (double) x);
+}
+#endif
+
+
+/* Wrappers for systems without the C99 erff() and erfcf() functions. */
+
+#if defined(HAVE_ERF) && !defined(HAVE_ERFF)
+#define HAVE_ERFF 1
+extern float erff (float);
+
+float
+erff (float x)
+{
+ return (float) erf ((double) x);
+}
+#endif
+
+#if defined(HAVE_ERFC) && !defined(HAVE_ERFCF)
+#define HAVE_ERFCF 1
+extern float erfcf (float);
+
+float
+erfcf (float x)
+{
+ return (float) erfc ((double) x);
+}
+#endif
+
+
#ifndef HAVE_ACOSF
#define HAVE_ACOSF 1
float