aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libgfortran/ChangeLog10
-rw-r--r--libgfortran/Makefile.am2
-rw-r--r--libgfortran/Makefile.in12
-rw-r--r--libgfortran/c99_protos.h47
-rw-r--r--libgfortran/intrinsics/bessel.c92
-rw-r--r--libgfortran/intrinsics/c99_functions.c95
-rw-r--r--libgfortran/intrinsics/erf.c48
7 files changed, 154 insertions, 152 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 553cd1a93a1..97e7f3a2c2b 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,13 @@
+2006-11-25 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ * 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.
+
2006-11-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* io/io.h (unit_flags): Add new flag has_recl.
diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am
index 258366943f4..b6bf05b2dc6 100644
--- a/libgfortran/Makefile.am
+++ b/libgfortran/Makefile.am
@@ -43,7 +43,6 @@ intrinsics/associated.c \
intrinsics/abort.c \
intrinsics/access.c \
intrinsics/args.c \
-intrinsics/bessel.c \
intrinsics/c99_functions.c \
intrinsics/chdir.c \
intrinsics/chmod.c \
@@ -53,7 +52,6 @@ intrinsics/cshift0.c \
intrinsics/ctime.c \
intrinsics/date_and_time.c \
intrinsics/env.c \
-intrinsics/erf.c \
intrinsics/eoshift0.c \
intrinsics/eoshift2.c \
intrinsics/etime.c \
diff --git a/libgfortran/Makefile.in b/libgfortran/Makefile.in
index 75010a263bd..c73bb0d74eb 100644
--- a/libgfortran/Makefile.in
+++ b/libgfortran/Makefile.in
@@ -169,9 +169,9 @@ am__objects_30 = $(am__objects_2) $(am__objects_3) $(am__objects_4) \
am__objects_31 = close.lo file_pos.lo format.lo inquire.lo \
list_read.lo lock.lo open.lo read.lo size_from_kind.lo \
transfer.lo unit.lo unix.lo write.lo
-am__objects_32 = associated.lo abort.lo access.lo args.lo bessel.lo \
+am__objects_32 = associated.lo abort.lo access.lo args.lo \
c99_functions.lo chdir.lo chmod.lo clock.lo cpu_time.lo \
- cshift0.lo ctime.lo date_and_time.lo env.lo erf.lo eoshift0.lo \
+ cshift0.lo ctime.lo date_and_time.lo env.lo eoshift0.lo \
eoshift2.lo etime.lo exit.lo fget.lo flush.lo fnum.lo ftell.lo \
gerror.lo getcwd.lo getlog.lo getXid.lo hostnm.lo kill.lo \
ierrno.lo ishftc.lo link.lo malloc.lo mvbits.lo move_alloc.lo \
@@ -402,7 +402,6 @@ intrinsics/associated.c \
intrinsics/abort.c \
intrinsics/access.c \
intrinsics/args.c \
-intrinsics/bessel.c \
intrinsics/c99_functions.c \
intrinsics/chdir.c \
intrinsics/chmod.c \
@@ -412,7 +411,6 @@ intrinsics/cshift0.c \
intrinsics/ctime.c \
intrinsics/date_and_time.c \
intrinsics/env.c \
-intrinsics/erf.c \
intrinsics/eoshift0.c \
intrinsics/eoshift2.c \
intrinsics/etime.c \
@@ -2358,9 +2356,6 @@ access.lo: intrinsics/access.c
args.lo: intrinsics/args.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o args.lo `test -f 'intrinsics/args.c' || echo '$(srcdir)/'`intrinsics/args.c
-bessel.lo: intrinsics/bessel.c
- $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bessel.lo `test -f 'intrinsics/bessel.c' || echo '$(srcdir)/'`intrinsics/bessel.c
-
c99_functions.lo: intrinsics/c99_functions.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o c99_functions.lo `test -f 'intrinsics/c99_functions.c' || echo '$(srcdir)/'`intrinsics/c99_functions.c
@@ -2388,9 +2383,6 @@ date_and_time.lo: intrinsics/date_and_time.c
env.lo: intrinsics/env.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o env.lo `test -f 'intrinsics/env.c' || echo '$(srcdir)/'`intrinsics/env.c
-erf.lo: intrinsics/erf.c
- $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o erf.lo `test -f 'intrinsics/erf.c' || echo '$(srcdir)/'`intrinsics/erf.c
-
eoshift0.lo: intrinsics/eoshift0.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eoshift0.lo `test -f 'intrinsics/eoshift0.c' || echo '$(srcdir)/'`intrinsics/eoshift0.c
diff --git a/libgfortran/c99_protos.h b/libgfortran/c99_protos.h
index b7c992c2480..26c0aa2b547 100644
--- a/libgfortran/c99_protos.h
+++ b/libgfortran/c99_protos.h
@@ -185,6 +185,53 @@ extern double round(double);
extern float roundf(float);
#endif
+/* 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);
+#endif
+
+#if defined(HAVE_J1) && !defined(HAVE_J1F)
+#define HAVE_J1F 1
+extern float j1f (float);
+#endif
+
+#if defined(HAVE_JN) && !defined(HAVE_JNF)
+#define HAVE_JNF 1
+extern float jnf (int, float);
+#endif
+
+#if defined(HAVE_Y0) && !defined(HAVE_Y0F)
+#define HAVE_Y0F 1
+extern float y0f (float);
+#endif
+
+#if defined(HAVE_Y1) && !defined(HAVE_Y1F)
+#define HAVE_Y1F 1
+extern float y1f (float);
+#endif
+
+#if defined(HAVE_YN) && !defined(HAVE_YNF)
+#define HAVE_YNF 1
+extern float ynf (int, float);
+#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);
+#endif
+
+#if defined(HAVE_ERFC) && !defined(HAVE_ERFCF)
+#define HAVE_ERFCF 1
+extern float erfcf (float);
+#endif
+
+
/* log10l is needed on all platforms for decimal I/O */
#ifndef HAVE_LOG10L
diff --git a/libgfortran/intrinsics/bessel.c b/libgfortran/intrinsics/bessel.c
deleted file mode 100644
index 69facd6e58f..00000000000
--- a/libgfortran/intrinsics/bessel.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/* Wrapper for systems without the various C99 single precision Bessel
- functions.
- Copyright (C) 2004 Free Software Foundation, Inc.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-In addition to the permissions in the GNU General Public License, the
-Free Software Foundation gives you unlimited permission to link the
-compiled version of this file into combinations with other programs,
-and to distribute those combinations without any restriction coming
-from the use of this file. (The General Public License restrictions
-do apply in other respects; for example, they cover modification of
-the file, and distribution when not linked into a combine
-executable.)
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public
-License along with libgfortran; see the file COPYING. If not,
-write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA. */
-
-#include "config.h"
-#include <math.h>
-#include "libgfortran.h"
-
-#if HAVE_J0 && !HAVE_J0F
-extern float j0f (float);
-
-float
-j0f (float x)
-{
- return (float) j0 ((double) x);
-}
-#endif
-
-#if HAVE_J1 && !HAVE_J1F
-extern float j1f (float);
-
-float j1f (float x)
-{
- return (float) j1 ((double) x);
-}
-#endif
-
-#if HAVE_JN && !HAVE_JNF
-extern float jnf (int, float);
-
-float
-jnf (int n, float x)
-{
- return (float) jn (n, (double) x);
-}
-#endif
-
-#if HAVE_Y0 && !HAVE_Y0F
-extern float y0f (float);
-
-float
-y0f (float x)
-{
- return (float) y0 ((double) x);
-}
-#endif
-
-#if HAVE_Y1 && !HAVE_Y1F
-extern float y1f (float);
-
-float
-y1f (float x)
-{
- return (float) y1 ((double) x);
-}
-#endif
-
-#if HAVE_YN && !HAVE_YNF
-extern float ynf (int, float);
-
-float
-ynf (int n, float x)
-{
- return (float) yn (n, (double) x);
-}
-#endif
diff --git a/libgfortran/intrinsics/c99_functions.c b/libgfortran/intrinsics/c99_functions.c
index 86867a20b9f..96b5ef88851 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
diff --git a/libgfortran/intrinsics/erf.c b/libgfortran/intrinsics/erf.c
deleted file mode 100644
index bf9ecca8985..00000000000
--- a/libgfortran/intrinsics/erf.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Wrapper for systems without the C99 erff() and erfcf() functions
- Copyright (C) 2004 Free Software Foundation, Inc.
-
-This file is part of the GNU Fortran 95 runtime library (libgfortran).
-
-Libgfortran is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-In addition to the permissions in the GNU General Public License, the
-Free Software Foundation gives you unlimited permission to link the
-compiled version of this file into combinations with other programs,
-and to distribute those combinations without any restriction coming
-from the use of this file. (The General Public License restrictions
-do apply in other respects; for example, they cover modification of
-the file, and distribution when not linked into a combine
-executable.)
-
-Libgfortran is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public
-License along with libgfortran; see the file COPYING. If not,
-write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA. */
-
-#include "config.h"
-#include <math.h>
-#include "libgfortran.h"
-
-#if HAVE_ERF && !HAVE_ERFF
-float
-erff (float x)
-{
- return (float) erf ((double) x);
-}
-#endif
-
-#if HAVE_ERFC && !HAVE_ERFCF
-float
-erfcf (float x)
-{
- return (float) erfc ((double) x);
-}
-#endif