acinclude.m4 (LIBGFOR_CHECK_ATTRIBUTE_VISIBILITY): New.
authorRichard Henderson <rth@redhat.com>
Sun, 12 Dec 2004 08:59:05 +0000 (00:59 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 12 Dec 2004 08:59:05 +0000 (00:59 -0800)
        * acinclude.m4 (LIBGFOR_CHECK_ATTRIBUTE_VISIBILITY): New.
        (LIBGFOR_CHECK_ATTRIBUTE_DLLEXPORT): New.
        (LIBGFOR_CHECK_ATTRIBUTE_ALIAS): New.
        * configure.ac: Use them.
        * configure, config.h.in, aclocal.m4: Rebuild.
        * libgfortran.h (prefix): Remove.
        (PREFIX, IPREFIX): New.
        (sym_rename, sym_rename1, sym_rename2): New.
        (internal_proto, export_proto, export_proto_np): New.
        (iexport_proto, iexport): New.
        (iexport_data_proto, iexport_data): New.
        * intrinsics/abort.c, intrinsics/args.c, intrinsics/associated.c,
        intrinsics/cpu_time.c, intrinsics/cshift0.c,
        intrinsics/date_and_time.c, intrinsics/env.c, intrinsics/eoshift0.c,
        intrinsics/eoshift2.c, intrinsics/etime.c, intrinsics/exit.c,
        intrinsics/flush.c, intrinsics/fnum.c, intrinsics/getXid.c,
        intrinsics/getcwd.c, intrinsics/ishftc.c, intrinsics/mvbits.c,
        intrinsics/pack_generic.c, intrinsics/rand.c, intrinsics/random.c,
        intrinsics/reshape_generic.c, intrinsics/size.c,
        intrinsics/spread_generic.c, intrinsics/stat.c,
        intrinsics/string_intrinsics.c, intrinsics/system.c,
        intrinsics/system_clock.c, intrinsics/transpose_generic.c,
        intrinsics/umask.c, intrinsics/unlink.c, intrinsics/unpack_generic.c,
        io/backspace.c, io/close.c, io/endfile.c, io/inquire.c, io/io.h,
        io/open.c, io/rewind.c, io/transfer.c, libgfortran.h, m4/cshift1.m4,
        m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4,
        m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/iforeach.m4,
        m4/ifunction.m4, m4/matmul.m4, m4/matmull.m4, m4/nearest.m4,
        m4/pow.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4,
        m4/transpose.m4, runtime/environ.c, runtime/error.c,
        runtime/in_pack_generic.c, runtime/in_unpack_generic.c,
        runtime/main.c, runtime/memory.c, runtime/pause.c, runtime/select.c,
        runtime/stop.c: Use them to mark symbols internal or external.
        * generated/*: Rebuild.

From-SVN: r92045

181 files changed:
libgfortran/ChangeLog
libgfortran/acinclude.m4
libgfortran/config.h.in
libgfortran/configure
libgfortran/configure.ac
libgfortran/generated/all_l4.c
libgfortran/generated/all_l8.c
libgfortran/generated/any_l4.c
libgfortran/generated/any_l8.c
libgfortran/generated/count_4_l4.c
libgfortran/generated/count_4_l8.c
libgfortran/generated/count_8_l4.c
libgfortran/generated/count_8_l8.c
libgfortran/generated/cshift1_4.c
libgfortran/generated/cshift1_8.c
libgfortran/generated/dotprod_c4.c
libgfortran/generated/dotprod_c8.c
libgfortran/generated/dotprod_i4.c
libgfortran/generated/dotprod_i8.c
libgfortran/generated/dotprod_l4.c
libgfortran/generated/dotprod_l8.c
libgfortran/generated/dotprod_r4.c
libgfortran/generated/dotprod_r8.c
libgfortran/generated/eoshift1_4.c
libgfortran/generated/eoshift1_8.c
libgfortran/generated/eoshift3_4.c
libgfortran/generated/eoshift3_8.c
libgfortran/generated/exponent_r4.c
libgfortran/generated/exponent_r8.c
libgfortran/generated/fraction_r4.c
libgfortran/generated/fraction_r8.c
libgfortran/generated/matmul_c4.c
libgfortran/generated/matmul_c8.c
libgfortran/generated/matmul_i4.c
libgfortran/generated/matmul_i8.c
libgfortran/generated/matmul_l4.c
libgfortran/generated/matmul_l8.c
libgfortran/generated/matmul_r4.c
libgfortran/generated/matmul_r8.c
libgfortran/generated/maxloc0_4_i4.c
libgfortran/generated/maxloc0_4_i8.c
libgfortran/generated/maxloc0_4_r4.c
libgfortran/generated/maxloc0_4_r8.c
libgfortran/generated/maxloc0_8_i4.c
libgfortran/generated/maxloc0_8_i8.c
libgfortran/generated/maxloc0_8_r4.c
libgfortran/generated/maxloc0_8_r8.c
libgfortran/generated/maxloc1_4_i4.c
libgfortran/generated/maxloc1_4_i8.c
libgfortran/generated/maxloc1_4_r4.c
libgfortran/generated/maxloc1_4_r8.c
libgfortran/generated/maxloc1_8_i4.c
libgfortran/generated/maxloc1_8_i8.c
libgfortran/generated/maxloc1_8_r4.c
libgfortran/generated/maxloc1_8_r8.c
libgfortran/generated/maxval_i4.c
libgfortran/generated/maxval_i8.c
libgfortran/generated/maxval_r4.c
libgfortran/generated/maxval_r8.c
libgfortran/generated/minloc0_4_i4.c
libgfortran/generated/minloc0_4_i8.c
libgfortran/generated/minloc0_4_r4.c
libgfortran/generated/minloc0_4_r8.c
libgfortran/generated/minloc0_8_i4.c
libgfortran/generated/minloc0_8_i8.c
libgfortran/generated/minloc0_8_r4.c
libgfortran/generated/minloc0_8_r8.c
libgfortran/generated/minloc1_4_i4.c
libgfortran/generated/minloc1_4_i8.c
libgfortran/generated/minloc1_4_r4.c
libgfortran/generated/minloc1_4_r8.c
libgfortran/generated/minloc1_8_i4.c
libgfortran/generated/minloc1_8_i8.c
libgfortran/generated/minloc1_8_r4.c
libgfortran/generated/minloc1_8_r8.c
libgfortran/generated/minval_i4.c
libgfortran/generated/minval_i8.c
libgfortran/generated/minval_r4.c
libgfortran/generated/minval_r8.c
libgfortran/generated/nearest_r4.c
libgfortran/generated/nearest_r8.c
libgfortran/generated/pow_c4_i4.c
libgfortran/generated/pow_c4_i8.c
libgfortran/generated/pow_c8_i4.c
libgfortran/generated/pow_c8_i8.c
libgfortran/generated/pow_i4_i4.c
libgfortran/generated/pow_i4_i8.c
libgfortran/generated/pow_i8_i4.c
libgfortran/generated/pow_i8_i8.c
libgfortran/generated/pow_r4_i4.c
libgfortran/generated/pow_r4_i8.c
libgfortran/generated/pow_r8_i4.c
libgfortran/generated/pow_r8_i8.c
libgfortran/generated/product_c4.c
libgfortran/generated/product_c8.c
libgfortran/generated/product_i4.c
libgfortran/generated/product_i8.c
libgfortran/generated/product_r4.c
libgfortran/generated/product_r8.c
libgfortran/generated/reshape_i4.c
libgfortran/generated/reshape_i8.c
libgfortran/generated/set_exponent_r4.c
libgfortran/generated/set_exponent_r8.c
libgfortran/generated/shape_i4.c
libgfortran/generated/shape_i8.c
libgfortran/generated/sum_c4.c
libgfortran/generated/sum_c8.c
libgfortran/generated/sum_i4.c
libgfortran/generated/sum_i8.c
libgfortran/generated/sum_r4.c
libgfortran/generated/sum_r8.c
libgfortran/generated/transpose_i4.c
libgfortran/generated/transpose_i8.c
libgfortran/intrinsics/abort.c
libgfortran/intrinsics/args.c
libgfortran/intrinsics/associated.c
libgfortran/intrinsics/cpu_time.c
libgfortran/intrinsics/cshift0.c
libgfortran/intrinsics/date_and_time.c
libgfortran/intrinsics/env.c
libgfortran/intrinsics/eoshift0.c
libgfortran/intrinsics/eoshift2.c
libgfortran/intrinsics/etime.c
libgfortran/intrinsics/exit.c
libgfortran/intrinsics/flush.c
libgfortran/intrinsics/fnum.c
libgfortran/intrinsics/getXid.c
libgfortran/intrinsics/getcwd.c
libgfortran/intrinsics/ishftc.c
libgfortran/intrinsics/mvbits.c
libgfortran/intrinsics/pack_generic.c
libgfortran/intrinsics/rand.c
libgfortran/intrinsics/random.c
libgfortran/intrinsics/reshape_generic.c
libgfortran/intrinsics/size.c
libgfortran/intrinsics/spread_generic.c
libgfortran/intrinsics/stat.c
libgfortran/intrinsics/string_intrinsics.c
libgfortran/intrinsics/system.c
libgfortran/intrinsics/system_clock.c
libgfortran/intrinsics/transpose_generic.c
libgfortran/intrinsics/umask.c
libgfortran/intrinsics/unlink.c
libgfortran/intrinsics/unpack_generic.c
libgfortran/io/backspace.c
libgfortran/io/close.c
libgfortran/io/endfile.c
libgfortran/io/inquire.c
libgfortran/io/io.h
libgfortran/io/lock.c
libgfortran/io/open.c
libgfortran/io/rewind.c
libgfortran/io/transfer.c
libgfortran/libgfortran.h
libgfortran/m4/cshift1.m4
libgfortran/m4/dotprod.m4
libgfortran/m4/dotprodc.m4
libgfortran/m4/dotprodl.m4
libgfortran/m4/eoshift1.m4
libgfortran/m4/eoshift3.m4
libgfortran/m4/exponent.m4
libgfortran/m4/fraction.m4
libgfortran/m4/iforeach.m4
libgfortran/m4/ifunction.m4
libgfortran/m4/matmul.m4
libgfortran/m4/matmull.m4
libgfortran/m4/nearest.m4
libgfortran/m4/pow.m4
libgfortran/m4/reshape.m4
libgfortran/m4/set_exponent.m4
libgfortran/m4/shape.m4
libgfortran/m4/transpose.m4
libgfortran/runtime/environ.c
libgfortran/runtime/error.c
libgfortran/runtime/in_pack_generic.c
libgfortran/runtime/in_unpack_generic.c
libgfortran/runtime/main.c
libgfortran/runtime/memory.c
libgfortran/runtime/pause.c
libgfortran/runtime/select.c
libgfortran/runtime/stop.c

index 971b59d616928780dff400e1f22dfea8140b496d..83084aad13a0299e3065a8622e9d27a38730d7a4 100644 (file)
@@ -1,3 +1,40 @@
+2004-12-12  Richard Henderson  <rth@redhat.com>
+
+       * acinclude.m4 (LIBGFOR_CHECK_ATTRIBUTE_VISIBILITY): New.
+       (LIBGFOR_CHECK_ATTRIBUTE_DLLEXPORT): New.
+       (LIBGFOR_CHECK_ATTRIBUTE_ALIAS): New.
+       * configure.ac: Use them.
+       * configure, config.h.in, aclocal.m4: Rebuild.
+       * libgfortran.h (prefix): Remove.
+       (PREFIX, IPREFIX): New.
+       (sym_rename, sym_rename1, sym_rename2): New.
+       (internal_proto, export_proto, export_proto_np): New.
+       (iexport_proto, iexport): New.
+       (iexport_data_proto, iexport_data): New.
+       * intrinsics/abort.c, intrinsics/args.c, intrinsics/associated.c,
+       intrinsics/cpu_time.c, intrinsics/cshift0.c,
+       intrinsics/date_and_time.c, intrinsics/env.c, intrinsics/eoshift0.c,
+       intrinsics/eoshift2.c, intrinsics/etime.c, intrinsics/exit.c,
+       intrinsics/flush.c, intrinsics/fnum.c, intrinsics/getXid.c,
+       intrinsics/getcwd.c, intrinsics/ishftc.c, intrinsics/mvbits.c,
+       intrinsics/pack_generic.c, intrinsics/rand.c, intrinsics/random.c,
+       intrinsics/reshape_generic.c, intrinsics/size.c,
+       intrinsics/spread_generic.c, intrinsics/stat.c,
+       intrinsics/string_intrinsics.c, intrinsics/system.c,
+       intrinsics/system_clock.c, intrinsics/transpose_generic.c,
+       intrinsics/umask.c, intrinsics/unlink.c, intrinsics/unpack_generic.c,
+       io/backspace.c, io/close.c, io/endfile.c, io/inquire.c, io/io.h,
+       io/open.c, io/rewind.c, io/transfer.c, libgfortran.h, m4/cshift1.m4,
+       m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4,
+       m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/iforeach.m4,
+       m4/ifunction.m4, m4/matmul.m4, m4/matmull.m4, m4/nearest.m4,
+       m4/pow.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4,
+       m4/transpose.m4, runtime/environ.c, runtime/error.c,
+       runtime/in_pack_generic.c, runtime/in_unpack_generic.c,
+       runtime/main.c, runtime/memory.c, runtime/pause.c, runtime/select.c,
+       runtime/stop.c: Use them to mark symbols internal or external.
+       * generated/*: Rebuild.
+
 2004-12-09  David Edelsohn  <edelsohn@gnu.org>
 
        PR bootstrap/18895
index 87dc72283f98a3f7338a5ed3aed36e54d9168d10..2dc8f85e16b6019c0c8d6fccd8ecbbe5ec913909 100644 (file)
@@ -102,3 +102,49 @@ else
       [Define to 1 if the target is ILP32.])
   fi
   ])
+
+dnl Check whether the target supports hidden visibility.
+AC_DEFUN([LIBGFOR_CHECK_ATTRIBUTE_VISIBILITY], [
+  AC_CACHE_CHECK([whether the target supports hidden visibility],
+                have_attribute_visibility, [
+  save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -Werror"
+  AC_TRY_COMPILE([void __attribute__((visibility("hidden"))) foo(void) { }],
+                [], have_attribute_visibility=yes,
+                have_attribute_visibility=no)
+  CFLAGS="$save_CFLAGS"])
+  if test $have_attribute_visibility = yes; then
+    AC_DEFINE(HAVE_ATTRIBUTE_VISIBILITY, 1,
+      [Define to 1 if the target supports __attribute__((visibility(...))).])
+  fi])
+
+dnl Check whether the target supports dllexport
+AC_DEFUN([LIBGFOR_CHECK_ATTRIBUTE_DLLEXPORT], [
+  AC_CACHE_CHECK([whether the target supports dllexport],
+                have_attribute_dllexport, [
+  save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -Werror"
+  AC_TRY_COMPILE([void __attribute__((dllexport)) foo(void) { }],
+                [], have_attribute_dllexport=yes,
+                have_attribute_dllexport=no)
+  CFLAGS="$save_CFLAGS"])
+  if test $have_attribute_dllexport = yes; then
+    AC_DEFINE(HAVE_ATTRIBUTE_DLLEXPORT, 1,
+      [Define to 1 if the target supports __attribute__((dllexport)).])
+  fi])
+
+dnl Check whether the target supports symbol aliases.
+AC_DEFUN([LIBGFOR_CHECK_ATTRIBUTE_ALIAS], [
+  AC_CACHE_CHECK([whether the target supports symbol aliases],
+                have_attribute_alias, [
+  AC_TRY_LINK([
+#define ULP    STR1(__USER_LABEL_PREFIX__)
+#define STR1(x)        STR2(x)
+#define STR2(x)        #x
+void foo(void) { }
+extern void bar(void) __attribute__((alias(ULP "foo")));],
+    [bar();], have_attribute_alias=yes, have_attribute_alias=no)])
+  if test $have_attribute_alias = yes; then
+    AC_DEFINE(HAVE_ATTRIBUTE_ALIAS, 1,
+      [Define to 1 if the target supports __attribute__((alias(...))).])
+  fi])
index a705e84be28c13f23ae96112ebf3687c8859b5d8..b858c4ef01b17b09a40e472fe4bca453beeb4dd0 100644 (file)
 /* libm includes atanf */
 #undef HAVE_ATANF
 
+/* Define to 1 if the target supports __attribute__((alias(...))). */
+#undef HAVE_ATTRIBUTE_ALIAS
+
+/* Define to 1 if the target supports __attribute__((dllexport)). */
+#undef HAVE_ATTRIBUTE_DLLEXPORT
+
+/* Define to 1 if the target supports __attribute__((visibility(...))). */
+#undef HAVE_ATTRIBUTE_VISIBILITY
+
 /* libm includes ceilf */
 #undef HAVE_CEILF
 
index 485391dcab23108b4f25ce637494cd97d3157a9a..0a5c3f1344a3e836c761b439e3e837948115caf8 100755 (executable)
@@ -11291,6 +11291,211 @@ _ACEOF
   fi
 
 
+# Check out attribute support.
+
+  echo "$as_me:$LINENO: checking whether the target supports hidden visibility" >&5
+echo $ECHO_N "checking whether the target supports hidden visibility... $ECHO_C" >&6
+if test "${have_attribute_visibility+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+  save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -Werror"
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+void __attribute__((visibility("hidden"))) foo(void) { }
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  have_attribute_visibility=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+have_attribute_visibility=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS="$save_CFLAGS"
+fi
+echo "$as_me:$LINENO: result: $have_attribute_visibility" >&5
+echo "${ECHO_T}$have_attribute_visibility" >&6
+  if test $have_attribute_visibility = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATTRIBUTE_VISIBILITY 1
+_ACEOF
+
+  fi
+
+  echo "$as_me:$LINENO: checking whether the target supports dllexport" >&5
+echo $ECHO_N "checking whether the target supports dllexport... $ECHO_C" >&6
+if test "${have_attribute_dllexport+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+  save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -Werror"
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+void __attribute__((dllexport)) foo(void) { }
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  have_attribute_dllexport=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+have_attribute_dllexport=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS="$save_CFLAGS"
+fi
+echo "$as_me:$LINENO: result: $have_attribute_dllexport" >&5
+echo "${ECHO_T}$have_attribute_dllexport" >&6
+  if test $have_attribute_dllexport = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATTRIBUTE_DLLEXPORT 1
+_ACEOF
+
+  fi
+
+  echo "$as_me:$LINENO: checking whether the target supports symbol aliases" >&5
+echo $ECHO_N "checking whether the target supports symbol aliases... $ECHO_C" >&6
+if test "${have_attribute_alias+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#define ULP    STR1(__USER_LABEL_PREFIX__)
+#define STR1(x)        STR2(x)
+#define STR2(x)        #x
+void foo(void) { }
+extern void bar(void) __attribute__((alias(ULP "foo")));
+int
+main ()
+{
+bar();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  have_attribute_alias=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+have_attribute_alias=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $have_attribute_alias" >&5
+echo "${ECHO_T}$have_attribute_alias" >&6
+  if test $have_attribute_alias = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATTRIBUTE_ALIAS 1
+_ACEOF
+
+  fi
+
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
index 6fd3f50806984a18ff91efb5ad8a9264c7aa3e84..ab55097198892613e0a84c38452e313d26edbd0c 100644 (file)
@@ -234,6 +234,11 @@ LIBGFOR_GETTIMEOFDAY
 # have C99 integer types at all.
 LIBGFOR_TARGET_ILP32
 
+# Check out attribute support.
+LIBGFOR_CHECK_ATTRIBUTE_VISIBILITY
+LIBGFOR_CHECK_ATTRIBUTE_DLLEXPORT
+LIBGFOR_CHECK_ATTRIBUTE_ALIAS
+
 AC_CACHE_SAVE
 
 if test ${multilib} = yes; then
index 5a517c1c3302468e7de7b14d23562e0ec465bdc1..3c81520ae4994da9b6616cd1c1839b6f2b8978b1 100644 (file)
@@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+
+extern void __all_l4 (gfc_array_l4 *, gfc_array_l4 *, index_type *);
+export_proto_np(__all_l4);
+
 void
-__all_l4 (gfc_array_l4 * retarray, gfc_array_l4 *array, index_type *pdim)
+__all_l4 (gfc_array_l4 *retarray, gfc_array_l4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
index a58396381a5120cd514ff2ca96da568e360dbde7..c7a8df01b5d073c9affbab1dcece7d4dceb2e973 100644 (file)
@@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+
+extern void __all_l8 (gfc_array_l8 *, gfc_array_l8 *, index_type *);
+export_proto_np(__all_l8);
+
 void
-__all_l8 (gfc_array_l8 * retarray, gfc_array_l8 *array, index_type *pdim)
+__all_l8 (gfc_array_l8 *retarray, gfc_array_l8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
index 93beea72696f5cebf353dd3536ce2395009aa383..da3f2b7295d16cdd9240498dda0ea666d390b2aa 100644 (file)
@@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+
+extern void __any_l4 (gfc_array_l4 *, gfc_array_l4 *, index_type *);
+export_proto_np(__any_l4);
+
 void
-__any_l4 (gfc_array_l4 * retarray, gfc_array_l4 *array, index_type *pdim)
+__any_l4 (gfc_array_l4 *retarray, gfc_array_l4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
index bc0ede896a74f1e99e199eeff8a1a462ef9ec4e4..8258db932b9d35eaeeb8ffbeac58c35829eb1833 100644 (file)
@@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+
+extern void __any_l8 (gfc_array_l8 *, gfc_array_l8 *, index_type *);
+export_proto_np(__any_l8);
+
 void
-__any_l8 (gfc_array_l8 * retarray, gfc_array_l8 *array, index_type *pdim)
+__any_l8 (gfc_array_l8 *retarray, gfc_array_l8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
index 9c33c2e6d0d93399a45f4ee70dbe243d74ea54fa..0e3e29816474f625e5c44ce282ca5c0049c11581 100644 (file)
@@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+
+extern void __count_4_l4 (gfc_array_i4 *, gfc_array_l4 *, index_type *);
+export_proto_np(__count_4_l4);
+
 void
-__count_4_l4 (gfc_array_i4 * retarray, gfc_array_l4 *array, index_type *pdim)
+__count_4_l4 (gfc_array_i4 *retarray, gfc_array_l4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
index 288aa3ad706966727a9fd7b35010edea5188c414..7e9a376960cb9ced53853eab51741b047550f6df 100644 (file)
@@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+
+extern void __count_4_l8 (gfc_array_i4 *, gfc_array_l8 *, index_type *);
+export_proto_np(__count_4_l8);
+
 void
-__count_4_l8 (gfc_array_i4 * retarray, gfc_array_l8 *array, index_type *pdim)
+__count_4_l8 (gfc_array_i4 *retarray, gfc_array_l8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
index bf83d3e3c186a9e689150f399de0f6f1ee58c050..c23895b660102cd3cc89deafafce24d39fc2b6c5 100644 (file)
@@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+
+extern void __count_8_l4 (gfc_array_i8 *, gfc_array_l4 *, index_type *);
+export_proto_np(__count_8_l4);
+
 void
-__count_8_l4 (gfc_array_i8 * retarray, gfc_array_l4 *array, index_type *pdim)
+__count_8_l4 (gfc_array_i8 *retarray, gfc_array_l4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
index ef05c6db7b84315a41808adf944230b46b8a1533..1535af405614c0c1850e72ab558cc1e84c0af5f6 100644 (file)
@@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+
+extern void __count_8_l8 (gfc_array_i8 *, gfc_array_l8 *, index_type *);
+export_proto_np(__count_8_l8);
+
 void
-__count_8_l8 (gfc_array_i8 * retarray, gfc_array_l8 *array, index_type *pdim)
+__count_8_l8 (gfc_array_i8 *retarray, gfc_array_l8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
index 9375074db2abe692da7e25d980e0088b4209bfc9..9293eaeb209dcc66360723043900dc63fe084b07 100644 (file)
@@ -25,9 +25,15 @@ Boston, MA 02111-1307, USA.  */
 #include <string.h>
 #include "libgfortran.h"
 
+void __cshift1_4 (const gfc_array_char * ret,
+                            const gfc_array_char * array,
+                            const gfc_array_i4 * h, const GFC_INTEGER_4 * pwhich);
+export_proto_np(__cshift1_4);
+
 void
-__cshift1_4 (const gfc_array_char * ret, const gfc_array_char * array,
-    const gfc_array_i4 * h, const GFC_INTEGER_4 * pwhich)
+__cshift1_4 (const gfc_array_char * ret,
+                       const gfc_array_char * array,
+                       const gfc_array_i4 * h, const GFC_INTEGER_4 * pwhich)
 {
   /* r.* indicates the return array.  */
   index_type rstride[GFC_MAX_DIMENSIONS - 1];
@@ -41,7 +47,7 @@ __cshift1_4 (const gfc_array_char * ret, const gfc_array_char * array,
   index_type soffset;
   const char *sptr;
   const char *src;
-  /* h.* indicates the shift array.  */
+  /* h.* indicates the  array.  */
   index_type hstride[GFC_MAX_DIMENSIONS - 1];
   index_type hstride0;
   const GFC_INTEGER_4 *hptr;
@@ -70,7 +76,7 @@ __cshift1_4 (const gfc_array_char * ret, const gfc_array_char * array,
   size = GFC_DESCRIPTOR_SIZE (array);
   n = 0;
 
-/* Initialized for avoiding compiler warnings.  */
+  /* Initialized for avoiding compiler warnings.  */
   roffset = size;
   soffset = size;
   len = 0;
@@ -115,7 +121,7 @@ __cshift1_4 (const gfc_array_char * ret, const gfc_array_char * array,
 
   while (rptr)
     {
-      /* Do the shift for this dimension.  */
+      /* Do the  for this dimension.  */
       sh = *hptr;
       sh = (div (sh, len)).rem;
       if (sh < 0)
@@ -167,4 +173,3 @@ __cshift1_4 (const gfc_array_char * ret, const gfc_array_char * array,
         }
     }
 }
-
index 7303d56044026c3195719a9d9663320c343d6e24..803984f045b93e1a835babee1f08548b7287255b 100644 (file)
@@ -25,9 +25,15 @@ Boston, MA 02111-1307, USA.  */
 #include <string.h>
 #include "libgfortran.h"
 
+void __cshift1_8 (const gfc_array_char * ret,
+                            const gfc_array_char * array,
+                            const gfc_array_i8 * h, const GFC_INTEGER_8 * pwhich);
+export_proto_np(__cshift1_8);
+
 void
-__cshift1_8 (const gfc_array_char * ret, const gfc_array_char * array,
-    const gfc_array_i8 * h, const GFC_INTEGER_8 * pwhich)
+__cshift1_8 (const gfc_array_char * ret,
+                       const gfc_array_char * array,
+                       const gfc_array_i8 * h, const GFC_INTEGER_8 * pwhich)
 {
   /* r.* indicates the return array.  */
   index_type rstride[GFC_MAX_DIMENSIONS - 1];
@@ -41,7 +47,7 @@ __cshift1_8 (const gfc_array_char * ret, const gfc_array_char * array,
   index_type soffset;
   const char *sptr;
   const char *src;
-  /* h.* indicates the shift array.  */
+  /* h.* indicates the  array.  */
   index_type hstride[GFC_MAX_DIMENSIONS - 1];
   index_type hstride0;
   const GFC_INTEGER_8 *hptr;
@@ -70,7 +76,7 @@ __cshift1_8 (const gfc_array_char * ret, const gfc_array_char * array,
   size = GFC_DESCRIPTOR_SIZE (array);
   n = 0;
 
-/* Initialized for avoiding compiler warnings.  */
+  /* Initialized for avoiding compiler warnings.  */
   roffset = size;
   soffset = size;
   len = 0;
@@ -115,7 +121,7 @@ __cshift1_8 (const gfc_array_char * ret, const gfc_array_char * array,
 
   while (rptr)
     {
-      /* Do the shift for this dimension.  */
+      /* Do the  for this dimension.  */
       sh = *hptr;
       sh = (div (sh, len)).rem;
       if (sh < 0)
@@ -167,4 +173,3 @@ __cshift1_8 (const gfc_array_char * ret, const gfc_array_char * array,
         }
     }
 }
-
index 9812ab4e3c83ae774a447fcf34f848a3e379fc42..ff60a23601ccc2a65aa7a7d1179bf4be8b5b2436 100644 (file)
@@ -27,6 +27,9 @@ Boston, MA 02111-1307, USA.  */
 
 typedef GFC_ARRAY_DESCRIPTOR(GFC_MAX_DIMENSIONS, char) char_array;
 
+extern GFC_COMPLEX_4 __dot_product_c4 (gfc_array_c4 * a, gfc_array_c4 * b);
+export_proto_np(__dot_product_c4);
+
 /* Both parameters will already have been converted to the result type.  */
 GFC_COMPLEX_4
 __dot_product_c4 (gfc_array_c4 * a, gfc_array_c4 * b)
@@ -64,4 +67,3 @@ __dot_product_c4 (gfc_array_c4 * a, gfc_array_c4 * b)
 
   return res;
 }
-
index fde180214007bc87ebf3b722852751e61f8920b1..cf22c377cf624099b390eb621b0031c72e0dce31 100644 (file)
@@ -27,6 +27,9 @@ Boston, MA 02111-1307, USA.  */
 
 typedef GFC_ARRAY_DESCRIPTOR(GFC_MAX_DIMENSIONS, char) char_array;
 
+extern GFC_COMPLEX_8 __dot_product_c8 (gfc_array_c8 * a, gfc_array_c8 * b);
+export_proto_np(__dot_product_c8);
+
 /* Both parameters will already have been converted to the result type.  */
 GFC_COMPLEX_8
 __dot_product_c8 (gfc_array_c8 * a, gfc_array_c8 * b)
@@ -64,4 +67,3 @@ __dot_product_c8 (gfc_array_c8 * a, gfc_array_c8 * b)
 
   return res;
 }
-
index 374d9251300ec1053c74b691ab8e619f2c2e98ec..c0d67264c41acde2b32074ea0077e8381d1c1de1 100644 (file)
@@ -26,6 +26,9 @@ Boston, MA 02111-1307, USA.  */
 
 typedef GFC_ARRAY_DESCRIPTOR(GFC_MAX_DIMENSIONS, char) char_array;
 
+extern GFC_INTEGER_4 __dot_product_i4 (gfc_array_i4 * a, gfc_array_i4 * b);
+export_proto_np(__dot_product_i4);
+
 /* Both parameters will already have been converted to the result type.  */
 GFC_INTEGER_4
 __dot_product_i4 (gfc_array_i4 * a, gfc_array_i4 * b)
@@ -61,4 +64,3 @@ __dot_product_i4 (gfc_array_i4 * a, gfc_array_i4 * b)
 
   return res;
 }
-
index 6702a1d489c0fd975872db8af9effaa61a413f87..57224318f671f52d336dd84f4a87c3972e97d931 100644 (file)
@@ -26,6 +26,9 @@ Boston, MA 02111-1307, USA.  */
 
 typedef GFC_ARRAY_DESCRIPTOR(GFC_MAX_DIMENSIONS, char) char_array;
 
+extern GFC_INTEGER_8 __dot_product_i8 (gfc_array_i8 * a, gfc_array_i8 * b);
+export_proto_np(__dot_product_i8);
+
 /* Both parameters will already have been converted to the result type.  */
 GFC_INTEGER_8
 __dot_product_i8 (gfc_array_i8 * a, gfc_array_i8 * b)
@@ -61,4 +64,3 @@ __dot_product_i8 (gfc_array_i8 * a, gfc_array_i8 * b)
 
   return res;
 }
-
index 292c0386cd166eb01be74b2d31de6853422071ea..6248c9c5b2f27a5da50ceebd22bb48475bccf948 100644 (file)
@@ -24,6 +24,9 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+extern GFC_LOGICAL_4 __dot_product_l4 (gfc_array_l4 *, gfc_array_l4 *);
+export_proto_np(__dot_product_l4);
+
 GFC_LOGICAL_4
 __dot_product_l4 (gfc_array_l4 * a, gfc_array_l4 * b)
 {
@@ -71,4 +74,3 @@ __dot_product_l4 (gfc_array_l4 * a, gfc_array_l4 * b)
 
   return 0;
 }
-
index 4316607a3e5a66eecdb4e509126d9090d3c36eb3..708628883ada2cf93bfcdb913fa0330dd73a225d 100644 (file)
@@ -24,6 +24,9 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+extern GFC_LOGICAL_8 __dot_product_l8 (gfc_array_l4 *, gfc_array_l4 *);
+export_proto_np(__dot_product_l8);
+
 GFC_LOGICAL_8
 __dot_product_l8 (gfc_array_l4 * a, gfc_array_l4 * b)
 {
@@ -71,4 +74,3 @@ __dot_product_l8 (gfc_array_l4 * a, gfc_array_l4 * b)
 
   return 0;
 }
-
index 1edfea36e6e7742fb0e77e31bdbc2ffd53564745..801e43e808dd60235233810d637b2556c0ad6b40 100644 (file)
@@ -26,6 +26,9 @@ Boston, MA 02111-1307, USA.  */
 
 typedef GFC_ARRAY_DESCRIPTOR(GFC_MAX_DIMENSIONS, char) char_array;
 
+extern GFC_REAL_4 __dot_product_r4 (gfc_array_r4 * a, gfc_array_r4 * b);
+export_proto_np(__dot_product_r4);
+
 /* Both parameters will already have been converted to the result type.  */
 GFC_REAL_4
 __dot_product_r4 (gfc_array_r4 * a, gfc_array_r4 * b)
@@ -61,4 +64,3 @@ __dot_product_r4 (gfc_array_r4 * a, gfc_array_r4 * b)
 
   return res;
 }
-
index bf35710272b82362f8ae2bd4b71cf4f483fa6600..edde2b2a69b4f197bc76067352ebba5dea6050ac 100644 (file)
@@ -26,6 +26,9 @@ Boston, MA 02111-1307, USA.  */
 
 typedef GFC_ARRAY_DESCRIPTOR(GFC_MAX_DIMENSIONS, char) char_array;
 
+extern GFC_REAL_8 __dot_product_r8 (gfc_array_r8 * a, gfc_array_r8 * b);
+export_proto_np(__dot_product_r8);
+
 /* Both parameters will already have been converted to the result type.  */
 GFC_REAL_8
 __dot_product_r8 (gfc_array_r8 * a, gfc_array_r8 * b)
@@ -61,4 +64,3 @@ __dot_product_r8 (gfc_array_r8 * a, gfc_array_r8 * b)
 
   return res;
 }
-
index 05b1af682e032338824ae1ce7bf26b48d0cc9c96..aaccb54c0075946862dfe6ad8f74cdaf999eb58a 100644 (file)
@@ -28,9 +28,17 @@ Boston, MA 02111-1307, USA.  */
 static const char zeros[16] =
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 
+extern void __eoshift1_4 (const gfc_array_char *,
+                                    const gfc_array_char *,
+                                    const gfc_array_i4 *, const char *,
+                                    const GFC_INTEGER_4 *);
+export_proto_np(__eoshift1_4);
+
 void
-__eoshift1_4 (const gfc_array_char * ret, const gfc_array_char * array,
-    const gfc_array_i4 * h, const char * pbound, const GFC_INTEGER_4 * pwhich)
+__eoshift1_4 (const gfc_array_char *ret,
+                        const gfc_array_char *array,
+                        const gfc_array_i4 *h, const char *pbound,
+                        const GFC_INTEGER_4 *pwhich)
 {
   /* r.* indicates the return array.  */
   index_type rstride[GFC_MAX_DIMENSIONS - 1];
@@ -175,4 +183,3 @@ __eoshift1_4 (const gfc_array_char * ret, const gfc_array_char * array,
         }
     }
 }
-
index f74c022f178ab16db3721d093be0c1efc03266e8..3f37eb8f1876700930a3bb0d4c874a4b6996d876 100644 (file)
@@ -28,9 +28,17 @@ Boston, MA 02111-1307, USA.  */
 static const char zeros[16] =
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 
+extern void __eoshift1_8 (const gfc_array_char *,
+                                    const gfc_array_char *,
+                                    const gfc_array_i8 *, const char *,
+                                    const GFC_INTEGER_8 *);
+export_proto_np(__eoshift1_8);
+
 void
-__eoshift1_8 (const gfc_array_char * ret, const gfc_array_char * array,
-    const gfc_array_i8 * h, const char * pbound, const GFC_INTEGER_8 * pwhich)
+__eoshift1_8 (const gfc_array_char *ret,
+                        const gfc_array_char *array,
+                        const gfc_array_i8 *h, const char *pbound,
+                        const GFC_INTEGER_8 *pwhich)
 {
   /* r.* indicates the return array.  */
   index_type rstride[GFC_MAX_DIMENSIONS - 1];
@@ -175,4 +183,3 @@ __eoshift1_8 (const gfc_array_char * ret, const gfc_array_char * array,
         }
     }
 }
-
index 07c2d9e965e0607c31ceb478c45063e21d99ad80..7609b2e127d50d4f1b973411b118e59bd4b4bdbf 100644 (file)
@@ -28,9 +28,15 @@ Boston, MA 02111-1307, USA.  */
 static const char zeros[16] =
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 
+extern void __eoshift3_4 (gfc_array_char *, gfc_array_char *,
+                                    gfc_array_i4 *, const gfc_array_char *,
+                                    GFC_INTEGER_4 *);
+export_proto_np(__eoshift3_4);
+
 void
-__eoshift3_4 (gfc_array_char * ret, gfc_array_char * array,
-    gfc_array_i4 * h, const gfc_array_char * bound, GFC_INTEGER_4 * pwhich)
+__eoshift3_4 (gfc_array_char *ret, gfc_array_char *array,
+                        gfc_array_i4 *h, const gfc_array_char *bound,
+                        GFC_INTEGER_4 *pwhich)
 {
   /* r.* indicates the return array.  */
   index_type rstride[GFC_MAX_DIMENSIONS - 1];
@@ -190,4 +196,3 @@ __eoshift3_4 (gfc_array_char * ret, gfc_array_char * array,
         }
     }
 }
-
index fcb161df39a6e8f80ed74bb2cb8cce39463c90a3..3274bcec7ad33783728a65fcf8a8c475091dcfb7 100644 (file)
@@ -28,9 +28,15 @@ Boston, MA 02111-1307, USA.  */
 static const char zeros[16] =
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 
+extern void __eoshift3_8 (gfc_array_char *, gfc_array_char *,
+                                    gfc_array_i8 *, const gfc_array_char *,
+                                    GFC_INTEGER_8 *);
+export_proto_np(__eoshift3_8);
+
 void
-__eoshift3_8 (gfc_array_char * ret, gfc_array_char * array,
-    gfc_array_i8 * h, const gfc_array_char * bound, GFC_INTEGER_8 * pwhich)
+__eoshift3_8 (gfc_array_char *ret, gfc_array_char *array,
+                        gfc_array_i8 *h, const gfc_array_char *bound,
+                        GFC_INTEGER_8 *pwhich)
 {
   /* r.* indicates the return array.  */
   index_type rstride[GFC_MAX_DIMENSIONS - 1];
@@ -190,4 +196,3 @@ __eoshift3_8 (gfc_array_char * ret, gfc_array_char * array,
         }
     }
 }
-
index 34e76b65edb1240361142d0f1d2a379527d0fb9e..70c376c952bef74e36b0cdcdf68f13168d80a945 100644 (file)
@@ -22,8 +22,11 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+extern GFC_INTEGER_4 exponent_r4 (GFC_REAL_4 s);
+export_proto(exponent_r4);
+
 GFC_INTEGER_4
-prefix(exponent_r4) (GFC_REAL_4 s)
+exponent_r4 (GFC_REAL_4 s)
 {
   int ret;
   frexpf (s, &ret);
index 8a4101efd669f575310d68b6c328b7e610b327b2..9d5492017a408df8213187ac352443b20c37199d 100644 (file)
@@ -22,8 +22,11 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+extern GFC_INTEGER_4 exponent_r8 (GFC_REAL_8 s);
+export_proto(exponent_r8);
+
 GFC_INTEGER_4
-prefix(exponent_r8) (GFC_REAL_8 s)
+exponent_r8 (GFC_REAL_8 s)
 {
   int ret;
   frexp (s, &ret);
index a86e8292c7176564729e654c35544ba0ed918632..273239a96d4f9f52ba00fa0c03ee0a306ed77b57 100644 (file)
@@ -22,8 +22,11 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+extern GFC_REAL_4 fraction_r4 (GFC_REAL_4 s);
+export_proto(fraction_r4);
+
 GFC_REAL_4
-prefix(fraction_r4) (GFC_REAL_4 s)
+fraction_r4 (GFC_REAL_4 s)
 {
   int dummy_exp;
   return frexpf (s, &dummy_exp);
index 613c6ac702cd072a6ba04e50929a11085a235bed..b7600bfd604b1c7a3de5cc857f5223f58eea997d 100644 (file)
@@ -22,8 +22,11 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+extern GFC_REAL_8 fraction_r8 (GFC_REAL_8 s);
+export_proto(fraction_r8);
+
 GFC_REAL_8
-prefix(fraction_r8) (GFC_REAL_8 s)
+fraction_r8 (GFC_REAL_8 s)
 {
   int dummy_exp;
   return frexp (s, &dummy_exp);
index 19e4f239cca4318ba7307ee237d64c01bb894b8f..a05a3219fba8f7ea4ecbdb76f65f8eb5cb6af613 100644 (file)
@@ -37,6 +37,9 @@ Boston, MA 02111-1307, USA.  */
          C(I,J) = C(I,J)+A(I,K)*B(K,J)
 */
 
+extern void __matmul_c4 (gfc_array_c4 * retarray, gfc_array_c4 * a, gfc_array_c4 * b);
+export_proto_np(__matmul_c4);
+
 void
 __matmul_c4 (gfc_array_c4 * retarray, gfc_array_c4 * a, gfc_array_c4 * b)
 {
index fb422cba5f40f4e04f966e1fd06a08ee17f893b1..42833b9f6c184a7c3f39d297160bd3121ea3ef1c 100644 (file)
@@ -37,6 +37,9 @@ Boston, MA 02111-1307, USA.  */
          C(I,J) = C(I,J)+A(I,K)*B(K,J)
 */
 
+extern void __matmul_c8 (gfc_array_c8 * retarray, gfc_array_c8 * a, gfc_array_c8 * b);
+export_proto_np(__matmul_c8);
+
 void
 __matmul_c8 (gfc_array_c8 * retarray, gfc_array_c8 * a, gfc_array_c8 * b)
 {
index e5f534a169d0cd40f2dd601ea676a3bf107de0b6..de8a9199d71c2aed1bd050eb0f5d57da7cd5ab90 100644 (file)
@@ -37,6 +37,9 @@ Boston, MA 02111-1307, USA.  */
          C(I,J) = C(I,J)+A(I,K)*B(K,J)
 */
 
+extern void __matmul_i4 (gfc_array_i4 * retarray, gfc_array_i4 * a, gfc_array_i4 * b);
+export_proto_np(__matmul_i4);
+
 void
 __matmul_i4 (gfc_array_i4 * retarray, gfc_array_i4 * a, gfc_array_i4 * b)
 {
index 88bbf7a33885bb021991b6a858612aac054c771a..b4831e22bd9bfeffe917e6c31eaf33efa36e9967 100644 (file)
@@ -37,6 +37,9 @@ Boston, MA 02111-1307, USA.  */
          C(I,J) = C(I,J)+A(I,K)*B(K,J)
 */
 
+extern void __matmul_i8 (gfc_array_i8 * retarray, gfc_array_i8 * a, gfc_array_i8 * b);
+export_proto_np(__matmul_i8);
+
 void
 __matmul_i8 (gfc_array_i8 * retarray, gfc_array_i8 * a, gfc_array_i8 * b)
 {
index 1af2eb0c6f8c9725a938d8613e1e36ce52f3aaba..491392b7d951f5f4e7ae1d43e772086b789ba5ee 100644 (file)
@@ -26,6 +26,10 @@ Boston, MA 02111-1307, USA.  */
 
 /* Dimensions: retarray(x,y) a(x, count) b(count,y).
    Either a or b can be rank 1.  In this case x or y is 1.  */
+
+extern void __matmul_l4 (gfc_array_l4 *, gfc_array_l4 *, gfc_array_l4 *);
+export_proto_np(__matmul_l4);
+
 void
 __matmul_l4 (gfc_array_l4 * retarray, gfc_array_l4 * a, gfc_array_l4 * b)
 {
index d6d85a1e2883cf367006dee474bccb43e554ad84..2a479e7bbd43addda45f59836295095eebebe174 100644 (file)
@@ -26,6 +26,10 @@ Boston, MA 02111-1307, USA.  */
 
 /* Dimensions: retarray(x,y) a(x, count) b(count,y).
    Either a or b can be rank 1.  In this case x or y is 1.  */
+
+extern void __matmul_l8 (gfc_array_l8 *, gfc_array_l4 *, gfc_array_l4 *);
+export_proto_np(__matmul_l8);
+
 void
 __matmul_l8 (gfc_array_l8 * retarray, gfc_array_l4 * a, gfc_array_l4 * b)
 {
index 91417ccd1cd9e6dd01c521ae681082655e9f4f18..b12a8a4871904f385fcd4f781562fb36ba31b290 100644 (file)
@@ -37,6 +37,9 @@ Boston, MA 02111-1307, USA.  */
          C(I,J) = C(I,J)+A(I,K)*B(K,J)
 */
 
+extern void __matmul_r4 (gfc_array_r4 * retarray, gfc_array_r4 * a, gfc_array_r4 * b);
+export_proto_np(__matmul_r4);
+
 void
 __matmul_r4 (gfc_array_r4 * retarray, gfc_array_r4 * a, gfc_array_r4 * b)
 {
index 2fc3fed4be39b0e279270495c7e5712ee5499f04..b0c45c0726ad88b36b4165dee4d6c6bdf43c7daf 100644 (file)
@@ -37,6 +37,9 @@ Boston, MA 02111-1307, USA.  */
          C(I,J) = C(I,J)+A(I,K)*B(K,J)
 */
 
+extern void __matmul_r8 (gfc_array_r8 * retarray, gfc_array_r8 * a, gfc_array_r8 * b);
+export_proto_np(__matmul_r8);
+
 void
 __matmul_r8 (gfc_array_r8 * retarray, gfc_array_r8 * a, gfc_array_r8 * b)
 {
index b55da1f614f382debcc6c44a073311b43a3218fa..aa7d42841f6349384d1d91c2225048796f7d28d0 100644 (file)
@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+
+extern void __maxloc0_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array);
+export_proto_np(__maxloc0_4_i4);
+
 void
 __maxloc0_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array)
 {
@@ -117,6 +121,10 @@ __maxloc0_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array)
   }
 }
 
+
+extern void __mmaxloc0_4_i4 (gfc_array_i4 *, gfc_array_i4 *, gfc_array_l4 *);
+export_proto_np(__mmaxloc0_4_i4);
+
 void
 __mmaxloc0_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, gfc_array_l4 * mask)
 {
index 36c0ef59705c7a7a91ec5627d84fd0eabb0fb879..100910eec09dbd5a851ba00c79ce54331d918358 100644 (file)
@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+
+extern void __maxloc0_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array);
+export_proto_np(__maxloc0_4_i8);
+
 void
 __maxloc0_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array)
 {
@@ -117,6 +121,10 @@ __maxloc0_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array)
   }
 }
 
+
+extern void __mmaxloc0_4_i8 (gfc_array_i4 *, gfc_array_i8 *, gfc_array_l4 *);
+export_proto_np(__mmaxloc0_4_i8);
+
 void
 __mmaxloc0_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array, gfc_array_l4 * mask)
 {
index 40f58cc3340b76f2a9a6fc047481c263717eecfc..0b75c05aa3f92b26118fd4e621412beabb17f715 100644 (file)
@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+
+extern void __maxloc0_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array);
+export_proto_np(__maxloc0_4_r4);
+
 void
 __maxloc0_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array)
 {
@@ -117,6 +121,10 @@ __maxloc0_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array)
   }
 }
 
+
+extern void __mmaxloc0_4_r4 (gfc_array_i4 *, gfc_array_r4 *, gfc_array_l4 *);
+export_proto_np(__mmaxloc0_4_r4);
+
 void
 __mmaxloc0_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array, gfc_array_l4 * mask)
 {
index ebb6020158628dbf3f0f2c2e71c50875b92e43a3..1463d8062ce7c929cfcafc1c54f9f3344b014978 100644 (file)
@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+
+extern void __maxloc0_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array);
+export_proto_np(__maxloc0_4_r8);
+
 void
 __maxloc0_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array)
 {
@@ -117,6 +121,10 @@ __maxloc0_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array)
   }
 }
 
+
+extern void __mmaxloc0_4_r8 (gfc_array_i4 *, gfc_array_r8 *, gfc_array_l4 *);
+export_proto_np(__mmaxloc0_4_r8);
+
 void
 __mmaxloc0_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array, gfc_array_l4 * mask)
 {
index 335a3290604fbbbed18dcc1b567f8b381f8ff004..822ddd06d346847eaffba2ff054bbb697c382f73 100644 (file)
@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+
+extern void __maxloc0_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array);
+export_proto_np(__maxloc0_8_i4);
+
 void
 __maxloc0_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array)
 {
@@ -117,6 +121,10 @@ __maxloc0_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array)
   }
 }
 
+
+extern void __mmaxloc0_8_i4 (gfc_array_i8 *, gfc_array_i4 *, gfc_array_l4 *);
+export_proto_np(__mmaxloc0_8_i4);
+
 void
 __mmaxloc0_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array, gfc_array_l4 * mask)
 {
index 5bee14af5d32699e89479526a9a756c0679e33e0..8a4ed813fb800c91741cf51dbb389fd976b91f3a 100644 (file)
@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+
+extern void __maxloc0_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array);
+export_proto_np(__maxloc0_8_i8);
+
 void
 __maxloc0_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array)
 {
@@ -117,6 +121,10 @@ __maxloc0_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array)
   }
 }
 
+
+extern void __mmaxloc0_8_i8 (gfc_array_i8 *, gfc_array_i8 *, gfc_array_l4 *);
+export_proto_np(__mmaxloc0_8_i8);
+
 void
 __mmaxloc0_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, gfc_array_l4 * mask)
 {
index 7839e51249c27b5420df23d78ab85b084504e2c5..73a3e2d75b17805aca9552c7ce28298ab9243e24 100644 (file)
@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+
+extern void __maxloc0_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array);
+export_proto_np(__maxloc0_8_r4);
+
 void
 __maxloc0_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array)
 {
@@ -117,6 +121,10 @@ __maxloc0_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array)
   }
 }
 
+
+extern void __mmaxloc0_8_r4 (gfc_array_i8 *, gfc_array_r4 *, gfc_array_l4 *);
+export_proto_np(__mmaxloc0_8_r4);
+
 void
 __mmaxloc0_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array, gfc_array_l4 * mask)
 {
index 088d89c177e7b653409b17875e681d413bb43fab..cc3e8d5dc2e87c255f4b6dd38c13fef705d1f008 100644 (file)
@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+
+extern void __maxloc0_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array);
+export_proto_np(__maxloc0_8_r8);
+
 void
 __maxloc0_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array)
 {
@@ -117,6 +121,10 @@ __maxloc0_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array)
   }
 }
 
+
+extern void __mmaxloc0_8_r8 (gfc_array_i8 *, gfc_array_r8 *, gfc_array_l4 *);
+export_proto_np(__mmaxloc0_8_r8);
+
 void
 __mmaxloc0_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array, gfc_array_l4 * mask)
 {
index 2369e77cc8b6a8aaf65871e9ff05a3924323b087..7905c017934a1e73483673f83dfd14d2bd0ecb62 100644 (file)
@@ -26,8 +26,12 @@ Boston, MA 02111-1307, USA.  */
 #include <limits.h>
 #include "libgfortran.h"
 
+
+extern void __maxloc1_4_i4 (gfc_array_i4 *, gfc_array_i4 *, index_type *);
+export_proto_np(__maxloc1_4_i4);
+
 void
-__maxloc1_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, index_type *pdim)
+__maxloc1_4_i4 (gfc_array_i4 *retarray, gfc_array_i4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -152,6 +156,11 @@ __maxloc1_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, index_type *pdim)
     }
 }
 
+
+extern void __mmaxloc1_4_i4 (gfc_array_i4 *, gfc_array_i4 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mmaxloc1_4_i4);
+
 void
 __mmaxloc1_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 36860c2ea0ca869545843d1a5f4eb3a00c35c592..a08cb037b53e4005dff35dc5dad90e9e7c6dad9b 100644 (file)
@@ -26,8 +26,12 @@ Boston, MA 02111-1307, USA.  */
 #include <limits.h>
 #include "libgfortran.h"
 
+
+extern void __maxloc1_4_i8 (gfc_array_i4 *, gfc_array_i8 *, index_type *);
+export_proto_np(__maxloc1_4_i8);
+
 void
-__maxloc1_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array, index_type *pdim)
+__maxloc1_4_i8 (gfc_array_i4 *retarray, gfc_array_i8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -152,6 +156,11 @@ __maxloc1_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array, index_type *pdim)
     }
 }
 
+
+extern void __mmaxloc1_4_i8 (gfc_array_i4 *, gfc_array_i8 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mmaxloc1_4_i8);
+
 void
 __mmaxloc1_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 6d550d55149a4dbc0a44a20eb6a60aac6cfbb2ba..5c5c3af2cc00ff06aae5f820b15ca56e3b1bf8fa 100644 (file)
@@ -26,8 +26,12 @@ Boston, MA 02111-1307, USA.  */
 #include <limits.h>
 #include "libgfortran.h"
 
+
+extern void __maxloc1_4_r4 (gfc_array_i4 *, gfc_array_r4 *, index_type *);
+export_proto_np(__maxloc1_4_r4);
+
 void
-__maxloc1_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array, index_type *pdim)
+__maxloc1_4_r4 (gfc_array_i4 *retarray, gfc_array_r4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -152,6 +156,11 @@ __maxloc1_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array, index_type *pdim)
     }
 }
 
+
+extern void __mmaxloc1_4_r4 (gfc_array_i4 *, gfc_array_r4 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mmaxloc1_4_r4);
+
 void
 __mmaxloc1_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 07a9ecad815eb36c1542dbeb5635b0196e266504..665c5b5dcaf303d49e98143bb7a308006f6cc59e 100644 (file)
@@ -26,8 +26,12 @@ Boston, MA 02111-1307, USA.  */
 #include <limits.h>
 #include "libgfortran.h"
 
+
+extern void __maxloc1_4_r8 (gfc_array_i4 *, gfc_array_r8 *, index_type *);
+export_proto_np(__maxloc1_4_r8);
+
 void
-__maxloc1_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array, index_type *pdim)
+__maxloc1_4_r8 (gfc_array_i4 *retarray, gfc_array_r8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -152,6 +156,11 @@ __maxloc1_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array, index_type *pdim)
     }
 }
 
+
+extern void __mmaxloc1_4_r8 (gfc_array_i4 *, gfc_array_r8 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mmaxloc1_4_r8);
+
 void
 __mmaxloc1_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 79142592cfb420e4ab600ff0b1ec933a4faec34b..dc11e701bb5536fe89015dd8bcd9f37a99cc0bee 100644 (file)
@@ -26,8 +26,12 @@ Boston, MA 02111-1307, USA.  */
 #include <limits.h>
 #include "libgfortran.h"
 
+
+extern void __maxloc1_8_i4 (gfc_array_i8 *, gfc_array_i4 *, index_type *);
+export_proto_np(__maxloc1_8_i4);
+
 void
-__maxloc1_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array, index_type *pdim)
+__maxloc1_8_i4 (gfc_array_i8 *retarray, gfc_array_i4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -152,6 +156,11 @@ __maxloc1_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array, index_type *pdim)
     }
 }
 
+
+extern void __mmaxloc1_8_i4 (gfc_array_i8 *, gfc_array_i4 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mmaxloc1_8_i4);
+
 void
 __mmaxloc1_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 46a7561089ad3f984ec0af567e7e8da367733bf9..68dd21f049198c8d78b79ca36e219bd908dbe5ac 100644 (file)
@@ -26,8 +26,12 @@ Boston, MA 02111-1307, USA.  */
 #include <limits.h>
 #include "libgfortran.h"
 
+
+extern void __maxloc1_8_i8 (gfc_array_i8 *, gfc_array_i8 *, index_type *);
+export_proto_np(__maxloc1_8_i8);
+
 void
-__maxloc1_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, index_type *pdim)
+__maxloc1_8_i8 (gfc_array_i8 *retarray, gfc_array_i8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -152,6 +156,11 @@ __maxloc1_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, index_type *pdim)
     }
 }
 
+
+extern void __mmaxloc1_8_i8 (gfc_array_i8 *, gfc_array_i8 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mmaxloc1_8_i8);
+
 void
 __mmaxloc1_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 1ab1be85a959769b4ed8de2de43372cc371c75b1..adeac9a35a5a23302760c287edee3b63d4ac78c8 100644 (file)
@@ -26,8 +26,12 @@ Boston, MA 02111-1307, USA.  */
 #include <limits.h>
 #include "libgfortran.h"
 
+
+extern void __maxloc1_8_r4 (gfc_array_i8 *, gfc_array_r4 *, index_type *);
+export_proto_np(__maxloc1_8_r4);
+
 void
-__maxloc1_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array, index_type *pdim)
+__maxloc1_8_r4 (gfc_array_i8 *retarray, gfc_array_r4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -152,6 +156,11 @@ __maxloc1_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array, index_type *pdim)
     }
 }
 
+
+extern void __mmaxloc1_8_r4 (gfc_array_i8 *, gfc_array_r4 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mmaxloc1_8_r4);
+
 void
 __mmaxloc1_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index b221baae4c3da02fdc244cca1d2755c433f93da0..82e754c36e434e13718c20bb5992959fd675b530 100644 (file)
@@ -26,8 +26,12 @@ Boston, MA 02111-1307, USA.  */
 #include <limits.h>
 #include "libgfortran.h"
 
+
+extern void __maxloc1_8_r8 (gfc_array_i8 *, gfc_array_r8 *, index_type *);
+export_proto_np(__maxloc1_8_r8);
+
 void
-__maxloc1_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array, index_type *pdim)
+__maxloc1_8_r8 (gfc_array_i8 *retarray, gfc_array_r8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -152,6 +156,11 @@ __maxloc1_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array, index_type *pdim)
     }
 }
 
+
+extern void __mmaxloc1_8_r8 (gfc_array_i8 *, gfc_array_r8 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mmaxloc1_8_r8);
+
 void
 __mmaxloc1_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 8d37dfee18aad72332de1b79f8593ef852963859..f24735c796b56b268834d26fe8e2448524d83da6 100644 (file)
@@ -25,8 +25,12 @@ Boston, MA 02111-1307, USA.  */
 #include <float.h>
 #include "libgfortran.h"
 
+
+extern void __maxval_i4 (gfc_array_i4 *, gfc_array_i4 *, index_type *);
+export_proto_np(__maxval_i4);
+
 void
-__maxval_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, index_type *pdim)
+__maxval_i4 (gfc_array_i4 *retarray, gfc_array_i4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -146,6 +150,11 @@ __maxval_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, index_type *pdim)
     }
 }
 
+
+extern void __mmaxval_i4 (gfc_array_i4 *, gfc_array_i4 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mmaxval_i4);
+
 void
 __mmaxval_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index bdb33c9ce656afd78108911d6243f19e663ad04a..e9ef4ecb330a26981afc01d64beb8818566fc503 100644 (file)
@@ -25,8 +25,12 @@ Boston, MA 02111-1307, USA.  */
 #include <float.h>
 #include "libgfortran.h"
 
+
+extern void __maxval_i8 (gfc_array_i8 *, gfc_array_i8 *, index_type *);
+export_proto_np(__maxval_i8);
+
 void
-__maxval_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, index_type *pdim)
+__maxval_i8 (gfc_array_i8 *retarray, gfc_array_i8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -146,6 +150,11 @@ __maxval_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, index_type *pdim)
     }
 }
 
+
+extern void __mmaxval_i8 (gfc_array_i8 *, gfc_array_i8 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mmaxval_i8);
+
 void
 __mmaxval_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 78e83dcbe78598166ba3faa31ed087d7201bd7f4..7339490bc5a7902417b1a560c61ab6b699e812a4 100644 (file)
@@ -25,8 +25,12 @@ Boston, MA 02111-1307, USA.  */
 #include <float.h>
 #include "libgfortran.h"
 
+
+extern void __maxval_r4 (gfc_array_r4 *, gfc_array_r4 *, index_type *);
+export_proto_np(__maxval_r4);
+
 void
-__maxval_r4 (gfc_array_r4 * retarray, gfc_array_r4 *array, index_type *pdim)
+__maxval_r4 (gfc_array_r4 *retarray, gfc_array_r4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -146,6 +150,11 @@ __maxval_r4 (gfc_array_r4 * retarray, gfc_array_r4 *array, index_type *pdim)
     }
 }
 
+
+extern void __mmaxval_r4 (gfc_array_r4 *, gfc_array_r4 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mmaxval_r4);
+
 void
 __mmaxval_r4 (gfc_array_r4 * retarray, gfc_array_r4 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index e3c74539aed0635e9d929ecea4e82756951f0a86..cbc1fc9ca61884c3e550185c8723d0ffbbf92c94 100644 (file)
@@ -25,8 +25,12 @@ Boston, MA 02111-1307, USA.  */
 #include <float.h>
 #include "libgfortran.h"
 
+
+extern void __maxval_r8 (gfc_array_r8 *, gfc_array_r8 *, index_type *);
+export_proto_np(__maxval_r8);
+
 void
-__maxval_r8 (gfc_array_r8 * retarray, gfc_array_r8 *array, index_type *pdim)
+__maxval_r8 (gfc_array_r8 *retarray, gfc_array_r8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -146,6 +150,11 @@ __maxval_r8 (gfc_array_r8 * retarray, gfc_array_r8 *array, index_type *pdim)
     }
 }
 
+
+extern void __mmaxval_r8 (gfc_array_r8 *, gfc_array_r8 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mmaxval_r8);
+
 void
 __mmaxval_r8 (gfc_array_r8 * retarray, gfc_array_r8 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index c12eea0261deda0bbd1d893cf5917013eaeaad63..c377498aeb8c19d1d0175da8ea5fdde58893c11f 100644 (file)
@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+
+extern void __minloc0_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array);
+export_proto_np(__minloc0_4_i4);
+
 void
 __minloc0_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array)
 {
@@ -117,6 +121,10 @@ __minloc0_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array)
   }
 }
 
+
+extern void __mminloc0_4_i4 (gfc_array_i4 *, gfc_array_i4 *, gfc_array_l4 *);
+export_proto_np(__mminloc0_4_i4);
+
 void
 __mminloc0_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, gfc_array_l4 * mask)
 {
index 94842a3704e3499428eecd8cb126e90341f00cf5..56fd2618109e503973009d416cae8965b26f6f09 100644 (file)
@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+
+extern void __minloc0_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array);
+export_proto_np(__minloc0_4_i8);
+
 void
 __minloc0_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array)
 {
@@ -117,6 +121,10 @@ __minloc0_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array)
   }
 }
 
+
+extern void __mminloc0_4_i8 (gfc_array_i4 *, gfc_array_i8 *, gfc_array_l4 *);
+export_proto_np(__mminloc0_4_i8);
+
 void
 __mminloc0_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array, gfc_array_l4 * mask)
 {
index 9ed52c32718d70e739b0f4cc46f8a89e3e740b0a..30b5b1ddde133b9a7973c97c55f8844a77439842 100644 (file)
@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+
+extern void __minloc0_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array);
+export_proto_np(__minloc0_4_r4);
+
 void
 __minloc0_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array)
 {
@@ -117,6 +121,10 @@ __minloc0_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array)
   }
 }
 
+
+extern void __mminloc0_4_r4 (gfc_array_i4 *, gfc_array_r4 *, gfc_array_l4 *);
+export_proto_np(__mminloc0_4_r4);
+
 void
 __mminloc0_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array, gfc_array_l4 * mask)
 {
index 186b49382b67ff57953ba03ede95b07154b3dede..8a4267d653a60e052c7b937f51e0d932305635e4 100644 (file)
@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+
+extern void __minloc0_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array);
+export_proto_np(__minloc0_4_r8);
+
 void
 __minloc0_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array)
 {
@@ -117,6 +121,10 @@ __minloc0_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array)
   }
 }
 
+
+extern void __mminloc0_4_r8 (gfc_array_i4 *, gfc_array_r8 *, gfc_array_l4 *);
+export_proto_np(__mminloc0_4_r8);
+
 void
 __mminloc0_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array, gfc_array_l4 * mask)
 {
index 962ee836255fac224329d2ae276efc82e1c0d1d2..6d7cb9c4d633417a4ba728b6f1e3ceaac4c37cc2 100644 (file)
@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+
+extern void __minloc0_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array);
+export_proto_np(__minloc0_8_i4);
+
 void
 __minloc0_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array)
 {
@@ -117,6 +121,10 @@ __minloc0_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array)
   }
 }
 
+
+extern void __mminloc0_8_i4 (gfc_array_i8 *, gfc_array_i4 *, gfc_array_l4 *);
+export_proto_np(__mminloc0_8_i4);
+
 void
 __mminloc0_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array, gfc_array_l4 * mask)
 {
index e13a4280d0b041a35cf3db076dbdc0dca99ea756..87d6705ae4ab9a23f5230ee7784f53b1d08ca1d1 100644 (file)
@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+
+extern void __minloc0_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array);
+export_proto_np(__minloc0_8_i8);
+
 void
 __minloc0_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array)
 {
@@ -117,6 +121,10 @@ __minloc0_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array)
   }
 }
 
+
+extern void __mminloc0_8_i8 (gfc_array_i8 *, gfc_array_i8 *, gfc_array_l4 *);
+export_proto_np(__mminloc0_8_i8);
+
 void
 __mminloc0_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, gfc_array_l4 * mask)
 {
index cb9ade8db180a9f78979b0fa57b6d59fd4823e4b..660a763477964aeafc1501cd2ed2ded5cc77160f 100644 (file)
@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+
+extern void __minloc0_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array);
+export_proto_np(__minloc0_8_r4);
+
 void
 __minloc0_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array)
 {
@@ -117,6 +121,10 @@ __minloc0_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array)
   }
 }
 
+
+extern void __mminloc0_8_r4 (gfc_array_i8 *, gfc_array_r4 *, gfc_array_l4 *);
+export_proto_np(__mminloc0_8_r4);
+
 void
 __mminloc0_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array, gfc_array_l4 * mask)
 {
index cf19f44fbb25473da45cf4c70c2385149b8055a7..b8c83035ab5c2cada78b72e2cb72acc925c1779f 100644 (file)
@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+
+extern void __minloc0_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array);
+export_proto_np(__minloc0_8_r8);
+
 void
 __minloc0_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array)
 {
@@ -117,6 +121,10 @@ __minloc0_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array)
   }
 }
 
+
+extern void __mminloc0_8_r8 (gfc_array_i8 *, gfc_array_r8 *, gfc_array_l4 *);
+export_proto_np(__mminloc0_8_r8);
+
 void
 __mminloc0_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array, gfc_array_l4 * mask)
 {
index ce739168dfcf6f8ceaa52d1c3c131f019efede59..eaf4212cd265c95b838727395aa5f08260726a94 100644 (file)
@@ -26,8 +26,12 @@ Boston, MA 02111-1307, USA.  */
 #include <limits.h>
 #include "libgfortran.h"
 
+
+extern void __minloc1_4_i4 (gfc_array_i4 *, gfc_array_i4 *, index_type *);
+export_proto_np(__minloc1_4_i4);
+
 void
-__minloc1_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, index_type *pdim)
+__minloc1_4_i4 (gfc_array_i4 *retarray, gfc_array_i4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -152,6 +156,11 @@ __minloc1_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, index_type *pdim)
     }
 }
 
+
+extern void __mminloc1_4_i4 (gfc_array_i4 *, gfc_array_i4 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mminloc1_4_i4);
+
 void
 __mminloc1_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 55a249beacb4eb52ae85076927d1f7c668ba5a1e..0ea3802a5ab5a9335ee5a2c494aae85caa3c3c7a 100644 (file)
@@ -26,8 +26,12 @@ Boston, MA 02111-1307, USA.  */
 #include <limits.h>
 #include "libgfortran.h"
 
+
+extern void __minloc1_4_i8 (gfc_array_i4 *, gfc_array_i8 *, index_type *);
+export_proto_np(__minloc1_4_i8);
+
 void
-__minloc1_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array, index_type *pdim)
+__minloc1_4_i8 (gfc_array_i4 *retarray, gfc_array_i8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -152,6 +156,11 @@ __minloc1_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array, index_type *pdim)
     }
 }
 
+
+extern void __mminloc1_4_i8 (gfc_array_i4 *, gfc_array_i8 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mminloc1_4_i8);
+
 void
 __mminloc1_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 50adeb33cba949fee55cd23bdc4188219c85692c..3336f0fbfb41081002ad22cce82064269bd1cd75 100644 (file)
@@ -26,8 +26,12 @@ Boston, MA 02111-1307, USA.  */
 #include <limits.h>
 #include "libgfortran.h"
 
+
+extern void __minloc1_4_r4 (gfc_array_i4 *, gfc_array_r4 *, index_type *);
+export_proto_np(__minloc1_4_r4);
+
 void
-__minloc1_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array, index_type *pdim)
+__minloc1_4_r4 (gfc_array_i4 *retarray, gfc_array_r4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -152,6 +156,11 @@ __minloc1_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array, index_type *pdim)
     }
 }
 
+
+extern void __mminloc1_4_r4 (gfc_array_i4 *, gfc_array_r4 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mminloc1_4_r4);
+
 void
 __mminloc1_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index aafb578cc2ef0638ebb7e2ea0a9d9c2b712a88d2..bb59dccd77d2337792ac8c4d2f022677c7e45f22 100644 (file)
@@ -26,8 +26,12 @@ Boston, MA 02111-1307, USA.  */
 #include <limits.h>
 #include "libgfortran.h"
 
+
+extern void __minloc1_4_r8 (gfc_array_i4 *, gfc_array_r8 *, index_type *);
+export_proto_np(__minloc1_4_r8);
+
 void
-__minloc1_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array, index_type *pdim)
+__minloc1_4_r8 (gfc_array_i4 *retarray, gfc_array_r8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -152,6 +156,11 @@ __minloc1_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array, index_type *pdim)
     }
 }
 
+
+extern void __mminloc1_4_r8 (gfc_array_i4 *, gfc_array_r8 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mminloc1_4_r8);
+
 void
 __mminloc1_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 5c347dd12b58762d4b8b430c29e9dc18711ad777..c30f656a1adbeff3f8acb582a13fbfbfe19e9929 100644 (file)
@@ -26,8 +26,12 @@ Boston, MA 02111-1307, USA.  */
 #include <limits.h>
 #include "libgfortran.h"
 
+
+extern void __minloc1_8_i4 (gfc_array_i8 *, gfc_array_i4 *, index_type *);
+export_proto_np(__minloc1_8_i4);
+
 void
-__minloc1_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array, index_type *pdim)
+__minloc1_8_i4 (gfc_array_i8 *retarray, gfc_array_i4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -152,6 +156,11 @@ __minloc1_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array, index_type *pdim)
     }
 }
 
+
+extern void __mminloc1_8_i4 (gfc_array_i8 *, gfc_array_i4 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mminloc1_8_i4);
+
 void
 __mminloc1_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index c8811f36ffabc1285d6eefce2793b49db18aafde..4d3e34ad1a9daa5e250e817d7737366152a271b4 100644 (file)
@@ -26,8 +26,12 @@ Boston, MA 02111-1307, USA.  */
 #include <limits.h>
 #include "libgfortran.h"
 
+
+extern void __minloc1_8_i8 (gfc_array_i8 *, gfc_array_i8 *, index_type *);
+export_proto_np(__minloc1_8_i8);
+
 void
-__minloc1_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, index_type *pdim)
+__minloc1_8_i8 (gfc_array_i8 *retarray, gfc_array_i8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -152,6 +156,11 @@ __minloc1_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, index_type *pdim)
     }
 }
 
+
+extern void __mminloc1_8_i8 (gfc_array_i8 *, gfc_array_i8 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mminloc1_8_i8);
+
 void
 __mminloc1_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 81ba16721167414565bf9cd239d130efee50fcc3..e5c1a59bf1081019806c94b2edd24298f9eba7cd 100644 (file)
@@ -26,8 +26,12 @@ Boston, MA 02111-1307, USA.  */
 #include <limits.h>
 #include "libgfortran.h"
 
+
+extern void __minloc1_8_r4 (gfc_array_i8 *, gfc_array_r4 *, index_type *);
+export_proto_np(__minloc1_8_r4);
+
 void
-__minloc1_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array, index_type *pdim)
+__minloc1_8_r4 (gfc_array_i8 *retarray, gfc_array_r4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -152,6 +156,11 @@ __minloc1_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array, index_type *pdim)
     }
 }
 
+
+extern void __mminloc1_8_r4 (gfc_array_i8 *, gfc_array_r4 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mminloc1_8_r4);
+
 void
 __mminloc1_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 684eab265652e10698d6508a6e8d29b17dc877f8..ff7ebb913f23dea8bd4862556673f44fdfd54aca 100644 (file)
@@ -26,8 +26,12 @@ Boston, MA 02111-1307, USA.  */
 #include <limits.h>
 #include "libgfortran.h"
 
+
+extern void __minloc1_8_r8 (gfc_array_i8 *, gfc_array_r8 *, index_type *);
+export_proto_np(__minloc1_8_r8);
+
 void
-__minloc1_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array, index_type *pdim)
+__minloc1_8_r8 (gfc_array_i8 *retarray, gfc_array_r8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -152,6 +156,11 @@ __minloc1_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array, index_type *pdim)
     }
 }
 
+
+extern void __mminloc1_8_r8 (gfc_array_i8 *, gfc_array_r8 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mminloc1_8_r8);
+
 void
 __mminloc1_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 784645297d9419d6715c6b216978a706617fdac2..23b832621578aa7d23c19680e41c2aed19600a72 100644 (file)
@@ -25,8 +25,12 @@ Boston, MA 02111-1307, USA.  */
 #include <float.h>
 #include "libgfortran.h"
 
+
+extern void __minval_i4 (gfc_array_i4 *, gfc_array_i4 *, index_type *);
+export_proto_np(__minval_i4);
+
 void
-__minval_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, index_type *pdim)
+__minval_i4 (gfc_array_i4 *retarray, gfc_array_i4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -146,6 +150,11 @@ __minval_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, index_type *pdim)
     }
 }
 
+
+extern void __mminval_i4 (gfc_array_i4 *, gfc_array_i4 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mminval_i4);
+
 void
 __mminval_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index deca048917aceb76cc6d3cf4ddcc5ae288cddf53..149ba7a1871d528ad2e7fcd5e198a45d7e5d0ab7 100644 (file)
@@ -25,8 +25,12 @@ Boston, MA 02111-1307, USA.  */
 #include <float.h>
 #include "libgfortran.h"
 
+
+extern void __minval_i8 (gfc_array_i8 *, gfc_array_i8 *, index_type *);
+export_proto_np(__minval_i8);
+
 void
-__minval_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, index_type *pdim)
+__minval_i8 (gfc_array_i8 *retarray, gfc_array_i8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -146,6 +150,11 @@ __minval_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, index_type *pdim)
     }
 }
 
+
+extern void __mminval_i8 (gfc_array_i8 *, gfc_array_i8 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mminval_i8);
+
 void
 __mminval_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 8990d88b3f2a715573cf17d330e6125a66ea3edc..3a4b13df1783d7f8d467095ae3985eef77a9ee1d 100644 (file)
@@ -25,8 +25,12 @@ Boston, MA 02111-1307, USA.  */
 #include <float.h>
 #include "libgfortran.h"
 
+
+extern void __minval_r4 (gfc_array_r4 *, gfc_array_r4 *, index_type *);
+export_proto_np(__minval_r4);
+
 void
-__minval_r4 (gfc_array_r4 * retarray, gfc_array_r4 *array, index_type *pdim)
+__minval_r4 (gfc_array_r4 *retarray, gfc_array_r4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -146,6 +150,11 @@ __minval_r4 (gfc_array_r4 * retarray, gfc_array_r4 *array, index_type *pdim)
     }
 }
 
+
+extern void __mminval_r4 (gfc_array_r4 *, gfc_array_r4 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mminval_r4);
+
 void
 __mminval_r4 (gfc_array_r4 * retarray, gfc_array_r4 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 285e90e016dcd86bc4050d6296bf60a0b4080153..e30c43145809369a26bf1b54c1f7deb1b8b4ea8d 100644 (file)
@@ -25,8 +25,12 @@ Boston, MA 02111-1307, USA.  */
 #include <float.h>
 #include "libgfortran.h"
 
+
+extern void __minval_r8 (gfc_array_r8 *, gfc_array_r8 *, index_type *);
+export_proto_np(__minval_r8);
+
 void
-__minval_r8 (gfc_array_r8 * retarray, gfc_array_r8 *array, index_type *pdim)
+__minval_r8 (gfc_array_r8 *retarray, gfc_array_r8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -146,6 +150,11 @@ __minval_r8 (gfc_array_r8 * retarray, gfc_array_r8 *array, index_type *pdim)
     }
 }
 
+
+extern void __mminval_r8 (gfc_array_r8 *, gfc_array_r8 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mminval_r8);
+
 void
 __mminval_r8 (gfc_array_r8 * retarray, gfc_array_r8 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index cafc02f21f290402c8ad9581acd64bd5a69132b9..d92efab2a62363fad1318d1fd536283e71f955bf 100644 (file)
@@ -23,8 +23,11 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+extern GFC_REAL_4 nearest_r4 (GFC_REAL_4 s, GFC_REAL_4 dir);
+export_proto(nearest_r4);
+
 GFC_REAL_4
-prefix(nearest_r4) (GFC_REAL_4 s, GFC_REAL_4 dir)
+nearest_r4 (GFC_REAL_4 s, GFC_REAL_4 dir)
 {
   dir = copysignf (__builtin_inff (), dir);
   if (FLT_EVAL_METHOD != 0)
index 54a374546dfc31499b02168feb038260ef32c2aa..7dd6838f89e55c53537fcf32690180d175468222 100644 (file)
@@ -23,8 +23,11 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+extern GFC_REAL_8 nearest_r8 (GFC_REAL_8 s, GFC_REAL_8 dir);
+export_proto(nearest_r8);
+
 GFC_REAL_8
-prefix(nearest_r8) (GFC_REAL_8 s, GFC_REAL_8 dir)
+nearest_r8 (GFC_REAL_8 s, GFC_REAL_8 dir)
 {
   dir = copysign (__builtin_inf (), dir);
   if (FLT_EVAL_METHOD != 0)
index de0f6f62dfe7a9f48a3f0b7105f82052ae205b0a..8aa3bf57ebb067a7e1eb19fffff057ed78aebe89 100644 (file)
@@ -22,13 +22,16 @@ Boston, MA 02111-1307, USA.  */
 #include "config.h"
 #include "libgfortran.h"
 
-/* Uuse Binary Method to calculate the powi. This is not an optimal but
+/* Use Binary Method to calculate the powi. This is not an optimal but
    a simple and reasonable arithmetic. See section 4.6.3, "Evaluation of
    Powers" of Donald E. Knuth, "Seminumerical Algorithms", Vol. 2, "The Art
    of Computer Programming", 3rd Edition, 1998.  */
 
+GFC_COMPLEX_4 pow_c4_i4 (GFC_COMPLEX_4 a, GFC_INTEGER_4 b);
+export_proto(pow_c4_i4);
+
 GFC_COMPLEX_4
-prefix(pow_c4_i4) (GFC_COMPLEX_4 a, GFC_INTEGER_4 b)
+pow_c4_i4 (GFC_COMPLEX_4 a, GFC_INTEGER_4 b)
 {
   GFC_COMPLEX_4 pow, x;
   GFC_INTEGER_4 n, u;
index 6606527b4adb4189280144ff4ec882f2653d2141..007c2774c8a5ae84385010ac292418a41112456b 100644 (file)
@@ -22,13 +22,16 @@ Boston, MA 02111-1307, USA.  */
 #include "config.h"
 #include "libgfortran.h"
 
-/* Uuse Binary Method to calculate the powi. This is not an optimal but
+/* Use Binary Method to calculate the powi. This is not an optimal but
    a simple and reasonable arithmetic. See section 4.6.3, "Evaluation of
    Powers" of Donald E. Knuth, "Seminumerical Algorithms", Vol. 2, "The Art
    of Computer Programming", 3rd Edition, 1998.  */
 
+GFC_COMPLEX_4 pow_c4_i8 (GFC_COMPLEX_4 a, GFC_INTEGER_8 b);
+export_proto(pow_c4_i8);
+
 GFC_COMPLEX_4
-prefix(pow_c4_i8) (GFC_COMPLEX_4 a, GFC_INTEGER_8 b)
+pow_c4_i8 (GFC_COMPLEX_4 a, GFC_INTEGER_8 b)
 {
   GFC_COMPLEX_4 pow, x;
   GFC_INTEGER_8 n, u;
index 5efb874d7e47a4e3d5af08ae6ccc2b6b3f108be1..d8bc9fa44e2dd0d7230f8d9ca2f20628e1e4cd09 100644 (file)
@@ -22,13 +22,16 @@ Boston, MA 02111-1307, USA.  */
 #include "config.h"
 #include "libgfortran.h"
 
-/* Uuse Binary Method to calculate the powi. This is not an optimal but
+/* Use Binary Method to calculate the powi. This is not an optimal but
    a simple and reasonable arithmetic. See section 4.6.3, "Evaluation of
    Powers" of Donald E. Knuth, "Seminumerical Algorithms", Vol. 2, "The Art
    of Computer Programming", 3rd Edition, 1998.  */
 
+GFC_COMPLEX_8 pow_c8_i4 (GFC_COMPLEX_8 a, GFC_INTEGER_4 b);
+export_proto(pow_c8_i4);
+
 GFC_COMPLEX_8
-prefix(pow_c8_i4) (GFC_COMPLEX_8 a, GFC_INTEGER_4 b)
+pow_c8_i4 (GFC_COMPLEX_8 a, GFC_INTEGER_4 b)
 {
   GFC_COMPLEX_8 pow, x;
   GFC_INTEGER_4 n, u;
index 17026b32c14c94bd2bd4446f3ffa93dddcfc4c75..f0e8b3887f45a2f7ec8c1a7f02c5d7d1d46736f5 100644 (file)
@@ -22,13 +22,16 @@ Boston, MA 02111-1307, USA.  */
 #include "config.h"
 #include "libgfortran.h"
 
-/* Uuse Binary Method to calculate the powi. This is not an optimal but
+/* Use Binary Method to calculate the powi. This is not an optimal but
    a simple and reasonable arithmetic. See section 4.6.3, "Evaluation of
    Powers" of Donald E. Knuth, "Seminumerical Algorithms", Vol. 2, "The Art
    of Computer Programming", 3rd Edition, 1998.  */
 
+GFC_COMPLEX_8 pow_c8_i8 (GFC_COMPLEX_8 a, GFC_INTEGER_8 b);
+export_proto(pow_c8_i8);
+
 GFC_COMPLEX_8
-prefix(pow_c8_i8) (GFC_COMPLEX_8 a, GFC_INTEGER_8 b)
+pow_c8_i8 (GFC_COMPLEX_8 a, GFC_INTEGER_8 b)
 {
   GFC_COMPLEX_8 pow, x;
   GFC_INTEGER_8 n, u;
index 15a349c1e9cbe505b784bf63c5e10efc07b35182..9b2d15301d8fff00eeba6c2b35aed0f438d83d35 100644 (file)
@@ -22,13 +22,16 @@ Boston, MA 02111-1307, USA.  */
 #include "config.h"
 #include "libgfortran.h"
 
-/* Uuse Binary Method to calculate the powi. This is not an optimal but
+/* Use Binary Method to calculate the powi. This is not an optimal but
    a simple and reasonable arithmetic. See section 4.6.3, "Evaluation of
    Powers" of Donald E. Knuth, "Seminumerical Algorithms", Vol. 2, "The Art
    of Computer Programming", 3rd Edition, 1998.  */
 
+GFC_INTEGER_4 pow_i4_i4 (GFC_INTEGER_4 a, GFC_INTEGER_4 b);
+export_proto(pow_i4_i4);
+
 GFC_INTEGER_4
-prefix(pow_i4_i4) (GFC_INTEGER_4 a, GFC_INTEGER_4 b)
+pow_i4_i4 (GFC_INTEGER_4 a, GFC_INTEGER_4 b)
 {
   GFC_INTEGER_4 pow, x;
   GFC_INTEGER_4 n, u;
index 72e8837912ca3a656fc9762ca3ef7e10907c959b..a721a6b03d0bd9a1fda9158af3bdc3bec9113b91 100644 (file)
@@ -22,13 +22,16 @@ Boston, MA 02111-1307, USA.  */
 #include "config.h"
 #include "libgfortran.h"
 
-/* Uuse Binary Method to calculate the powi. This is not an optimal but
+/* Use Binary Method to calculate the powi. This is not an optimal but
    a simple and reasonable arithmetic. See section 4.6.3, "Evaluation of
    Powers" of Donald E. Knuth, "Seminumerical Algorithms", Vol. 2, "The Art
    of Computer Programming", 3rd Edition, 1998.  */
 
+GFC_INTEGER_4 pow_i4_i8 (GFC_INTEGER_4 a, GFC_INTEGER_8 b);
+export_proto(pow_i4_i8);
+
 GFC_INTEGER_4
-prefix(pow_i4_i8) (GFC_INTEGER_4 a, GFC_INTEGER_8 b)
+pow_i4_i8 (GFC_INTEGER_4 a, GFC_INTEGER_8 b)
 {
   GFC_INTEGER_4 pow, x;
   GFC_INTEGER_8 n, u;
index 7a900d74daeb4a3ca3f0ab6ded4b4ec37359c9f0..5e0d4527efbca1ad95e3f9fcc733a010fc7231ba 100644 (file)
@@ -22,13 +22,16 @@ Boston, MA 02111-1307, USA.  */
 #include "config.h"
 #include "libgfortran.h"
 
-/* Uuse Binary Method to calculate the powi. This is not an optimal but
+/* Use Binary Method to calculate the powi. This is not an optimal but
    a simple and reasonable arithmetic. See section 4.6.3, "Evaluation of
    Powers" of Donald E. Knuth, "Seminumerical Algorithms", Vol. 2, "The Art
    of Computer Programming", 3rd Edition, 1998.  */
 
+GFC_INTEGER_8 pow_i8_i4 (GFC_INTEGER_8 a, GFC_INTEGER_4 b);
+export_proto(pow_i8_i4);
+
 GFC_INTEGER_8
-prefix(pow_i8_i4) (GFC_INTEGER_8 a, GFC_INTEGER_4 b)
+pow_i8_i4 (GFC_INTEGER_8 a, GFC_INTEGER_4 b)
 {
   GFC_INTEGER_8 pow, x;
   GFC_INTEGER_4 n, u;
index 591536fce7b8832cc56f3d84297c04ea2c085dd2..2269051d8826c8179de0a2481a67cef74599b7f1 100644 (file)
@@ -22,13 +22,16 @@ Boston, MA 02111-1307, USA.  */
 #include "config.h"
 #include "libgfortran.h"
 
-/* Uuse Binary Method to calculate the powi. This is not an optimal but
+/* Use Binary Method to calculate the powi. This is not an optimal but
    a simple and reasonable arithmetic. See section 4.6.3, "Evaluation of
    Powers" of Donald E. Knuth, "Seminumerical Algorithms", Vol. 2, "The Art
    of Computer Programming", 3rd Edition, 1998.  */
 
+GFC_INTEGER_8 pow_i8_i8 (GFC_INTEGER_8 a, GFC_INTEGER_8 b);
+export_proto(pow_i8_i8);
+
 GFC_INTEGER_8
-prefix(pow_i8_i8) (GFC_INTEGER_8 a, GFC_INTEGER_8 b)
+pow_i8_i8 (GFC_INTEGER_8 a, GFC_INTEGER_8 b)
 {
   GFC_INTEGER_8 pow, x;
   GFC_INTEGER_8 n, u;
index ffb8df7a8b29b2998eff51a35b2a5a984b363b6c..51524fef90d454362199214cd27a9ccf5b262dea 100644 (file)
@@ -22,13 +22,16 @@ Boston, MA 02111-1307, USA.  */
 #include "config.h"
 #include "libgfortran.h"
 
-/* Uuse Binary Method to calculate the powi. This is not an optimal but
+/* Use Binary Method to calculate the powi. This is not an optimal but
    a simple and reasonable arithmetic. See section 4.6.3, "Evaluation of
    Powers" of Donald E. Knuth, "Seminumerical Algorithms", Vol. 2, "The Art
    of Computer Programming", 3rd Edition, 1998.  */
 
+GFC_REAL_4 pow_r4_i4 (GFC_REAL_4 a, GFC_INTEGER_4 b);
+export_proto(pow_r4_i4);
+
 GFC_REAL_4
-prefix(pow_r4_i4) (GFC_REAL_4 a, GFC_INTEGER_4 b)
+pow_r4_i4 (GFC_REAL_4 a, GFC_INTEGER_4 b)
 {
   GFC_REAL_4 pow, x;
   GFC_INTEGER_4 n, u;
index 128388258a6f46ab734f397a613fdeb0e5294648..2e0a71b591e8eda0075ac290ecbc9e1834edd220 100644 (file)
@@ -22,13 +22,16 @@ Boston, MA 02111-1307, USA.  */
 #include "config.h"
 #include "libgfortran.h"
 
-/* Uuse Binary Method to calculate the powi. This is not an optimal but
+/* Use Binary Method to calculate the powi. This is not an optimal but
    a simple and reasonable arithmetic. See section 4.6.3, "Evaluation of
    Powers" of Donald E. Knuth, "Seminumerical Algorithms", Vol. 2, "The Art
    of Computer Programming", 3rd Edition, 1998.  */
 
+GFC_REAL_4 pow_r4_i8 (GFC_REAL_4 a, GFC_INTEGER_8 b);
+export_proto(pow_r4_i8);
+
 GFC_REAL_4
-prefix(pow_r4_i8) (GFC_REAL_4 a, GFC_INTEGER_8 b)
+pow_r4_i8 (GFC_REAL_4 a, GFC_INTEGER_8 b)
 {
   GFC_REAL_4 pow, x;
   GFC_INTEGER_8 n, u;
index fcead044cf2bf8c55681900990e16005e9da9d2c..d07b57135dd08e7e5efda5e56f8be3aef7af9a0b 100644 (file)
@@ -22,13 +22,16 @@ Boston, MA 02111-1307, USA.  */
 #include "config.h"
 #include "libgfortran.h"
 
-/* Uuse Binary Method to calculate the powi. This is not an optimal but
+/* Use Binary Method to calculate the powi. This is not an optimal but
    a simple and reasonable arithmetic. See section 4.6.3, "Evaluation of
    Powers" of Donald E. Knuth, "Seminumerical Algorithms", Vol. 2, "The Art
    of Computer Programming", 3rd Edition, 1998.  */
 
+GFC_REAL_8 pow_r8_i4 (GFC_REAL_8 a, GFC_INTEGER_4 b);
+export_proto(pow_r8_i4);
+
 GFC_REAL_8
-prefix(pow_r8_i4) (GFC_REAL_8 a, GFC_INTEGER_4 b)
+pow_r8_i4 (GFC_REAL_8 a, GFC_INTEGER_4 b)
 {
   GFC_REAL_8 pow, x;
   GFC_INTEGER_4 n, u;
index 7f75c82f79ba3807cacdd74d0b01c6cd29d6cb0e..e922eef8b4580583dd215b213e41e1e6c3c65691 100644 (file)
@@ -22,13 +22,16 @@ Boston, MA 02111-1307, USA.  */
 #include "config.h"
 #include "libgfortran.h"
 
-/* Uuse Binary Method to calculate the powi. This is not an optimal but
+/* Use Binary Method to calculate the powi. This is not an optimal but
    a simple and reasonable arithmetic. See section 4.6.3, "Evaluation of
    Powers" of Donald E. Knuth, "Seminumerical Algorithms", Vol. 2, "The Art
    of Computer Programming", 3rd Edition, 1998.  */
 
+GFC_REAL_8 pow_r8_i8 (GFC_REAL_8 a, GFC_INTEGER_8 b);
+export_proto(pow_r8_i8);
+
 GFC_REAL_8
-prefix(pow_r8_i8) (GFC_REAL_8 a, GFC_INTEGER_8 b)
+pow_r8_i8 (GFC_REAL_8 a, GFC_INTEGER_8 b)
 {
   GFC_REAL_8 pow, x;
   GFC_INTEGER_8 n, u;
index 0337ec61c0ed90c42b00d3ae1ee9f497e1b255a8..f8fcdcb2da10f93a327eb0ac10d40413970a94bb 100644 (file)
@@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+
+extern void __product_c4 (gfc_array_c4 *, gfc_array_c4 *, index_type *);
+export_proto_np(__product_c4);
+
 void
-__product_c4 (gfc_array_c4 * retarray, gfc_array_c4 *array, index_type *pdim)
+__product_c4 (gfc_array_c4 *retarray, gfc_array_c4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -144,6 +148,11 @@ __product_c4 (gfc_array_c4 * retarray, gfc_array_c4 *array, index_type *pdim)
     }
 }
 
+
+extern void __mproduct_c4 (gfc_array_c4 *, gfc_array_c4 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mproduct_c4);
+
 void
 __mproduct_c4 (gfc_array_c4 * retarray, gfc_array_c4 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 22a26a8e739a838c1066dabcd0539affda3b1204..4e54c68fcf0256088029e133c80d396de158e907 100644 (file)
@@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+
+extern void __product_c8 (gfc_array_c8 *, gfc_array_c8 *, index_type *);
+export_proto_np(__product_c8);
+
 void
-__product_c8 (gfc_array_c8 * retarray, gfc_array_c8 *array, index_type *pdim)
+__product_c8 (gfc_array_c8 *retarray, gfc_array_c8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -144,6 +148,11 @@ __product_c8 (gfc_array_c8 * retarray, gfc_array_c8 *array, index_type *pdim)
     }
 }
 
+
+extern void __mproduct_c8 (gfc_array_c8 *, gfc_array_c8 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mproduct_c8);
+
 void
 __mproduct_c8 (gfc_array_c8 * retarray, gfc_array_c8 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index c50c07f068bc59ba186f15d0a1e4edb232953efd..386fbf9b02e5e75e31bdaf89b7e44301153fc39c 100644 (file)
@@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+
+extern void __product_i4 (gfc_array_i4 *, gfc_array_i4 *, index_type *);
+export_proto_np(__product_i4);
+
 void
-__product_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, index_type *pdim)
+__product_i4 (gfc_array_i4 *retarray, gfc_array_i4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -144,6 +148,11 @@ __product_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, index_type *pdim)
     }
 }
 
+
+extern void __mproduct_i4 (gfc_array_i4 *, gfc_array_i4 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mproduct_i4);
+
 void
 __mproduct_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 0f09a411b51dbb2a36bac91df08eaf78e8049a1f..0e5ac66ca2d138c876389d4a0828856fa739243b 100644 (file)
@@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+
+extern void __product_i8 (gfc_array_i8 *, gfc_array_i8 *, index_type *);
+export_proto_np(__product_i8);
+
 void
-__product_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, index_type *pdim)
+__product_i8 (gfc_array_i8 *retarray, gfc_array_i8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -144,6 +148,11 @@ __product_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, index_type *pdim)
     }
 }
 
+
+extern void __mproduct_i8 (gfc_array_i8 *, gfc_array_i8 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mproduct_i8);
+
 void
 __mproduct_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index f68a88ab8355c4f107c440d674b52323abe339fa..cf38879d3f21389beb7692d40b9a2ce82ad91785 100644 (file)
@@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+
+extern void __product_r4 (gfc_array_r4 *, gfc_array_r4 *, index_type *);
+export_proto_np(__product_r4);
+
 void
-__product_r4 (gfc_array_r4 * retarray, gfc_array_r4 *array, index_type *pdim)
+__product_r4 (gfc_array_r4 *retarray, gfc_array_r4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -144,6 +148,11 @@ __product_r4 (gfc_array_r4 * retarray, gfc_array_r4 *array, index_type *pdim)
     }
 }
 
+
+extern void __mproduct_r4 (gfc_array_r4 *, gfc_array_r4 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mproduct_r4);
+
 void
 __mproduct_r4 (gfc_array_r4 * retarray, gfc_array_r4 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 0936d181232d2f39e7519333592f4b82f24d90f5..adba0bc286b85b4ca06c68a4567cb39122a247ee 100644 (file)
@@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+
+extern void __product_r8 (gfc_array_r8 *, gfc_array_r8 *, index_type *);
+export_proto_np(__product_r8);
+
 void
-__product_r8 (gfc_array_r8 * retarray, gfc_array_r8 *array, index_type *pdim)
+__product_r8 (gfc_array_r8 *retarray, gfc_array_r8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -144,6 +148,11 @@ __product_r8 (gfc_array_r8 * retarray, gfc_array_r8 *array, index_type *pdim)
     }
 }
 
+
+extern void __mproduct_r8 (gfc_array_r8 *, gfc_array_r8 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__mproduct_r8);
+
 void
 __mproduct_r8 (gfc_array_r8 * retarray, gfc_array_r8 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 7da866cf5d0c880e1516c8784ebee7a43c620080..70c32358b34882ec3b77e7cb22941bf14839bdc4 100644 (file)
@@ -28,6 +28,11 @@ typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type;
 
 /* The shape parameter is ignored. We can currently deduce the shape from the
    return array.  */
+
+extern void __reshape_4 (gfc_array_i4 *, gfc_array_i4 *, shape_type *,
+                                   gfc_array_i4 *, shape_type *);
+extern_proto_np(__reshape_4);
+
 void
 __reshape_4 (gfc_array_i4 * ret, gfc_array_i4 * source, shape_type * shape,
                       gfc_array_i4 * pad, shape_type * order)
@@ -222,4 +227,3 @@ __reshape_4 (gfc_array_i4 * ret, gfc_array_i4 * source, shape_type * shape,
         }
     }
 }
-
index f4e40197d82691fdfd6cacca33f4040c378e6b03..af76e254d7d256fe0972298abadaff0bda993192 100644 (file)
@@ -28,6 +28,11 @@ typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type;
 
 /* The shape parameter is ignored. We can currently deduce the shape from the
    return array.  */
+
+extern void __reshape_8 (gfc_array_i8 *, gfc_array_i8 *, shape_type *,
+                                   gfc_array_i8 *, shape_type *);
+extern_proto_np(__reshape_8);
+
 void
 __reshape_8 (gfc_array_i8 * ret, gfc_array_i8 * source, shape_type * shape,
                       gfc_array_i8 * pad, shape_type * order)
@@ -222,4 +227,3 @@ __reshape_8 (gfc_array_i8 * ret, gfc_array_i8 * source, shape_type * shape,
         }
     }
 }
-
index 32717e22305a8ab495452205d5cbc2534721ffed..9763ef6916d018ac005b80f08ef82d2eed025a52 100644 (file)
@@ -22,8 +22,11 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+extern GFC_REAL_4 set_exponent_r4 (GFC_REAL_4 s, GFC_INTEGER_4 i);
+export_proto(set_exponent_r4);
+
 GFC_REAL_4
-prefix(set_exponent_r4) (GFC_REAL_4 s, GFC_INTEGER_4 i)
+set_exponent_r4 (GFC_REAL_4 s, GFC_INTEGER_4 i)
 {
   int dummy_exp;
   return scalbnf (frexpf (s, &dummy_exp), i);
index ad2a97d837be007a391adfbe78c757d4429db39a..91b0e71fd6c3678c4261f3da89a121932c979d1e 100644 (file)
@@ -22,8 +22,11 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
+extern GFC_REAL_8 set_exponent_r8 (GFC_REAL_8 s, GFC_INTEGER_4 i);
+export_proto(set_exponent_r8);
+
 GFC_REAL_8
-prefix(set_exponent_r8) (GFC_REAL_8 s, GFC_INTEGER_4 i)
+set_exponent_r8 (GFC_REAL_8 s, GFC_INTEGER_4 i)
 {
   int dummy_exp;
   return scalbn (frexp (s, &dummy_exp), i);
index 03446912f616191348114ce94a3386ee6ce8f71b..855ccc06b8754219aec2b74084c1df91a2a923f2 100644 (file)
@@ -24,6 +24,9 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+extern void __shape_4 (gfc_array_i4 * ret, const gfc_array_i4 * array);
+export_proto_np(__shape_4);
+
 void
 __shape_4 (gfc_array_i4 * ret, const gfc_array_i4 * array)
 {
@@ -40,4 +43,3 @@ __shape_4 (gfc_array_i4 * ret, const gfc_array_i4 * array)
         array->dim[n].ubound + 1 - array->dim[n].lbound;
     }
 }
-
index bd7490016aea4308182e397fbc53db36472c9c1d..0dc92f03c3524c451b6005fd37c872db0cd8662d 100644 (file)
@@ -24,6 +24,9 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+extern void __shape_8 (gfc_array_i8 * ret, const gfc_array_i8 * array);
+export_proto_np(__shape_8);
+
 void
 __shape_8 (gfc_array_i8 * ret, const gfc_array_i8 * array)
 {
@@ -40,4 +43,3 @@ __shape_8 (gfc_array_i8 * ret, const gfc_array_i8 * array)
         array->dim[n].ubound + 1 - array->dim[n].lbound;
     }
 }
-
index 6507de88797136896d9bebdfb6d09c8e26c8703b..a4af04ada232aa056c20de9b9f5e0108be018f01 100644 (file)
@@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+
+extern void __sum_c4 (gfc_array_c4 *, gfc_array_c4 *, index_type *);
+export_proto_np(__sum_c4);
+
 void
-__sum_c4 (gfc_array_c4 * retarray, gfc_array_c4 *array, index_type *pdim)
+__sum_c4 (gfc_array_c4 *retarray, gfc_array_c4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -144,6 +148,11 @@ __sum_c4 (gfc_array_c4 * retarray, gfc_array_c4 *array, index_type *pdim)
     }
 }
 
+
+extern void __msum_c4 (gfc_array_c4 *, gfc_array_c4 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__msum_c4);
+
 void
 __msum_c4 (gfc_array_c4 * retarray, gfc_array_c4 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index bc2d045e667ddb3530722c418b28a97540b6e30c..f421e80166eec5f3a38d79e5b1ebeb5622369324 100644 (file)
@@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+
+extern void __sum_c8 (gfc_array_c8 *, gfc_array_c8 *, index_type *);
+export_proto_np(__sum_c8);
+
 void
-__sum_c8 (gfc_array_c8 * retarray, gfc_array_c8 *array, index_type *pdim)
+__sum_c8 (gfc_array_c8 *retarray, gfc_array_c8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -144,6 +148,11 @@ __sum_c8 (gfc_array_c8 * retarray, gfc_array_c8 *array, index_type *pdim)
     }
 }
 
+
+extern void __msum_c8 (gfc_array_c8 *, gfc_array_c8 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__msum_c8);
+
 void
 __msum_c8 (gfc_array_c8 * retarray, gfc_array_c8 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index aac7f482e92d3937d67e2d80192ad59f77aed739..55b000d83fcfd42f7a4cadf6712145ae3bd7f513 100644 (file)
@@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+
+extern void __sum_i4 (gfc_array_i4 *, gfc_array_i4 *, index_type *);
+export_proto_np(__sum_i4);
+
 void
-__sum_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, index_type *pdim)
+__sum_i4 (gfc_array_i4 *retarray, gfc_array_i4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -144,6 +148,11 @@ __sum_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, index_type *pdim)
     }
 }
 
+
+extern void __msum_i4 (gfc_array_i4 *, gfc_array_i4 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__msum_i4);
+
 void
 __msum_i4 (gfc_array_i4 * retarray, gfc_array_i4 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index e9a539d992d51b390f7996177bc97d5bfb0a5a1c..d72bd1287082e849b694b9a9a48582ba0c2637f1 100644 (file)
@@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+
+extern void __sum_i8 (gfc_array_i8 *, gfc_array_i8 *, index_type *);
+export_proto_np(__sum_i8);
+
 void
-__sum_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, index_type *pdim)
+__sum_i8 (gfc_array_i8 *retarray, gfc_array_i8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -144,6 +148,11 @@ __sum_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, index_type *pdim)
     }
 }
 
+
+extern void __msum_i8 (gfc_array_i8 *, gfc_array_i8 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__msum_i8);
+
 void
 __msum_i8 (gfc_array_i8 * retarray, gfc_array_i8 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 11b5c4944837dbbe0937401662e61b3740b7d2fd..dcb81554e0c47e362c186a682fa96a2147ac2624 100644 (file)
@@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+
+extern void __sum_r4 (gfc_array_r4 *, gfc_array_r4 *, index_type *);
+export_proto_np(__sum_r4);
+
 void
-__sum_r4 (gfc_array_r4 * retarray, gfc_array_r4 *array, index_type *pdim)
+__sum_r4 (gfc_array_r4 *retarray, gfc_array_r4 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -144,6 +148,11 @@ __sum_r4 (gfc_array_r4 * retarray, gfc_array_r4 *array, index_type *pdim)
     }
 }
 
+
+extern void __msum_r4 (gfc_array_r4 *, gfc_array_r4 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__msum_r4);
+
 void
 __msum_r4 (gfc_array_r4 * retarray, gfc_array_r4 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index 95272fb1f16bc3ad9b653976d156c6852c0cf02f..3a6ea96f2d5a3942571ebe4494e769ce59bf1bcd 100644 (file)
@@ -24,8 +24,12 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+
+extern void __sum_r8 (gfc_array_r8 *, gfc_array_r8 *, index_type *);
+export_proto_np(__sum_r8);
+
 void
-__sum_r8 (gfc_array_r8 * retarray, gfc_array_r8 *array, index_type *pdim)
+__sum_r8 (gfc_array_r8 *retarray, gfc_array_r8 *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -144,6 +148,11 @@ __sum_r8 (gfc_array_r8 * retarray, gfc_array_r8 *array, index_type *pdim)
     }
 }
 
+
+extern void __msum_r8 (gfc_array_r8 *, gfc_array_r8 *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(__msum_r8);
+
 void
 __msum_r8 (gfc_array_r8 * retarray, gfc_array_r8 * array, index_type *pdim, gfc_array_l4 * mask)
 {
index dad2987fca74bc5a5d9dfe06f2004542fec581e3..24ae8a8878cb20ff11c726c1ee9225190ed5af32 100644 (file)
@@ -23,6 +23,9 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+extern void __transpose_4 (gfc_array_i4 * ret, gfc_array_i4 * source);
+export_proto_np(__transpose_4);
+
 void
 __transpose_4 (gfc_array_i4 * ret, gfc_array_i4 * source)
 {
index 84811d0d012fc26b38b5dc378fdd25244e8633f7..67ef0ddffaac03b9885f2b2465a2fb02697339ac 100644 (file)
@@ -23,6 +23,9 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+extern void __transpose_8 (gfc_array_i8 * ret, gfc_array_i8 * source);
+export_proto_np(__transpose_8);
+
 void
 __transpose_8 (gfc_array_i8 * ret, gfc_array_i8 * source)
 {
index cc2a422cd3fe0befa58b55cb7b734823bbc1d89c..8ab86ba4af54b1aced7800c74bb84284a6016ebc 100644 (file)
@@ -21,11 +21,10 @@ Boston, MA 02111-1307, USA.  */
 #include <stdlib.h>
 #include "libgfortran.h"
 
+void PREFIX(abort) (void);
+export_proto_np(PREFIX(abort));
 
-void prefix(abort) (void);
-
-void prefix(abort) ()
+void PREFIX(abort) (void)
 {
   abort ();
 }
-
index 984fa91d3521f701dcaf3e765cb6ac57ae26fe14..f674281262316fefb432cdaa1546a7119daf4f24 100644 (file)
@@ -28,8 +28,11 @@ Boston, MA 02111-1307, USA.  */
 
 /* Get a commandline argument.  */
 
+extern void getarg_i4 (GFC_INTEGER_4 *, char *, gfc_charlen_type);
+iexport_proto(getarg_i4);
+
 void 
-prefix(getarg_i4) (GFC_INTEGER_4 *pos, char  *val, gfc_charlen_type val_len)
+getarg_i4 (GFC_INTEGER_4 *pos, char  *val, gfc_charlen_type val_len)
 {
   int argc;
   int arglen;
@@ -50,24 +53,29 @@ prefix(getarg_i4) (GFC_INTEGER_4 *pos, char  *val, gfc_charlen_type val_len)
       memcpy (val, argv[*pos], arglen);
     }
 }
+iexport(getarg_i4);
 
 
 /* INTEGER*8 wrapper of getarg.  */
 
+extern void getarg_i8 (GFC_INTEGER_8 *, char *, gfc_charlen_type);
+export_proto (getarg_i8);
+
 void 
-prefix(getarg_i8) (GFC_INTEGER_8 *pos, char  *val, gfc_charlen_type val_len)
+getarg_i8 (GFC_INTEGER_8 *pos, char  *val, gfc_charlen_type val_len)
 {
-  GFC_INTEGER_4 pos4;
-
-  pos4 = (GFC_INTEGER_4) *pos;
-  prefix(getarg_i4) (&pos4, val, val_len);
+  GFC_INTEGER_4 pos4 = (GFC_INTEGER_4) *pos;
+  getarg_i4 (&pos4, val, val_len);
 }
 
 
 /* Return the number of commandline arguments.  */
 
+extern GFC_INTEGER_4 iargc (void);
+export_proto(iargc);
+
 GFC_INTEGER_4
-prefix(iargc) (void)
+iargc (void)
 {
   int argc;
   char **argv;
@@ -96,14 +104,16 @@ prefix(iargc) (void)
 #define GFC_GC_FAILURE 42
 
 
+extern void get_command_argument_i4 (GFC_INTEGER_4 *, char *, GFC_INTEGER_4 *,
+                                    GFC_INTEGER_4 *, gfc_charlen_type);
+iexport_proto(get_command_argument_i4);
+
 /* Get a single commandline argument.  */
 
 void
-prefix(get_command_argument_i4) (GFC_INTEGER_4 *number, 
-                                char *value, 
-                                GFC_INTEGER_4 *length, 
-                                GFC_INTEGER_4 *status, 
-                                gfc_charlen_type value_len)
+get_command_argument_i4 (GFC_INTEGER_4 *number, char *value, 
+                        GFC_INTEGER_4 *length, GFC_INTEGER_4 *status, 
+                        gfc_charlen_type value_len)
 {
   int argc, arglen = 0, stat_flag = GFC_GC_SUCCESS;
   char **argv;
@@ -146,24 +156,26 @@ prefix(get_command_argument_i4) (GFC_INTEGER_4 *number,
   if (status != NULL)
     *status = stat_flag;
 }
+iexport(get_command_argument_i4);
 
 
 /* INTEGER*8 wrapper for get_command_argument.  */
 
+extern void get_command_argument_i8 (GFC_INTEGER_8 *, char *, GFC_INTEGER_8 *, 
+                                    GFC_INTEGER_8 *, gfc_charlen_type);
+export_proto(get_command_argument_i8);
+
 void
-prefix(get_command_argument_i8) (GFC_INTEGER_8 *number, 
-                                char *value, 
-                                GFC_INTEGER_8 *length, 
-                                GFC_INTEGER_8 *status, 
-                                gfc_charlen_type value_len)
+get_command_argument_i8 (GFC_INTEGER_8 *number, char *value, 
+                        GFC_INTEGER_8 *length, GFC_INTEGER_8 *status, 
+                        gfc_charlen_type value_len)
 {
   GFC_INTEGER_4 number4;
   GFC_INTEGER_4 length4;
   GFC_INTEGER_4 status4;
 
   number4 = (GFC_INTEGER_4) *number;
-  prefix (get_command_argument_i4) (&number4, value, &length4, &status4,
-                                   value_len);
+  get_command_argument_i4 (&number4, value, &length4, &status4, value_len);
   if (length)
     *length = length4;
   if (status)
@@ -173,11 +185,13 @@ prefix(get_command_argument_i8) (GFC_INTEGER_8 *number,
 
 /* Return the whole commandline.  */
 
+extern void get_command_i4 (char *, GFC_INTEGER_4 *, GFC_INTEGER_4 *,
+                           gfc_charlen_type);
+iexport_proto(get_command_i4);
+
 void
-prefix(get_command_i4) (char *command, 
-                       GFC_INTEGER_4 *length, 
-                       GFC_INTEGER_4 *status,
-                       gfc_charlen_type command_len)
+get_command_i4 (char *command, GFC_INTEGER_4 *length, GFC_INTEGER_4 *status,
+               gfc_charlen_type command_len)
 {
   int i, argc, arglen, thisarg;
   int stat_flag = GFC_GC_SUCCESS;
@@ -229,20 +243,23 @@ prefix(get_command_i4) (char *command,
   if (status != NULL)
     *status = stat_flag;
 }
+iexport(get_command_i4);
 
 
 /* INTEGER*8 wrapper for get_command.  */
 
+extern void get_command_i8 (char *, GFC_INTEGER_8 *, GFC_INTEGER_8 *,
+                           gfc_charlen_type);
+export_proto(get_command_i8);
+
 void
-prefix(get_command_i8) (char *command, 
-                       GFC_INTEGER_8 *length, 
-                       GFC_INTEGER_8 *status,
-                       gfc_charlen_type command_len)
+get_command_i8 (char *command, GFC_INTEGER_8 *length, GFC_INTEGER_8 *status,
+               gfc_charlen_type command_len)
 {
   GFC_INTEGER_4 length4;
   GFC_INTEGER_4 status4;
 
-  prefix (get_command_i4) (command, &length4, &status4, command_len);
+  get_command_i4 (command, &length4, &status4, command_len);
   if (length)
     *length = length4;
   if (status)
index e7805f1ee135c3e185fdc46ceb3d6264239bf4cf..012ffc11b3711e8351ef107040a924336650d638 100644 (file)
@@ -21,8 +21,9 @@ Boston, MA 02111-1307, USA.  */
 
 #include "libgfortran.h"
 
-#define associated prefix(associated)
-
+extern GFC_LOGICAL_4 associated (const gfc_array_void *,
+                                const gfc_array_void *);
+export_proto(associated);
 
 GFC_LOGICAL_4
 associated (const gfc_array_void *pointer, const gfc_array_void *target)
index 887debc3e53a2ef2758b3d31c78e75d56abeda2d..58f22534b94d6f7574f1e987c62a57ad34c33e8d 100644 (file)
@@ -101,29 +101,43 @@ __cpu_time_1 (long *sec, long *usec)
 #endif  /* HAVE_GETRUSAGE */
 }
 
-#undef CPU_TIME
-#define CPU_TIME(KIND)                                         \
-void prefix(cpu_time_##KIND) (GFC_REAL_##KIND *__time)         \
-{                                                              \
-  long sec, usec;                                              \
-  __cpu_time_1 (&sec, &usec);                                  \
-  *__time = (GFC_REAL_##KIND) sec +                            \
-               ((GFC_REAL_##KIND) usec) * 1.e-6;               \
+extern void cpu_time_4 (GFC_REAL_4 *);
+iexport_proto(cpu_time_4);
+
+void cpu_time_4 (GFC_REAL_4 *time)
+{
+  long sec, usec;
+  __cpu_time_1 (&sec, &usec);
+  *time = sec + usec * (GFC_REAL_4)1.e-6;
 }
+iexport(cpu_time_4);
 
-CPU_TIME(4)
-CPU_TIME(8)
+extern void cpu_time_8 (GFC_REAL_8 *);
+export_proto(cpu_time_8);
+
+void cpu_time_8 (GFC_REAL_8 *time)
+{
+  long sec, usec;
+  __cpu_time_1 (&sec, &usec);
+  *time = sec + usec * (GFC_REAL_8)1.e-6;
+}
+
+extern void second_sub (GFC_REAL_4 *);
+export_proto(second_sub);
 
 void
-prefix(second_sub) (GFC_REAL_4 *s)
+second_sub (GFC_REAL_4 *s)
 {
-  prefix(cpu_time_4)(s);
+  cpu_time_4 (s);
 }
 
+extern GFC_REAL_4 second (void);
+export_proto(second);
+
 GFC_REAL_4
-prefix(second) (void)
+second (void)
 {
   GFC_REAL_4 s;
-  prefix(cpu_time_4)(&s);
+  cpu_time_4 (&s);
   return s;
 }
index 6d7a80188671ed8e5da4875a8cf5fe17ee04a580..9fd87855634c6511182b985474fed563cbd7c7a8 100644 (file)
@@ -238,6 +238,10 @@ __cshift0 (gfc_array_char * ret, const gfc_array_char * array,
 }
 
 
+extern void __cshift0_4 (gfc_array_char *, const gfc_array_char *,
+                        const GFC_INTEGER_4 *, const GFC_INTEGER_4 *);
+export_proto_np(__cshift0_4);
+
 void
 __cshift0_4 (gfc_array_char * ret, const gfc_array_char * array,
     const GFC_INTEGER_4 * pshift, const GFC_INTEGER_4 * pdim)
@@ -245,6 +249,9 @@ __cshift0_4 (gfc_array_char * ret, const gfc_array_char * array,
   __cshift0 (ret, array, *pshift, pdim ? *pdim : 1);
 }
 
+extern void __cshift0_8 (gfc_array_char *, const gfc_array_char *,
+                        const GFC_INTEGER_8 *, const GFC_INTEGER_8 *);
+export_proto_np(__cshift0_8);
 
 void
 __cshift0_8 (gfc_array_char * ret, const gfc_array_char * array,
index e0b01234556cea68f95363c928f88bd6ff24f9e6..67679f897a2fb9d632e313119260cefd4489d1d5 100644 (file)
@@ -121,6 +121,10 @@ Boston, MA 02111-1307, USA.  */
      be to use ftime.
 */
 
+extern void date_and_time (char *, char *, char *, gfc_array_i4 *,
+                          GFC_INTEGER_4, GFC_INTEGER_4, GFC_INTEGER_4);
+export_proto(date_and_time);
+
 void
 date_and_time (char *__date,
               char *__time,
index ab596fce59c038994fe25276022a03a5d3f63f37..d116f1ccaa7b9ae407747b3496f0ba17202fd749 100644 (file)
@@ -28,13 +28,14 @@ Boston, MA 02111-1307, USA.  */
 
 
 /* GETENV (NAME, VALUE), g77 intrinsic for retrieving the value of
- an environment variable. The name of the variable is specified in
- NAME, and the result is stored into VALUE.  */
+   an environment variable. The name of the variable is specified in
+   NAME, and the result is stored into VALUE.  */
+
+void PREFIX(getenv) (char *, char *, gfc_charlen_type, gfc_charlen_type);
+export_proto_np(PREFIX(getenv));
 
 void 
-prefix(getenv) (char * name, 
-               char * value, 
-               gfc_charlen_type name_len, 
+PREFIX(getenv) (char * name, char * value, gfc_charlen_type name_len, 
                gfc_charlen_type value_len)
 {
   char *name_nt;
@@ -89,16 +90,16 @@ prefix(getenv) (char * name,
 /* Processor-specific failure code.  */
 #define GFC_FAILURE 42
 
+extern void get_environment_variable_i4 (char *, char *, GFC_INTEGER_4 *,
+                                        GFC_INTEGER_4 *, GFC_LOGICAL_4 *,
+                                        gfc_charlen_type, gfc_charlen_type);
+iexport_proto(get_environment_variable_i4);
+
 void
-prefix(get_environment_variable_i4) 
-  (
-   char *name,
-   char *value,
-   GFC_INTEGER_4 *length,
-   GFC_INTEGER_4 *status,
-   GFC_LOGICAL_4 *trim_name,
-   gfc_charlen_type name_len,
-   gfc_charlen_type value_len)
+get_environment_variable_i4 (char *name, char *value, GFC_INTEGER_4 *length,
+                            GFC_INTEGER_4 *status, GFC_LOGICAL_4 *trim_name,
+                            gfc_charlen_type name_len,
+                            gfc_charlen_type value_len)
 {
   int stat = GFC_SUCCESS, res_len = 0;
   char *name_nt;
@@ -159,20 +160,21 @@ prefix(get_environment_variable_i4)
   if (length != NULL)
     *length = res_len;
 }
+iexport(get_environment_variable_i4);
 
 
 /* INTEGER*8 wrapper for get_environment_variable.  */
 
+extern void get_environment_variable_i8 (char *, char *, GFC_INTEGER_8 *,
+                                        GFC_INTEGER_8 *, GFC_LOGICAL_8 *,
+                                        gfc_charlen_type, gfc_charlen_type);
+export_proto(get_environment_variable_i8);
+
 void
-prefix(get_environment_variable_i8)
-  (
-   char *name,
-   char *value,
-   GFC_INTEGER_8 *length,
-   GFC_INTEGER_8 *status,
-   GFC_LOGICAL_8 *trim_name,
-   gfc_charlen_type name_len,
-   gfc_charlen_type value_len)
+get_environment_variable_i8 (char *name, char *value, GFC_INTEGER_8 *length,
+                            GFC_INTEGER_8 *status, GFC_LOGICAL_8 *trim_name,
+                            gfc_charlen_type name_len,
+                            gfc_charlen_type value_len)
 {
   GFC_INTEGER_4 length4, status4;
   GFC_LOGICAL_4 trim_name4;
@@ -180,8 +182,8 @@ prefix(get_environment_variable_i8)
   if (trim_name)
     trim_name4 = *trim_name;
 
-  prefix (get_environment_variable_i4) (name, value, &length4, &status4, 
-                                       &trim_name4, name_len, value_len);
+  get_environment_variable_i4 (name, value, &length4, &status4, 
+                              &trim_name4, name_len, value_len);
 
   if (length)
     *length = length4;
index db9dd657200e6cf67e45085c656f2fd1a937f3c3..df749a4072c8be693810d251d078a50ff32c7712 100644 (file)
@@ -187,6 +187,10 @@ __eoshift0 (gfc_array_char * ret, const gfc_array_char * array,
     }
 }
 
+extern void __eoshift0_4 (gfc_array_char *, const gfc_array_char *,
+                         const GFC_INTEGER_4 *, const char *,
+                         const GFC_INTEGER_4 *);
+export_proto_np(__eoshift0_4);
 
 void
 __eoshift0_4 (gfc_array_char * ret, const gfc_array_char * array,
@@ -196,6 +200,10 @@ __eoshift0_4 (gfc_array_char * ret, const gfc_array_char * array,
   __eoshift0 (ret, array, *pshift, pbound, pdim ? *pdim : 1);
 }
 
+extern void __eoshift0_8 (gfc_array_char *, const gfc_array_char *,
+                         const GFC_INTEGER_8 *, const char *,
+                         const GFC_INTEGER_8 *);
+export_proto_np(__eoshift0_8);
 
 void
 __eoshift0_8 (gfc_array_char * ret, const gfc_array_char * array,
index a20da55258544d363efb984dda94d9f352db5a81..388486d203c69cb0711d3ad8e9208389f5002cfc 100644 (file)
@@ -203,6 +203,10 @@ __eoshift2 (gfc_array_char * ret, const gfc_array_char * array,
     }
 }
 
+extern void __eoshift2_4 (gfc_array_char *, const gfc_array_char *,
+                         const GFC_INTEGER_4 *, const gfc_array_char *,
+                         const GFC_INTEGER_4 *);
+export_proto_np(__eoshift2_4);
 
 void
 __eoshift2_4 (gfc_array_char * ret, const gfc_array_char * array,
@@ -212,6 +216,10 @@ __eoshift2_4 (gfc_array_char * ret, const gfc_array_char * array,
   __eoshift2 (ret, array, *pshift, bound, pdim ? *pdim : 1);
 }
 
+extern void __eoshift2_8 (gfc_array_char *, const gfc_array_char *,
+                         const GFC_INTEGER_8 *, const gfc_array_char *,
+                         const GFC_INTEGER_8 *);
+export_proto_np(__eoshift2_8);
 
 void
 __eoshift2_8 (gfc_array_char * ret, const gfc_array_char * array,
index d8c2f11562243d70335385a3103ed92ca48c0c4e..9a8f976a55d8ada6e4e33d2c611fc06267acdaa1 100644 (file)
@@ -30,8 +30,11 @@ Boston, MA 02111-1307, USA.  */
 #include <sys/resource.h>
 #endif
 
+extern void etime_sub (gfc_array_r4 *t, GFC_REAL_4 *result);
+iexport_proto(etime_sub);
+
 void
-prefix(etime_sub) (gfc_array_r4 *t, GFC_REAL_4 *result)
+etime_sub (gfc_array_r4 *t, GFC_REAL_4 *result)
 {
   GFC_REAL_4 tu, ts, tt, *tp;
   index_type dim;
@@ -70,18 +73,25 @@ prefix(etime_sub) (gfc_array_r4 *t, GFC_REAL_4 *result)
   *tp = ts;
   *result = tt;
 }
+iexport(etime_sub);
+
+extern GFC_REAL_4 etime (gfc_array_r4 *t);
+export_proto(etime);
 
 GFC_REAL_4
-prefix(etime) (gfc_array_r4 *t)
+etime (gfc_array_r4 *t)
 {
   GFC_REAL_4 val;
-  prefix(etime_sub) (t, &val);
+  etime_sub (t, &val);
   return val;
 }
 
 /* LAPACK's test programs declares ETIME external, therefore we 
    need this.  */
 
+extern GFC_REAL_4 etime_ (GFC_REAL_4 *t);
+export_proto_np(etime_);
+
 GFC_REAL_4
 etime_ (GFC_REAL_4 *t)
 {
@@ -94,6 +104,6 @@ etime_ (GFC_REAL_4 *t)
   desc.dim[0].stride = 1;
   desc.data = t;
 
-  prefix(etime_sub) (&desc, &val);
+  etime_sub (&desc, &val);
   return val;
 }
index f15d56787bf49e78752accd1f7de1cb828bf6084..fcb792e10b015084487d8d8302697dc2c7dd7575 100644 (file)
@@ -30,18 +30,20 @@ Boston, MA 02111-1307, USA.  */
 /* SUBROUTINE EXIT(STATUS)
    INTEGER, INTENT(IN), OPTIONAL :: STATUS  */
 
+extern void exit_i4 (GFC_INTEGER_4 *);
+export_proto(exit_i4);
+
 void
-prefix(exit_i4) (GFC_INTEGER_4 * status)
+exit_i4 (GFC_INTEGER_4 * status)
 {
-  if (status == NULL)
-    exit(0);
-  exit(*status);
+  exit (status ? *status : 0);
 }
 
+extern void exit_i8 (GFC_INTEGER_8 *);
+export_proto(exit_i8);
+
 void
-prefix(exit_i8) (GFC_INTEGER_8 * status)
+exit_i8 (GFC_INTEGER_8 * status)
 {
-  if (status == NULL)
-    exit(0);
-  exit((int) *status);
+  exit (status ? *status : 0);
 }
index 5f75195b9e4afbabaf17ee84de5a521c65fd329c..3e709094e52248007d594f349688d83d2dbdc1f0 100644 (file)
@@ -45,8 +45,11 @@ recursive_flush (gfc_unit *us)
 }
 
 
+extern void flush_i4 (GFC_INTEGER_4 *);
+export_proto(flush_i4);
+
 void
-prefix(flush_i4) (GFC_INTEGER_4 * unit)
+flush_i4 (GFC_INTEGER_4 *unit)
 {
   gfc_unit *us;
 
index 251cfb4e937d78cf62f18671e1c8179ccb77bf57..f5594648568c477da47d59dbbbef18971afdb596 100644 (file)
@@ -28,15 +28,20 @@ Boston, MA 02111-1307, USA.  */
    INTEGER FNUM
    INTEGER, INTENT(IN), :: UNIT  */
 
+extern GFC_INTEGER_4 fnum_i4 (GFC_INTEGER_4 *);
+export_proto(fnum_i4);
+
 GFC_INTEGER_4
-prefix(fnum_i4) (GFC_INTEGER_4 * unit)
+fnum_i4 (GFC_INTEGER_4 *unit)
 {
   return unit_to_fd (*unit);
 }
 
+extern GFC_INTEGER_8 fnum_i8 (GFC_INTEGER_8 *);
+export_proto(fnum_i8);
 
 GFC_INTEGER_8
-prefix(fnum_i8) (GFC_INTEGER_8 * unit)
+fnum_i8 (GFC_INTEGER_8 * unit)
 {
   return unit_to_fd (*unit);
 }
index 01aec12fed068e87aa6245d5b9626c2330c72ec5..4690d149cf828e64b8ee2da542d4ff0f7c1b59a2 100644 (file)
@@ -30,22 +30,34 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 #ifdef HAVE_GETGID
-GFC_INTEGER_4 prefix(getgid) (void)
+extern GFC_INTEGER_4 PREFIX(getgid) (void);
+export_proto_np(PREFIX(getgid));
+
+GFC_INTEGER_4
+PREFIX(getgid) (void)
 {
-  return (GFC_INTEGER_4) getgid ();
+  return getgid ();
 }
 #endif
 
 #ifdef HAVE_GETPID
-GFC_INTEGER_4 prefix(getpid) (void)
+extern GFC_INTEGER_4 PREFIX(getpid) (void);
+export_proto_np(PREFIX(getpid));
+
+GFC_INTEGER_4
+PREFIX(getpid) (void)
 {
-  return (GFC_INTEGER_4) getpid ();
+  return getpid ();
 }
 #endif
 
 #ifdef HAVE_GETUID
-GFC_INTEGER_4 prefix(getuid) (void)
+extern GFC_INTEGER_4 PREFIX(getuid) (void);
+export_proto_np(PREFIX(getuid));
+
+GFC_INTEGER_4
+PREFIX(getuid) (void)
 {
-  return (GFC_INTEGER_4) getuid ();
+  return getuid ();
 }
 #endif
index 86afa6ca5c4adb49840cd3b5a422f4eb9f0a2b26..318a3a951a5a9d45248f285c77bef4243e109cb5 100644 (file)
@@ -31,9 +31,11 @@ Boston, MA 02111-1307, USA.  */
 
 #include <errno.h>
 
+extern void getcwd_i4_sub (char *, GFC_INTEGER_4 *, gfc_charlen_type);
+iexport_proto(getcwd_i4_sub);
+
 void
-prefix(getcwd_i4_sub) (char * cwd, GFC_INTEGER_4 * status,
-                      gfc_charlen_type cwd_len)
+getcwd_i4_sub (char *cwd, GFC_INTEGER_4 *status, gfc_charlen_type cwd_len)
 {
   char str[cwd_len + 1], *s;
   GFC_INTEGER_4 stat;
@@ -50,22 +52,27 @@ prefix(getcwd_i4_sub) (char * cwd, GFC_INTEGER_4 * status,
   if (status != NULL) 
     *status = stat;
 }
+iexport(getcwd_i4_sub);
+
+extern void getcwd_i8_sub (char *, GFC_INTEGER_8 *, gfc_charlen_type);
+export_proto(getcwd_i8_sub);
 
 void
-prefix(getcwd_i8_sub) (char * cwd, GFC_INTEGER_8 * status,
-                              gfc_charlen_type cwd_len)
+getcwd_i8_sub (char *cwd, GFC_INTEGER_8 *status, gfc_charlen_type cwd_len)
 {
   GFC_INTEGER_4 status4;
-
-  prefix (getcwd_i4_sub) (cwd, &status4, cwd_len);
+  getcwd_i4_sub (cwd, &status4, cwd_len);
   if (status)
     *status = status4;
 }
 
+extern GFC_INTEGER_4 PREFIX(getcwd) (char *, gfc_charlen_type);
+export_proto_np(PREFIX(getcwd));
+
 GFC_INTEGER_4
-prefix(getcwd) (char * cwd, gfc_charlen_type cwd_len)
+PREFIX(getcwd) (char *cwd, gfc_charlen_type cwd_len)
 {
   GFC_INTEGER_4 status;
-  prefix(getcwd_i4_sub) (cwd, &status, cwd_len);
+  getcwd_i4_sub (cwd, &status, cwd_len);
   return status;
 }
index 2677c3313f914bbbacfcfcd7b89a280a19415c66..7d5767c91441357fbf1ffefbce3630f17cc3b784 100644 (file)
@@ -21,11 +21,8 @@ Boston, MA 02111-1307, USA.  */
 
 #include "libgfortran.h"
 
-#define ishftc4 prefix(ishftc4)
-GFC_INTEGER_4 ishftc4 (GFC_INTEGER_4, GFC_INTEGER_4, GFC_INTEGER_4);
-
-#define ishftc8 prefix(ishftc8)
-GFC_INTEGER_8 ishftc8 (GFC_INTEGER_8, GFC_INTEGER_8, GFC_INTEGER_8);
+extern GFC_INTEGER_4 ishftc4 (GFC_INTEGER_4, GFC_INTEGER_4, GFC_INTEGER_4);
+export_proto(ishftc4);
 
 GFC_INTEGER_4
 ishftc4 (GFC_INTEGER_4 i, GFC_INTEGER_4 shift, GFC_INTEGER_4 size)
@@ -44,6 +41,8 @@ ishftc4 (GFC_INTEGER_4 i, GFC_INTEGER_4 shift, GFC_INTEGER_4 size)
   return (i & mask) | (bits >> (size - shift)) | ((i << shift) & ~mask);
 }
 
+extern GFC_INTEGER_8 ishftc8 (GFC_INTEGER_8, GFC_INTEGER_8, GFC_INTEGER_8);
+export_proto(ishftc8);
 
 GFC_INTEGER_8
 ishftc8 (GFC_INTEGER_8 i, GFC_INTEGER_8 shift, GFC_INTEGER_8 size)
index 97fdc41177cb22e874a4a207198282bba34714db..140547bf482fb330f80999752bc6526bc60d82b1 100644 (file)
@@ -29,6 +29,10 @@ Boston, MA 02111-1307, USA.  */
 /* MVBITS copies LEN bits starting at bit position FROMPOS from FROM
    into TO, starting at bit position TOPOS.  */
 
+extern void SUB_NAME (const TYPE *, const GFC_INTEGER_4 *,
+                     const GFC_INTEGER_4 *, TYPE *, const GFC_INTEGER_4 *);
+export_proto(SUB_NAME);
+
 void 
 SUB_NAME (const TYPE *from, const GFC_INTEGER_4 *frompos,
           const GFC_INTEGER_4 *len, TYPE *to, const GFC_INTEGER_4 *topos)
@@ -46,7 +50,7 @@ SUB_NAME (const TYPE *from, const GFC_INTEGER_4 *frompos,
 #ifndef SUB_NAME
 #  define TYPE GFC_INTEGER_4
 #  define UTYPE GFC_UINTEGER_4
-#  define SUB_NAME prefix (mvbits_i4)
+#  define SUB_NAME mvbits_i4
 #  include "mvbits.c"
 #  undef SUB_NAME
 #  undef TYPE
@@ -54,7 +58,7 @@ SUB_NAME (const TYPE *from, const GFC_INTEGER_4 *frompos,
 
 #  define TYPE GFC_INTEGER_8
 #  define UTYPE GFC_UINTEGER_8
-#  define SUB_NAME prefix (mvbits_i8)
+#  define SUB_NAME mvbits_i8
 #  include "mvbits.c"
 #  undef SUB_NAME
 #  undef TYPE
index 75a8661ba8ffdf3316622e2ec13327c79a9a5e66..0332b7957a83bd9a7aa4f85af1d766e0ebda4f4b 100644 (file)
@@ -65,6 +65,10 @@ Boston, MA 02111-1307, USA.  */
 There are two variants of the PACK intrinsic: one, where MASK is
 array valued, and the other one where MASK is scalar.  */
 
+extern void __pack (gfc_array_char *, const gfc_array_char *,
+                   const gfc_array_l4 *, const gfc_array_char *);
+export_proto_np(__pack);
+
 void
 __pack (gfc_array_char * ret, const gfc_array_char * array,
        const gfc_array_l4 * mask, const gfc_array_char * vector)
@@ -265,6 +269,10 @@ __pack (gfc_array_char * ret, const gfc_array_char * array,
     }
 }
 
+extern void __pack_s (gfc_array_char *ret, const gfc_array_char *array,
+                     const GFC_LOGICAL_4 *, const gfc_array_char *);
+export_proto_np(__pack_s);
+
 void
 __pack_s (gfc_array_char * ret, const gfc_array_char * array,
          const GFC_LOGICAL_4 * mask, const gfc_array_char * vector)
index f4e78d0470e2eeb0d8e16f5ae682652cba7ce8f6..7989020fbc48fbb7f6663a8fb9ca9d16b06f036f 100644 (file)
@@ -38,19 +38,29 @@ static GFC_UINTEGER_8 rand_seed = 1;
 
 /* Set the seed of the irand generator.  Note 0 is a bad seed.  */
 
-void
-prefix(srand) (GFC_INTEGER_4 *i)
+static void
+srand_internal (GFC_INTEGER_8 i)
 {
-  rand_seed = (GFC_UINTEGER_8) (*i != 0) ? *i : 123459876;
+  rand_seed = i ? i : 123459876;
 }
 
+extern void PREFIX(srand) (GFC_INTEGER_4 *i);
+export_proto_np(PREFIX(srand));
+
+void
+PREFIX(srand) (GFC_INTEGER_4 *i)
+{
+  srand_internal (*i);
+}
 
 /* Return an INTEGER in the range [1,GFC_RAND_M-1].  */
 
+extern GFC_INTEGER_4 irand (GFC_INTEGER_4 *);
+iexport_proto(irand);
+
 GFC_INTEGER_4
-prefix(irand) (GFC_INTEGER_4 *i)
+irand (GFC_INTEGER_4 *i)
 {
-  
   GFC_INTEGER_4 j;
   if (i)
     j = *i;
@@ -66,25 +76,29 @@ prefix(irand) (GFC_INTEGER_4 *i)
     /* Reset the RN sequence to system-dependent sequence and return the
        first value.  */
     case 1:
-      j = 0;
-      prefix(srand) (&j);
+      srand_internal (0);
       break;
     
     /* Seed the RN sequence with j and return the first value.  */
     default:
-      prefix(srand) (&j);
+      srand_internal (j);
+      break;
    }
 
    rand_seed = GFC_RAND_A * rand_seed % GFC_RAND_M;
 
    return (GFC_INTEGER_4) rand_seed;
 }
+iexport(irand);
 
 
 /*  Return a random REAL in the range [0,1).  */
 
+extern GFC_REAL_4 PREFIX(rand) (GFC_INTEGER_4 *i);
+export_proto_np(PREFIX(rand));
+
 GFC_REAL_4
-prefix(rand) (GFC_INTEGER_4 *i)
+PREFIX(rand) (GFC_INTEGER_4 *i)
 {
-  return normalize_r4_i4 (prefix(irand) (i) - 1, GFC_RAND_M1 - 1);
+  return normalize_r4_i4 (irand (i) - 1, GFC_RAND_M1 - 1);
 }
index 2cc5d20372d84a4f925396c0991d705bc0d0dbbc..0ea60eccac7805c062577f74935961f5d817268b 100644 (file)
@@ -20,6 +20,20 @@ License along with libgfor; see the file COPYING.LIB.  If not,
 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
+#include "libgfortran.h"
+
+extern void random_r4 (GFC_REAL_4 *);
+iexport_proto(random_r4);
+
+extern void random_r8 (GFC_REAL_8 *);
+iexport_proto(random_r8);
+
+extern void arandom_r4 (gfc_array_r4 *);
+export_proto(arandom_r4);
+
+extern void arandom_r8 (gfc_array_r8 *);
+export_proto(arandom_r8);
+
 #if 0
 
 /*  The Mersenne Twister code is currently commented out due to
@@ -45,7 +59,6 @@ Boston, MA 02111-1307, USA.  */
        Generation. ( Early in 1998 ).  */
 
 
-#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
@@ -56,8 +69,6 @@ Boston, MA 02111-1307, USA.  */
 #include <unistd.h>
 #endif
 
-#include "libgfortran.h"
-
 /*Use the 'big' generator by default ( period -> 2**19937 ).  */
 
 #define MT19937
@@ -89,8 +100,7 @@ static unsigned int seed[N];
    and also reading and writing of the seed.  */
 
 void
-random_seed (GFC_INTEGER_4 * size, const gfc_array_i4 * put,
-            const gfc_array_i4 * get)
+random_seed (GFC_INTEGER_4 *size, gfc_array_i4 *put, gfc_array_i4 *get)
 {
   /* Initialize the seed in system dependent manner.  */
   if (get == NULL && put == NULL && size == NULL)
@@ -167,6 +177,7 @@ random_seed (GFC_INTEGER_4 * size, const gfc_array_i4 * put,
        get->data[i * get->dim[0].stride] = seed[i];
     }
 }
+iexport(random_seed);
 
 /* Here is the internal routine which generates the random numbers
    in 'batches' based upon the need for a new batch.
@@ -197,7 +208,6 @@ random_generate (void)
 
 /* A routine to return a REAL(KIND=4).  */
 
-#define random_r4 prefix(random_r4)
 void
 random_r4 (GFC_REAL_4 * harv)
 {
@@ -209,10 +219,10 @@ random_r4 (GFC_REAL_4 * harv)
   *harv = (GFC_REAL_4) ((GFC_REAL_4) (GFC_UINTEGER_4) seed[i++] /
                        (GFC_REAL_4) (~(GFC_UINTEGER_4) 0));
 }
+iexport(random_r4);
 
 /* A routine to return a REAL(KIND=8).  */
 
-#define random_r8 prefix(random_r8)
 void
 random_r8 (GFC_REAL_8 * harv)
 {
@@ -225,12 +235,12 @@ random_r8 (GFC_REAL_8 * harv)
          (GFC_REAL_8) (~(GFC_UINTEGER_8) 0);
   i += 2;
 }
+iexport(random_r8);
 
 /* Code to handle arrays will follow here.  */
 
 /* REAL(KIND=4) REAL array.  */
 
-#define arandom_r4 prefix(arandom_r4)
 void
 arandom_r4 (gfc_array_r4 * harv)
 {
@@ -304,7 +314,6 @@ arandom_r4 (gfc_array_r4 * harv)
 
 /* REAL(KIND=8) array.  */
 
-#define arandom_r8 prefix(arandom_r8)
 void
 arandom_r8 (gfc_array_r8 * harv)
 {
@@ -376,8 +385,8 @@ arandom_r8 (gfc_array_r8 * harv)
        }
     }
 }
-#endif /* Mersenne Twister code */
 
+#else
 
 /* George Marsaglia's KISS (Keep It Simple Stupid) random number generator.
 
@@ -418,9 +427,6 @@ arandom_r8 (gfc_array_r8 * harv)
 "There is no copyright on the code below." included the original
 KISS algorithm.  */
 
-#include "config.h"
-#include "libgfortran.h"
-
 #define GFC_SL(k, n)   ((k)^((k)<<(n)))
 #define GFC_SR(k, n)   ((k)^((k)>>(n)))
 
@@ -436,7 +442,6 @@ static GFC_UINTEGER_4 kiss_seed[4] = KISS_DEFAULT_SEED;
 static GFC_UINTEGER_4
 kiss_random_kernel(void)
 {
-
   GFC_UINTEGER_4 kiss;
 
   kiss_seed[0] = 69069 * kiss_seed[0] + 1327217885;
@@ -446,16 +451,14 @@ kiss_random_kernel(void)
   kiss = kiss_seed[0] + kiss_seed[1] + (kiss_seed[2] << 16) + kiss_seed[3];
 
   return kiss;
-
 }
 
 /*  This function produces a REAL(4) value from the uniform distribution
     with range [0,1).  */
 
 void
-prefix(random_r4) (GFC_REAL_4 *x)
+random_r4 (GFC_REAL_4 *x)
 {
-
   GFC_UINTEGER_4 kiss;
 
   kiss = kiss_random_kernel ();
@@ -464,26 +467,27 @@ prefix(random_r4) (GFC_REAL_4 *x)
   kiss_random_kernel ();
   *x = normalize_r4_i4 (kiss, ~(GFC_UINTEGER_4) 0);
 }
+iexport(random_r4);
 
 /*  This function produces a REAL(8) value from the uniform distribution
     with range [0,1).  */
 
 void
-prefix(random_r8) (GFC_REAL_8 *x)
+random_r8 (GFC_REAL_8 *x)
 {
-
   GFC_UINTEGER_8 kiss;
 
   kiss = ((GFC_UINTEGER_8)kiss_random_kernel ()) << 32;
   kiss += kiss_random_kernel ();
   *x = normalize_r8_i8 (kiss, ~(GFC_UINTEGER_8) 0);
 }
+iexport(random_r8);
 
 /*  This function fills a REAL(4) array with values from the uniform
     distribution with range [0,1).  */
 
 void
-prefix(arandom_r4) (gfc_array_r4 *x)
+arandom_r4 (gfc_array_r4 *x)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -513,7 +517,7 @@ prefix(arandom_r4) (gfc_array_r4 *x)
 
   while (dest)
     {
-      prefix(random_r4) (dest);
+      random_r4 (dest);
 
       /* Advance to the next element.  */
       dest += stride0;
@@ -547,7 +551,7 @@ prefix(arandom_r4) (gfc_array_r4 *x)
     distribution with range [0,1).  */
 
 void
-prefix(arandom_r8) (gfc_array_r8 *x)
+arandom_r8 (gfc_array_r8 *x)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -577,7 +581,7 @@ prefix(arandom_r8) (gfc_array_r8 *x)
 
   while (dest)
     {
-      prefix(random_r8) (dest);
+      random_r8 (dest);
 
       /* Advance to the next element.  */
       dest += stride0;
@@ -607,8 +611,8 @@ prefix(arandom_r8) (gfc_array_r8 *x)
     }
 }
 
-/* prefix(random_seed) is used to seed the PRNG with either a default
-   set of seeds or user specified set of seeds.  prefix(random_seed) 
+/* random_seed is used to seed the PRNG with either a default
+   set of seeds or user specified set of seeds.  random_seed 
    must be called with no argument or exactly one argument.  */
 
 void
@@ -666,3 +670,6 @@ random_seed (GFC_INTEGER_4 *size, gfc_array_i4 *put, gfc_array_i4 *get)
         get->data[i * get->dim[0].stride] = (GFC_INTEGER_4) kiss_seed[i];
     }
 }
+iexport(random_seed);
+
+#endif /* mersenne twister */
index 5314456ca26a7f9e2d6c7fcd73ab6f3133a65349..aecc6b6469de02b4bc2673d538fb41e50cfaf77d 100644 (file)
@@ -28,6 +28,9 @@ Boston, MA 02111-1307, USA.  */
 typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type;
 typedef GFC_ARRAY_DESCRIPTOR(GFC_MAX_DIMENSIONS, char) parray;
 
+extern void __reshape (parray *, parray *, shape_type *,
+                      parray *, shape_type *);
+export_proto_np(__reshape);
 
 /* The shape parameter is ignored. We can currently deduce the shape from the
    return array.  */
index f83f6c0162ec962962224e81cdd9cd811256b24b..b001f3430df576668d09714dd97bc3113e3ff812 100644 (file)
@@ -21,7 +21,8 @@ Boston, MA 02111-1307, USA.  */
 
 #include "libgfortran.h"
 
-index_type size0 (const array_t * array)
+index_type
+size0 (const array_t * array)
 {
   int n;
   index_type size;
@@ -37,9 +38,13 @@ index_type size0 (const array_t * array)
     }
   return size;
 }
+iexport(size0);
 
-#define size1 prefix(size1)
-index_type size1 (const array_t * array, index_type dim)
+extern index_type size1 (const array_t * array, index_type dim);
+export_proto(size1);
+
+index_type
+size1 (const array_t * array, index_type dim)
 {
   index_type size;
 
index f65f869d3b0e74d62c59be8f73801c61e13def53..0cada54c99f130f4495d50ae416e23a2f39e24bc 100644 (file)
@@ -25,6 +25,10 @@ Boston, MA 02111-1307, USA.  */
 #include <string.h>
 #include "libgfortran.h"
 
+extern void __spread (const gfc_array_char *, const gfc_array_char *,
+                     const index_type *, const index_type *);
+export_proto_np(__spread);
+
 void
 __spread (const gfc_array_char * ret, const gfc_array_char * source,
     const index_type * along, const index_type * pncopies)
index 8f250d460f022208cd29a46b4153991661ec0099..de4a14736fa0fbff0b1e15a34449ab06b5dce009 100644 (file)
@@ -52,9 +52,13 @@ Boston, MA 02111-1307, USA.  */
    CHARACTER(len=*), INTENT(IN) :: FILE
    INTEGER, INTENT(OUT), :: SARRAY(13)  */
 
+extern void stat_i4_sub (char *, gfc_array_i4 *, GFC_INTEGER_4 *,
+                        gfc_charlen_type);
+iexport_proto(stat_i4_sub);
+
 void
-prefix(stat_i4_sub) (char * name, gfc_array_i4 * sarray,
-                     GFC_INTEGER_4 * status,  gfc_charlen_type name_len)
+stat_i4_sub (char *name, gfc_array_i4 *sarray, GFC_INTEGER_4 *status,
+            gfc_charlen_type name_len)
 {
   int val;
   char *str;
@@ -68,10 +72,10 @@ prefix(stat_i4_sub) (char * name, gfc_array_i4 * sarray,
 
   /* If the array is too small, abort.  */
   if (sarray->dim[0].ubound + 1 - sarray->dim[0].lbound < 13)
-       runtime_error ("Array size of SARRAY is too small.");
+    runtime_error ("Array size of SARRAY is too small.");
 
   if (sarray->dim[0].stride == 0)
-       sarray->dim[0].stride = 1;
+    sarray->dim[0].stride = 1;
 
   /* Trim trailing spaces from name.  */
   while (name_len > 0 && name[name_len - 1] == ' ')
@@ -141,10 +145,15 @@ prefix(stat_i4_sub) (char * name, gfc_array_i4 * sarray,
   if (status != NULL) 
     *status = (val == 0) ? 0 : errno;
 }
+iexport(stat_i4_sub);
+
+extern void stat_i8_sub (char *, gfc_array_i8 *, GFC_INTEGER_8 *,
+                        gfc_charlen_type);
+iexport_proto(stat_i8_sub);
 
 void
-prefix(stat_i8_sub) (char * name, gfc_array_i8 * sarray,
-                     GFC_INTEGER_8 * status, gfc_charlen_type name_len)
+stat_i8_sub (char *name, gfc_array_i8 *sarray, GFC_INTEGER_8 *status,
+            gfc_charlen_type name_len)
 {
   int val;
   char *str;
@@ -158,10 +167,10 @@ prefix(stat_i8_sub) (char * name, gfc_array_i8 * sarray,
 
   /* If the array is too small, abort.  */
   if (sarray->dim[0].ubound + 1 - sarray->dim[0].lbound < 13)
-       runtime_error ("Array size of SARRAY is too small.");
+    runtime_error ("Array size of SARRAY is too small.");
 
   if (sarray->dim[0].stride == 0)
-       sarray->dim[0].stride = 1;
+    sarray->dim[0].stride = 1;
 
   /* Trim trailing spaces from name.  */
   while (name_len > 0 && name[name_len - 1] == ' ')
@@ -231,25 +240,27 @@ prefix(stat_i8_sub) (char * name, gfc_array_i8 * sarray,
   if (status != NULL) 
     *status = (val == 0) ? 0 : errno;
 }
+iexport(stat_i8_sub);
 
+extern GFC_INTEGER_4 stat_i4 (char *, gfc_array_i4 *, gfc_charlen_type);
+export_proto(stat_i4);
 
 GFC_INTEGER_4
-prefix(stat_i4) (char * name, gfc_array_i4 * sarray,
-                 gfc_charlen_type name_len)
+stat_i4 (char *name, gfc_array_i4 *sarray, gfc_charlen_type name_len)
 {
-
   GFC_INTEGER_4 val;
-  prefix(stat_i4_sub) (name, sarray, &val, name_len);
+  stat_i4_sub (name, sarray, &val, name_len);
   return val;
 }
 
+extern GFC_INTEGER_8 stat_i8 (char *, gfc_array_i8 *, gfc_charlen_type);
+export_proto(stat_i8);
 
 GFC_INTEGER_8
-prefix(stat_i8) (char * name, gfc_array_i8 * sarray,
-                 gfc_charlen_type name_len)
+stat_i8 (char *name, gfc_array_i8 *sarray, gfc_charlen_type name_len)
 {
   GFC_INTEGER_8 val;
-  prefix(stat_i8_sub) (name, sarray, &val, name_len);
+  stat_i8_sub (name, sarray, &val, name_len);
   return val;
 }
 
@@ -264,9 +275,11 @@ prefix(stat_i8) (char * name, gfc_array_i8 * sarray,
    INTEGER, INTENT(IN) :: UNIT 
    INTEGER, INTENT(OUT) :: SARRAY(13)  */
 
+extern void fstat_i4_sub (GFC_INTEGER_4 *, gfc_array_i4 *, GFC_INTEGER_4 *);
+iexport_proto(fstat_i4_sub);
+
 void
-prefix(fstat_i4_sub) (GFC_INTEGER_4 * unit, gfc_array_i4 * sarray,
-                     GFC_INTEGER_4 * status)
+fstat_i4_sub (GFC_INTEGER_4 *unit, gfc_array_i4 *sarray, GFC_INTEGER_4 *status)
 {
   int val;
   struct stat sb;
@@ -279,10 +292,10 @@ prefix(fstat_i4_sub) (GFC_INTEGER_4 * unit, gfc_array_i4 * sarray,
 
   /* If the array is too small, abort.  */
   if (sarray->dim[0].ubound + 1 - sarray->dim[0].lbound < 13)
-       runtime_error ("Array size of SARRAY is too small.");
+    runtime_error ("Array size of SARRAY is too small.");
 
   if (sarray->dim[0].stride == 0)
-       sarray->dim[0].stride = 1;
+    sarray->dim[0].stride = 1;
 
   /* Convert Fortran unit number to C file descriptor.  */
   val = unit_to_fd (*unit);
@@ -346,10 +359,13 @@ prefix(fstat_i4_sub) (GFC_INTEGER_4 * unit, gfc_array_i4 * sarray,
   if (status != NULL) 
     *status = (val == 0) ? 0 : errno;
 }
+iexport(fstat_i4_sub);
+
+extern void fstat_i8_sub (GFC_INTEGER_8 *, gfc_array_i8 *, GFC_INTEGER_8 *);
+iexport_proto(fstat_i8_sub);
 
 void
-prefix(fstat_i8_sub) (GFC_INTEGER_8 * unit, gfc_array_i8 * sarray,
-                     GFC_INTEGER_8 * status)
+fstat_i8_sub (GFC_INTEGER_8 *unit, gfc_array_i8 *sarray, GFC_INTEGER_8 *status)
 {
   int val;
   struct stat sb;
@@ -362,10 +378,10 @@ prefix(fstat_i8_sub) (GFC_INTEGER_8 * unit, gfc_array_i8 * sarray,
 
   /* If the array is too small, abort.  */
   if (sarray->dim[0].ubound + 1 - sarray->dim[0].lbound < 13)
-       runtime_error ("Array size of SARRAY is too small.");
+    runtime_error ("Array size of SARRAY is too small.");
 
   if (sarray->dim[0].stride == 0)
-       sarray->dim[0].stride = 1;
+    sarray->dim[0].stride = 1;
 
   /* Convert Fortran unit number to C file descriptor.  */
   val = unit_to_fd ((int) *unit);
@@ -429,21 +445,26 @@ prefix(fstat_i8_sub) (GFC_INTEGER_8 * unit, gfc_array_i8 * sarray,
   if (status != NULL) 
     *status = (val == 0) ? 0 : errno;
 }
+iexport(fstat_i8_sub);
 
+extern GFC_INTEGER_4 fstat_i4 (GFC_INTEGER_4 *, gfc_array_i4 *);
+export_proto(fstat_i4);
 
 GFC_INTEGER_4
-prefix(fstat_i4) (GFC_INTEGER_4 * unit, gfc_array_i4 * sarray)
+fstat_i4 (GFC_INTEGER_4 *unit, gfc_array_i4 *sarray)
 {
   GFC_INTEGER_4 val;
-  prefix(fstat_i4_sub) (unit, sarray, &val);
+  fstat_i4_sub (unit, sarray, &val);
   return val;
 }
 
+extern GFC_INTEGER_8 fstat_i8 (GFC_INTEGER_8 *, gfc_array_i8 *);
+export_proto(fstat_i8);
 
 GFC_INTEGER_8
-prefix(fstat_i8) (GFC_INTEGER_8 * unit, gfc_array_i8 * sarray)
+fstat_i8 (GFC_INTEGER_8 *unit, gfc_array_i8 *sarray)
 {
   GFC_INTEGER_8 val;
-  prefix(fstat_i8_sub) (unit, sarray, &val);
+  fstat_i8_sub (unit, sarray, &val);
   return val;
 }
index faacaab56f84b8936b7ae1b538fa0d1f19599452..f5b5bc141fb86f927ff013590ac0657a1d02099f 100644 (file)
@@ -35,40 +35,40 @@ Boston, MA 02111-1307, USA.  */
 
 /* String functions.  */
 
-#define copy_string prefix(copy_string)
-void copy_string (GFC_INTEGER_4, char *, GFC_INTEGER_4, const char *);
+extern void copy_string (GFC_INTEGER_4, char *, GFC_INTEGER_4, const char *);
+export_proto(copy_string);
 
-#define concat_string prefix(concat_string)
-void concat_string (GFC_INTEGER_4, char *,
-                   GFC_INTEGER_4, const char *,
-                   GFC_INTEGER_4, const char *);
+extern void concat_string (GFC_INTEGER_4, char *,
+                          GFC_INTEGER_4, const char *,
+                          GFC_INTEGER_4, const char *);
+export_proto(concat_string);
 
-#define string_len_trim prefix(string_len_trim)
-GFC_INTEGER_4 string_len_trim (GFC_INTEGER_4, const char *);
+extern GFC_INTEGER_4 string_len_trim (GFC_INTEGER_4, const char *);
+export_proto(string_len_trim);
 
-#define adjustl prefix(adjustl)
-void adjustl (char *, GFC_INTEGER_4, const char *);
+extern void adjustl (char *, GFC_INTEGER_4, const char *);
+export_proto(adjustl);
 
-#define adjustr prefix(adjustr)
-void adjustr (char *, GFC_INTEGER_4, const char *);
+extern void adjustr (char *, GFC_INTEGER_4, const char *);
+export_proto(adjustr);
 
-#define string_index prefix(string_index)
-GFC_INTEGER_4 string_index (GFC_INTEGER_4, const char *, GFC_INTEGER_4,
-                           const char *, GFC_LOGICAL_4);
+extern GFC_INTEGER_4 string_index (GFC_INTEGER_4, const char *, GFC_INTEGER_4,
+                                  const char *, GFC_LOGICAL_4);
+export_proto(string_index);
 
-#define string_scan prefix(string_scan)
-GFC_INTEGER_4 string_scan (GFC_INTEGER_4, const char *, GFC_INTEGER_4,
-                           const char *, GFC_LOGICAL_4);
+extern GFC_INTEGER_4 string_scan (GFC_INTEGER_4, const char *, GFC_INTEGER_4,
+                                 const char *, GFC_LOGICAL_4);
+export_proto(string_scan);
 
-#define string_verify prefix(string_verify)
-GFC_INTEGER_4 string_verify (GFC_INTEGER_4, const char *, GFC_INTEGER_4,
-                             const char *, GFC_LOGICAL_4);
+extern GFC_INTEGER_4 string_verify (GFC_INTEGER_4, const char *, GFC_INTEGER_4,
+                                   const char *, GFC_LOGICAL_4);
+export_proto(string_verify);
 
-#define string_trim prefix(string_trim)
-void string_trim (GFC_INTEGER_4 *, void **, GFC_INTEGER_4, const char *);
+extern void string_trim (GFC_INTEGER_4 *, void **, GFC_INTEGER_4, const char *);
+export_proto(string_trim);
 
-#define string_repeat prefix(string_repeat)
-void string_repeat (char *, GFC_INTEGER_4, const char *, GFC_INTEGER_4);
+extern void string_repeat (char *, GFC_INTEGER_4, const char *, GFC_INTEGER_4);
+export_proto(string_repeat);
 
 /* The two areas may overlap so we use memmove.  */
 
@@ -136,6 +136,7 @@ compare_string (GFC_INTEGER_4 len1, const char * s1,
 
   return 0;
 }
+iexport(compare_string);
 
 
 /* The destination and source should not overlap.  */
index d962601d1656bfc352a29f4e4035f63620c59f59..308717e6fe24640733a5b585697f3032d739a566 100644 (file)
@@ -39,9 +39,12 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 #include "libgfortran.h"
 
+extern void system_sub (const char *fcmd, GFC_INTEGER_4 * status,
+                       gfc_charlen_type cmd_len);
+iexport_proto(system_sub);
+
 void
-prefix(system_sub) (const char * fcmd, GFC_INTEGER_4 * status,
-                   gfc_charlen_type cmd_len)
+system_sub (const char *fcmd, GFC_INTEGER_4 *status, gfc_charlen_type cmd_len)
 {
   char cmd[cmd_len + 1];
   int stat;
@@ -53,12 +56,15 @@ prefix(system_sub) (const char * fcmd, GFC_INTEGER_4 * status,
   if (status)
     *status = stat;
 }
+iexport(system_sub);
+
+extern GFC_INTEGER_4 PREFIX(system) (const char *, gfc_charlen_type);
+export_proto_np(PREFIX(system));
 
 GFC_INTEGER_4
-prefix(system) (char * fcmd, gfc_charlen_type cmd_len)
+PREFIX(system) (const char *fcmd, gfc_charlen_type cmd_len)
 {
   GFC_INTEGER_4 stat;
-
-  prefix(system_sub) (fcmd, &stat, cmd_len);
+  system_sub (fcmd, &stat, cmd_len);
   return stat;
 }
index d11d1a99d35c9cf9771329df5e6d489327790e38..b778b0373a3c60ca4d6df40244beda772da8660b 100644 (file)
@@ -41,14 +41,22 @@ static struct timeval tp0 = {-1, 0};
 static time_t t0 = (time_t) -2;
 #endif
 
+
+extern void system_clock_4 (GFC_INTEGER_4 *, GFC_INTEGER_4 *, GFC_INTEGER_4 *);
+export_proto(system_clock_4);
+
+extern void system_clock_8 (GFC_INTEGER_8 *, GFC_INTEGER_8 *, GFC_INTEGER_8 *);
+export_proto(system_clock_8);
+
+
 /* prefix(system_clock_4) is the INTEGER(4) version of the SYSTEM_CLOCK
    intrinsic subroutine.  It returns the number of clock ticks for the current
    system time, the number of ticks per second, and the maximum possible value
    for COUNT.  On the first call to SYSTEM_CLOCK, COUNT is set to zero. */
 
 void
-prefix(system_clock_4)(GFC_INTEGER_4 *count, GFC_INTEGER_4 *count_rate,
-                      GFC_INTEGER_4 *count_max)
+system_clock_4(GFC_INTEGER_4 *count, GFC_INTEGER_4 *count_rate,
+              GFC_INTEGER_4 *count_max)
 {
   GFC_INTEGER_4 cnt;
   GFC_INTEGER_4 rate;
@@ -123,8 +131,8 @@ prefix(system_clock_4)(GFC_INTEGER_4 *count, GFC_INTEGER_4 *count_rate,
 /* INTEGER(8) version of the above routine.  */
 
 void
-prefix(system_clock_8)(GFC_INTEGER_8 *count, GFC_INTEGER_8 *count_rate,
-                      GFC_INTEGER_8 *count_max)
+system_clock_8 (GFC_INTEGER_8 *count, GFC_INTEGER_8 *count_rate,
+               GFC_INTEGER_8 *count_max)
 {
   GFC_INTEGER_8 cnt;
   GFC_INTEGER_8 rate;
index 55d2729aea93daf20ee48cbc57e4d52e3ac9e6c4..ba3014f07aa2cfeb8f9ff9806a97f1f8ce3669b3 100644 (file)
@@ -25,6 +25,9 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
+extern void __transpose (gfc_array_char *, gfc_array_char *);
+export_proto_np(__transpose);
+
 void
 __transpose (gfc_array_char * ret, gfc_array_char * source)
 {
index cf41451e31aff6c9ae9fd1d3323fc39d000619e1..2e8e165a6a35e8ab19c3fb5cdc10698cb667ed44 100644 (file)
@@ -35,41 +35,51 @@ Boston, MA 02111-1307, USA.  */
    INTEGER, INTENT(IN) :: MASK
    INTEGER, INTENT(OUT), OPTIONAL :: OLD  */
 
+extern void umask_i4_sub (GFC_INTEGER_4 *, GFC_INTEGER_4 *);
+iexport_proto(umask_i4_sub);
+
 void
-prefix(umask_i4_sub) (GFC_INTEGER_4 * mask, GFC_INTEGER_4 * old)
+umask_i4_sub (GFC_INTEGER_4 *mask, GFC_INTEGER_4 *old)
 {
-  mode_t val;
-
-  val = umask((mode_t) *mask);
+  mode_t val = umask((mode_t) *mask);
   if (old != NULL)
     *old = (GFC_INTEGER_4) val;
 }
+iexport(umask_i4_sub);
+
+extern void umask_i8_sub (GFC_INTEGER_8 *, GFC_INTEGER_8 *);
+iexport_proto(umask_i8_sub);
 
 void
-prefix(umask_i8_sub) (GFC_INTEGER_8 * mask, GFC_INTEGER_8 * old)
+umask_i8_sub (GFC_INTEGER_8 *mask, GFC_INTEGER_8 *old)
 {
-  mode_t val;
-
-  val = umask((mode_t) *mask);
+  mode_t val = umask((mode_t) *mask);
   if (old != NULL)
     *old = (GFC_INTEGER_8) val;
 }
+iexport(umask_i8_sub);
 
 /* INTEGER FUNCTION UMASK(MASK)
    INTEGER, INTENT(IN) :: MASK  */
 
+extern GFC_INTEGER_4 umask_i4 (GFC_INTEGER_4 *);
+export_proto(umask_i4);
+
 GFC_INTEGER_4
-prefix(umask) (GFC_INTEGER_4 * mask)
+umask_i4 (GFC_INTEGER_4 *mask)
 {
   GFC_INTEGER_4 old;
-  prefix(umask_i4_sub) (mask, &old);
+  umask_i4_sub (mask, &old);
   return old;
 }
 
+extern GFC_INTEGER_8 umask_i8 (GFC_INTEGER_8 *);
+export_proto(umask_i8);
+
 GFC_INTEGER_8
-prefix(umask_i8) (GFC_INTEGER_8 * mask)
+umask_i8 (GFC_INTEGER_8 *mask)
 {
   GFC_INTEGER_8 old;
-  prefix(umask_i8_sub) (mask, &old);
+  umask_i8_sub (mask, &old);
   return old;
 }
index 7ea2a1002a3d337934770c460ef8ded41383ba83..b9187068786fe32584769c0a40ef5e9ffb5f6d2f 100644 (file)
@@ -35,11 +35,13 @@ Boston, MA 02111-1307, USA.  */
    CHARACTER(LEN= ), INTENT(IN) :: NAME
    INTEGER, INTENT(OUT), OPTIONAL :: STATUS)  */
 
+extern void unlink_i4_sub (char *name, GFC_INTEGER_4 *status,
+                          gfc_charlen_type name_len);
+iexport_proto(unlink_i4_sub);
+
 void
-prefix(unlink_i4_sub) (char * name, GFC_INTEGER_4 * status,
-                      gfc_charlen_type name_len)
+unlink_i4_sub (char *name, GFC_INTEGER_4 *status, gfc_charlen_type name_len)
 {
-
   char *str, *s;
   GFC_INTEGER_4 stat;
 
@@ -57,14 +59,17 @@ prefix(unlink_i4_sub) (char * name, GFC_INTEGER_4 * status,
   if (status != NULL) 
     *status = (stat == 0) ? stat : errno;
 }
+iexport(unlink_i4_sub);
 
+extern void unlink_i8_sub (char *name, GFC_INTEGER_8 *status,
+                          gfc_charlen_type name_len);
+export_proto(unlink_i8_sub);
 
 void
-prefix(unlink_i8_sub) (char * name, GFC_INTEGER_8 * status,
-                              gfc_charlen_type name_len)
+unlink_i8_sub (char *name, GFC_INTEGER_8 *status, gfc_charlen_type name_len)
 {
   GFC_INTEGER_4 status4;
-  prefix (unlink_i4_sub) (name, &status4, name_len);
+  unlink_i4_sub (name, &status4, name_len);
   if (status)
     *status = status4;
 }
@@ -73,10 +78,13 @@ prefix(unlink_i8_sub) (char * name, GFC_INTEGER_8 * status,
 /* INTEGER FUNCTION UNLINK(NAME)
    CHARACTER(LEN= ), INTENT(IN) :: NAME  */
 
+extern GFC_INTEGER_4 PREFIX(unlink) (char *, gfc_charlen_type);
+export_proto_np(PREFIX(unlink));
+
 GFC_INTEGER_4
-prefix(unlink) (char * name, gfc_charlen_type name_len)
+PREFIX(unlink) (char *name, gfc_charlen_type name_len)
 {
   GFC_INTEGER_4 status;
-  prefix(unlink_i4_sub) (name, &status, name_len);
+  unlink_i4_sub (name, &status, name_len);
   return status;
 }
index a301b58d46be35bbe1632b59b401ab199c12b440..16deea4d48d751a57cc5b5fd6cdfa133384e0e2c 100644 (file)
@@ -25,6 +25,10 @@ Boston, MA 02111-1307, USA.  */
 #include <string.h>
 #include "libgfortran.h"
 
+extern void __unpack1 (const gfc_array_char *, const gfc_array_char *,
+                      const gfc_array_l4 *, const gfc_array_char *);
+export_proto_np(__unpack1);
+
 void
 __unpack1 (const gfc_array_char * ret, const gfc_array_char * vector,
     const gfc_array_l4 * mask, const gfc_array_char * field)
@@ -140,6 +144,10 @@ __unpack1 (const gfc_array_char * ret, const gfc_array_char * vector,
     }
 }
 
+extern void __unpack0 (const gfc_array_char *, const gfc_array_char *,
+                      const gfc_array_l4 *, char *);
+export_proto_np(__unpack0);
+
 void
 __unpack0 (const gfc_array_char * ret, const gfc_array_char * vector,
     const gfc_array_l4 * mask, char * field)
index eb25b108146cd935dde400f11f7bf1afaeaf8b3b..9cdddb682082dd529165e486b358f8fe0a440bf1 100644 (file)
@@ -114,6 +114,9 @@ unformatted_backspace (void)
 }
 
 
+extern void st_backspace (void);
+export_proto(st_backspace);
+
 void
 st_backspace (void)
 {
index 48d669b2ce711cc04aa3fd1f63c2852836a03e8f..827eea86521fb2bf6321ac46ffebbecffd6de2b7 100644 (file)
@@ -33,6 +33,9 @@ static st_option status_opt[] = {
 };
 
 
+extern void st_close (void);
+export_proto(st_close);
+
 void
 st_close (void)
 {
index d8462a3faed566a246452caa5f47d4c98d5da0de..76a1c34a04d1026d8758f9b5b12f901e383bd697 100644 (file)
@@ -24,6 +24,9 @@ Boston, MA 02111-1307, USA.  */
 
 /* endfile.c--  Implement the ENDFILE statement */
 
+extern void st_endfile (void);
+export_proto(st_endfile);
+
 void
 st_endfile (void)
 {
index a93f99dc1704c4f179491aea57dace73580b3149..290f31c832e8e01d039d8f93d918b5e9ed61368d 100644 (file)
@@ -356,6 +356,9 @@ inquire_via_filename (void)
 /* Library entry point for the INQUIRE statement (non-IOLENGTH
    form).  */
 
+extern void st_inquire (void);
+export_proto(st_inquire);
+
 void
 st_inquire (void)
 {
index e30944863c73dbe32a2cd5c2574c123faa979e1f..e4f8f889bc0ca62ffe1549fe8331c941aac3dbd3 100644 (file)
@@ -25,6 +25,7 @@ Boston, MA 02111-1307, USA.  */
 
 #include <setjmp.h>
 #include "libgfortran.h"
+
 #define DEFAULT_TEMPDIR "/var/tmp"
 
 /* Basic types used in data transfers.  */
@@ -44,10 +45,10 @@ typedef struct stream
 {
   char *(*alloc_w_at) (struct stream *, int *, gfc_offset);
   char *(*alloc_r_at) (struct stream *, int *, gfc_offset);
-    try (*sfree) (struct stream *);
-    try (*close) (struct stream *);
-    try (*seek) (struct stream *, gfc_offset);
-    try (*truncate) (struct stream *);
+  try (*sfree) (struct stream *);
+  try (*close) (struct stream *);
+  try (*seek) (struct stream *, gfc_offset);
+  try (*truncate) (struct stream *);
 }
 stream;
 
@@ -230,13 +231,11 @@ typedef struct
 }
 st_parameter;
 
-
-
-#define ioparm prefix(ioparm)
 extern st_parameter ioparm;
+iexport_data_proto(ioparm);
 
-#define ionml prefix(ionml)
 extern namelist_info * ionml;
+internal_proto(ionml);
 
 typedef struct
 {
@@ -311,13 +310,11 @@ typedef struct
 }
 global_t;
 
-
-#define g prefix(g)
 extern global_t g;
+internal_proto(g);
 
-
-#define current_unit prefix(current_unit)
 extern gfc_unit *current_unit;
+internal_proto(current_unit);
 
 /* Format tokens.  Only about half of these can be stored in the
    format nodes.  */
@@ -384,283 +381,230 @@ fnode;
 
 /* unix.c */
 
-#define sys_exit prefix(sys_exit)
-void sys_exit (int) __attribute__ ((noreturn));
-
-#define move_pos_offset prefix(move_pos_offset)
-int move_pos_offset (stream *, int);
+extern int move_pos_offset (stream *, int);
+internal_proto(move_pos_offset);
 
-#define get_oserror prefix(get_oserror)
-const char *get_oserror (void);
+extern int compare_files (stream *, stream *);
+internal_proto(compare_files);
 
-#define compare_files prefix(compare_files)
-int compare_files (stream *, stream *);
+extern stream *init_error_stream (void);
+internal_proto(init_error_stream);
 
-#define init_error_stream prefix(init_error_stream)
-stream *init_error_stream (void);
+extern stream *open_external (unit_flags *);
+internal_proto(open_external);
 
-#define open_external prefix(open_external)
-stream *open_external (unit_flags *);
+extern stream *open_internal (char *, int);
+internal_proto(open_internal);
 
-#define open_internal prefix(open_internal)
-stream *open_internal (char *, int);
+extern stream *input_stream (void);
+internal_proto(input_stream);
 
-#define input_stream prefix(input_stream)
-stream *input_stream (void);
+extern stream *output_stream (void);
+internal_proto(output_stream);
 
-#define output_stream prefix(output_stream)
-stream *output_stream (void);
+extern int compare_file_filename (stream *, const char *, int);
+internal_proto(compare_file_filename);
 
-#define compare_file_filename prefix(compare_file_filename)
-int compare_file_filename (stream *, const char *, int);
+extern gfc_unit *find_file (void);
+internal_proto(find_file);
 
-#define find_file prefix(find_file)
-gfc_unit *find_file (void);
+extern int stream_at_bof (stream *);
+internal_proto(stream_at_bof);
 
-#define stream_at_bof prefix(stream_at_bof)
-int stream_at_bof (stream *);
+extern int stream_at_eof (stream *);
+internal_proto(stream_at_eof);
 
-#define stream_at_eof prefix(stream_at_eof)
-int stream_at_eof (stream *);
+extern int delete_file (gfc_unit *);
+internal_proto(delete_file);
 
-#define delete_file prefix(delete_file)
-int delete_file (gfc_unit *);
+extern int file_exists (void);
+internal_proto(file_exists);
 
-#define file_exists prefix(file_exists)
-int file_exists (void);
+extern const char *inquire_sequential (const char *, int);
+internal_proto(inquire_sequential);
 
-#define inquire_sequential prefix(inquire_sequential)
-const char *inquire_sequential (const char *, int);
+extern const char *inquire_direct (const char *, int);
+internal_proto(inquire_direct);
 
-#define inquire_direct prefix(inquire_direct)
-const char *inquire_direct (const char *, int);
+extern const char *inquire_formatted (const char *, int);
+internal_proto(inquire_formatted);
 
-#define inquire_formatted prefix(inquire_formatted)
-const char *inquire_formatted (const char *, int);
+extern const char *inquire_unformatted (const char *, int);
+internal_proto(inquire_unformatted);
 
-#define inquire_unformatted prefix(inquire_unformatted)
-const char *inquire_unformatted (const char *, int);
+extern const char *inquire_read (const char *, int);
+internal_proto(inquire_read);
 
-#define inquire_read prefix(inquire_read)
-const char *inquire_read (const char *, int);
+extern const char *inquire_write (const char *, int);
+internal_proto(inquire_write);
 
-#define inquire_write prefix(inquire_write)
-const char *inquire_write (const char *, int);
+extern const char *inquire_readwrite (const char *, int);
+internal_proto(inquire_readwrite);
 
-#define inquire_readwrite prefix(inquire_readwrite)
-const char *inquire_readwrite (const char *, int);
+extern gfc_offset file_length (stream *);
+internal_proto(file_length);
 
-#define file_length prefix(file_length)
-gfc_offset file_length (stream *);
+extern gfc_offset file_position (stream *);
+internal_proto(file_position);
 
-#define file_position prefix(file_position)
-gfc_offset file_position (stream *);
+extern int is_seekable (stream *);
+internal_proto(is_seekable);
 
-#define is_seekable prefix(is_seekable)
-int is_seekable (stream *);
+extern void empty_internal_buffer(stream *);
+internal_proto(empty_internal_buffer);
 
-#define empty_internal_buffer prefix(empty_internal_buffer)
-void empty_internal_buffer(stream *);
+extern try flush (stream *);
+internal_proto(flush);
 
-#define flush prefix(flush)
-try flush (stream *);
-
-#define unit_to_fd prefix(unit_to_fd)
-int unit_to_fd (int);
+extern int unit_to_fd (int);
+internal_proto(unit_to_fd);
 
 /* unit.c */
 
-#define insert_unit prefix(insert_unix)
-void insert_unit (gfc_unit *);
+extern void insert_unit (gfc_unit *);
+internal_proto(insert_unit);
 
-#define close_unit prefix(close_unit)
-int close_unit (gfc_unit *);
+extern int close_unit (gfc_unit *);
+internal_proto(close_unit);
 
-#define is_internal_unit prefix(is_internal_unit)
-int is_internal_unit (void);
+extern int is_internal_unit (void);
+internal_proto(is_internal_unit);
 
-#define find_unit prefix(find_unit)
-gfc_unit *find_unit (int);
+extern gfc_unit *find_unit (int);
+internal_proto(find_unit);
 
-#define get_unit prefix(get_unit)
-gfc_unit *get_unit (int);
+extern gfc_unit *get_unit (int);
+internal_proto(get_unit);
 
 /* open.c */
 
-#define test_endfile prefix(test_endfile)
-void test_endfile (gfc_unit *);
+extern void test_endfile (gfc_unit *);
+internal_proto(test_endfile);
 
-#define new_unit prefix(new_unit)
-void new_unit (unit_flags *);
+extern void new_unit (unit_flags *);
+internal_proto(new_unit);
 
 /* format.c */
 
-#define parse_format prefix(parse_format)
-void parse_format (void);
+extern void parse_format (void);
+internal_proto(parse_format);
 
-#define next_format prefix(next_format)
-fnode *next_format (void);
+extern fnode *next_format (void);
+internal_proto(next_format);
 
-#define unget_format prefix(unget_format)
-void unget_format (fnode *);
+extern void unget_format (fnode *);
+internal_proto(unget_format);
 
-#define format_error prefix(format_error)
-void format_error (fnode *, const char *);
+extern void format_error (fnode *, const char *);
+internal_proto(format_error);
 
-#define free_fnodes prefix(free_fnodes)
-void free_fnodes (void);
+extern void free_fnodes (void);
+internal_proto(free_fnodes);
 
 /* transfer.c */
 
 #define SCRATCH_SIZE 300
 
-#define scratch prefix(scratch)
 extern char scratch[];
+internal_proto(scratch);
 
-#define type_name prefix(type_name)
-const char *type_name (bt);
-
-#define read_block prefix(read_block)
-void *read_block (int *);
-
-#define write_block prefix(write_block)
-void *write_block (int);
-
-#define transfer_integer prefix(transfer_integer)
-void transfer_integer (void *, int);
-
-#define transfer_real prefix(transfer_real)
-void transfer_real (void *, int);
+extern const char *type_name (bt);
+internal_proto(type_name);
 
-#define transfer_logical prefix(transfer_logical)
-void transfer_logical (void *, int);
+extern void *read_block (int *);
+internal_proto(read_block);
 
-#define transfer_character prefix(transfer_character)
-void transfer_character (void *, int);
+extern void *write_block (int);
+internal_proto(write_block);
 
-#define transfer_complex prefix(transfer_complex)
-void transfer_complex (void *, int);
-
-#define next_record prefix(next_record)
-void next_record (int);
-
-#define st_set_nml_var_int prefix(st_set_nml_var_int)
-void st_set_nml_var_int (void * , char * , int , int );
-
-#define st_set_nml_var_float prefix(st_set_nml_var_float)
-void st_set_nml_var_float (void * , char * , int , int );
-
-#define st_set_nml_var_char prefix(st_set_nml_var_char)
-void st_set_nml_var_char (void * , char * , int , int, gfc_charlen_type);
-
-#define st_set_nml_var_complex prefix(st_set_nml_var_complex)
-void st_set_nml_var_complex (void * , char * , int , int );
-
-#define st_set_nml_var_log prefix(st_set_nml_var_log)
-void st_set_nml_var_log (void * , char * , int , int );
+extern void next_record (int);
+internal_proto(next_record);
 
 /* read.c */
 
-#define set_integer prefix(set_integer)
-void set_integer (void *, int64_t, int);
+extern void set_integer (void *, int64_t, int);
+internal_proto(set_integer);
 
-#define max_value prefix(max_value)
-uint64_t max_value (int, int);
+extern uint64_t max_value (int, int);
+internal_proto(max_value);
 
-#define convert_real prefix(convert_real)
-int convert_real (void *, const char *, int);
+extern int convert_real (void *, const char *, int);
+internal_proto(convert_real);
 
-#define read_a prefix(read_a)
-void read_a (fnode *, char *, int);
+extern void read_a (fnode *, char *, int);
+internal_proto(read_a);
 
-#define read_f prefix(read_f)
-void read_f (fnode *, char *, int);
+extern void read_f (fnode *, char *, int);
+internal_proto(read_f);
 
-#define read_l prefix(read_l)
-void read_l (fnode *, char *, int);
+extern void read_l (fnode *, char *, int);
+internal_proto(read_l);
 
-#define read_x prefix(read_x)
-void read_x (fnode *);
+extern void read_x (fnode *);
+internal_proto(read_x);
 
-#define read_radix prefix(read_radix)
-void read_radix (fnode *, char *, int, int);
+extern void read_radix (fnode *, char *, int, int);
+internal_proto(read_radix);
 
-#define read_decimal prefix(read_decimal)
-void read_decimal (fnode *, char *, int);
+extern void read_decimal (fnode *, char *, int);
+internal_proto(read_decimal);
 
 /* list_read.c */
 
-#define list_formatted_read prefix(list_formatted_read)
-void list_formatted_read (bt, void *, int);
+extern void list_formatted_read (bt, void *, int);
+internal_proto(list_formatted_read);
 
-#define finish_list_read prefix(finish_list_read)
-void finish_list_read (void);
+extern void finish_list_read (void);
+internal_proto(finish_list_read);
 
-#define init_at_eol prefix(init_at_eol)
-void init_at_eol();
+extern void init_at_eol();
+internal_proto(init_at_eol);
 
-#define namelist_read prefix(namelist_read)
-void namelist_read();
+extern void namelist_read();
+internal_proto(namelist_read);
 
-#define namelist_write prefix(namelist_write)
-void namelist_write();
+extern void namelist_write();
+internal_proto(namelist_write);
 
 /* write.c */
 
-#define write_a prefix(write_a)
-void write_a (fnode *, const char *, int);
-
-#define write_b prefix(write_b)
-void write_b (fnode *, const char *, int);
-
-#define write_d prefix(write_d)
-void write_d (fnode *, const char *, int);
-
-#define write_e prefix(write_e)
-void write_e (fnode *, const char *, int);
-
-#define write_en prefix(write_en)
-void write_en (fnode *, const char *, int);
+extern void write_a (fnode *, const char *, int);
+internal_proto(write_a);
 
-#define write_es prefix(write_es)
-void write_es (fnode *, const char *, int);
+extern void write_b (fnode *, const char *, int);
+internal_proto(write_b);
 
-#define write_f prefix(write_f)
-void write_f (fnode *, const char *, int);
+extern void write_d (fnode *, const char *, int);
+internal_proto(write_d);
 
-#define write_i prefix(write_i)
-void write_i (fnode *, const char *, int);
+extern void write_e (fnode *, const char *, int);
+internal_proto(write_e);
 
-#define write_l prefix(write_l)
-void write_l (fnode *, char *, int);
+extern void write_en (fnode *, const char *, int);
+internal_proto(write_en);
 
-#define write_o prefix(write_o)
-void write_o (fnode *, const char *, int);
+extern void write_es (fnode *, const char *, int);
+internal_proto(write_es);
 
-#define write_x prefix(write_x)
-void write_x (fnode *);
+extern void write_f (fnode *, const char *, int);
+internal_proto(write_f);
 
-#define write_z prefix(write_z)
-void write_z (fnode *, const char *, int);
+extern void write_i (fnode *, const char *, int);
+internal_proto(write_i);
 
-#define list_formatted_write prefix(list_formatted_write)
-void list_formatted_write (bt, void *, int);
+extern void write_l (fnode *, char *, int);
+internal_proto(write_l);
 
+extern void write_o (fnode *, const char *, int);
+internal_proto(write_o);
 
-#define st_open prefix(st_open)
-#define st_close prefix(st_close)
-#define st_inquire prefix(st_inquire)
-#define st_iolength prefix(st_iolength)
-#define st_iolength_done prefix(st_iolength_done)
-#define st_rewind prefix(st_rewind)
-#define st_read prefix(st_read)
-#define st_read_done prefix(st_read_done)
-#define st_write prefix(st_write)
-#define st_write_done prefix(st_write_done)
-#define st_backspace prefix(st_backspace)
-#define st_endfile prefix(st_endfile)
+extern void write_x (fnode *);
+internal_proto(write_x);
 
+extern void write_z (fnode *, const char *, int);
+internal_proto(write_z);
 
-void __MAIN (void);
+extern void list_formatted_write (bt, void *, int);
+internal_proto(list_formatted_write);
 
 #endif
index 8daf1aa57c3a51da63bf951333b6af2d21aba3f2..f0f8ddf4c0f866243484a68fcb5286d61a6b37bc 100644 (file)
@@ -24,9 +24,11 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 #include "io.h"
 
-st_parameter ioparm;
-namelist_info * ionml;
-global_t g;
+st_parameter ioparm = { };
+iexport_data(ioparm);
+
+namelist_info *ionml = 0;
+global_t g = { };
 
 
 /* library_start()-- Called with a library call is entered.  */
@@ -37,11 +39,10 @@ library_start (void)
   if (g.in_library)
     internal_error ("Recursive library calls not allowed");
 
-/* The in_library flag indicates whether we're currently processing a
- * library call.  Some calls leave immediately, but READ and WRITE
- * processing return control to the caller but are still considered to
- * stay within the library. */
-
+  /* The in_library flag indicates whether we're currently processing a
+     library call.  Some calls leave immediately, but READ and WRITE
+     processing return control to the caller but are still considered to
+     stay within the library. */
   g.in_library = 1;
 
   if (ioparm.iostat != NULL && ioparm.library_return == LIBRARY_OK)
@@ -52,7 +53,7 @@ library_start (void)
 
 
 /* library_end()-- Called when a library call is complete in order to
* clean up for the next call. */
  clean up for the next call. */
 
 void
 library_end (void)
index 28a6babcd8a815289da9fc992685f615abd7328d..6991c38a7030583bc291a4774294fc124573714d 100644 (file)
@@ -410,6 +410,9 @@ already_open (gfc_unit * u, unit_flags * flags)
 
 /* Open file.  */
 
+extern void st_open (void);
+export_proto(st_open);
+
 void
 st_open (void)
 {
index b6363dcca2a8caf1a3ad1c968be44e18524c925f..bfc2bc4bc4baaf0cb8d5a6514909e49f435fc1df 100644 (file)
@@ -1,4 +1,3 @@
-
 /* Copyright (C) 2002-2003 Free Software Foundation, Inc.
    Contributed by Andy Vaught
 
@@ -25,6 +24,9 @@ Boston, MA 02111-1307, USA.  */
 
 /* rewind.c--  Implement the rewind statement */
 
+extern void st_rewind (void);
+export_proto(st_rewind);
+
 void
 st_rewind (void)
 {
index ec5240ddf49ea20652fd7bb3c9a025cf3400f65c..9822a76e9508f5287dd78f209f144d9d07e6ae2d 100644 (file)
@@ -53,10 +53,25 @@ Boston, MA 02111-1307, USA.  */
     st_write(), an error inhibits any data from actually being
     transferred.  */
 
-gfc_unit *current_unit;
+extern void transfer_integer (void *, int);
+export_proto(transfer_integer);
+
+extern void transfer_real (void *, int);
+export_proto(transfer_real);
+
+extern void transfer_logical (void *, int);
+export_proto(transfer_logical);
+
+extern void transfer_character (void *, int);
+export_proto(transfer_character);
+
+extern void transfer_complex (void *, int);
+export_proto(transfer_complex);
+
+gfc_unit *current_unit = NULL;
 static int sf_seen_eor = 0;
 
-char scratch[SCRATCH_SIZE];
+char scratch[SCRATCH_SIZE] = { };
 static char *line_buffer = NULL;
 
 static unit_advance advance_status;
@@ -1433,6 +1448,9 @@ iolength_transfer_init (void)
    it must still be a runtime library call so that we can determine
    the iolength for dynamic arrays and such.  */
 
+extern void st_iolength (void);
+export_proto(st_iolength);
+
 void
 st_iolength (void)
 {
@@ -1440,6 +1458,9 @@ st_iolength (void)
   iolength_transfer_init ();
 }
 
+extern void st_iolength_done (void);
+export_proto(st_iolength_done);
+
 void
 st_iolength_done (void)
 {
@@ -1449,6 +1470,9 @@ st_iolength_done (void)
 
 /* The READ statement.  */
 
+extern void st_read (void);
+export_proto(st_read);
+
 void
 st_read (void)
 {
@@ -1481,6 +1505,8 @@ st_read (void)
       }
 }
 
+extern void st_read_done (void);
+export_proto(st_read_done);
 
 void
 st_read_done (void)
@@ -1489,6 +1515,8 @@ st_read_done (void)
   library_end ();
 }
 
+extern void st_write (void);
+export_proto(st_write);
 
 void
 st_write (void)
@@ -1497,6 +1525,8 @@ st_write (void)
   data_transfer_init (0);
 }
 
+extern void st_write_done (void);
+export_proto(st_write_done);
 
 void
 st_write_done (void)
@@ -1567,6 +1597,21 @@ st_set_nml_var (void * var_addr, char * var_name, int var_name_len,
     }
 }
 
+extern void st_set_nml_var_int (void *, char *, int, int);
+export_proto(st_set_nml_var_int);
+
+extern void st_set_nml_var_float (void *, char *, int, int);
+export_proto(st_set_nml_var_float);
+
+extern void st_set_nml_var_char (void *, char *, int, int, gfc_charlen_type);
+export_proto(st_set_nml_var_char);
+
+extern void st_set_nml_var_complex (void *, char *, int, int);
+export_proto(st_set_nml_var_complex);
+
+extern void st_set_nml_var_log (void *, char *, int, int);
+export_proto(st_set_nml_var_log);
+
 void
 st_set_nml_var_int (void * var_addr, char * var_name, int var_name_len,
                    int kind)
index 3732707dca85cb2ad9cc30fd3703bfd7c81d38f0..c259e5655669b262f193da7840e31313d7727299 100644 (file)
@@ -76,10 +76,85 @@ typedef off_t gfc_offset;
 #define __attribute__(x)
 #endif
 
-/* For a library, a standard prefix is a requirement in order to
-   partition the namespace.  It's ugly to look at and a pain to type,
-   so we hide it behind macros.  */
-#define prefix(x) _gfortran_ ## x
+/* For a library, a standard prefix is a requirement in order to partition
+   the namespace.  IPREFIX is for symbols intended to be internal to the
+   library.  */
+#define PREFIX(x)      _gfortran_ ## x
+#define IPREFIX(x)     _gfortrani_ ## x
+
+/* Magic to rename a symbol at the compiler level.  You continue to refer
+   to the symbol as OLD in the source, but it'll be named NEW in the asm.  */
+#define sym_rename(old, new) sym_rename1(old, __USER_LABEL_PREFIX__, new)
+#define sym_rename1(old, ulp, new) sym_rename2(old, ulp, new)
+#define sym_rename2(old, ulp, new) extern __typeof(old) old __asm__(#ulp #new)
+
+/* There are several classifications of routines:
+
+     (1) Symbols used only within the library,
+     (2) Symbols to be exported from the library,
+     (3) Symbols to be exported from the library, but
+        also used inside the library.
+
+   By telling the compiler about these different classifications we can
+   tightly control the interface seen by the user, and get better code
+   from the compiler at the same time.
+
+   One of the following should be used immediately after the declaration
+   of each symbol:
+
+     internal_proto    Marks a symbol used only within the library,
+                       and adds IPREFIX to the assembly-level symbol
+                       name.  The later is important for maintaining
+                       the namespace partition for the static library.
+
+     export_proto      Marks a symbol to be exported, and adds PREFIX
+                       to the assembly-level symbol name.
+
+     export_proto_np   Marks a symbol to be exported without adding PREFIX.
+
+     iexport_proto     Marks a function to be exported, but with the 
+                       understanding that it can be used inside as well.
+
+     iexport_data_proto        Similarly, marks a data symbol to be exported.
+                       Unfortunately, some systems can't play the hidden
+                       symbol renaming trick on data symbols, thanks to
+                       the horribleness of COPY relocations.
+
+   If iexport_proto or iexport_data_proto is used, you must also use
+   iexport or iexport_data after the *definition* of the symbol.  */
+
+#if defined(HAVE_ATTRIBUTE_VISIBILITY)
+# define internal_proto(x) \
+       sym_rename(x, IPREFIX (x)) __attribute__((__visibility__("hidden")))
+#else
+# define internal_proto(x)     sym_rename(x, IPREFIX(x))
+#endif
+
+#if defined(HAVE_ATTRIBUTE_VISIBILITY) && defined(HAVE_ATTRIBUTE_ALIAS)
+# define export_proto(x)       sym_rename(x, PREFIX(x))
+# define export_proto_np(x)    extern char swallow_semicolon
+# define iexport_proto(x)      internal_proto(x)
+# define iexport(x)            iexport1(x, __USER_LABEL_PREFIX__, IPREFIX(x))
+# define iexport1(x,p,y)       iexport2(x,p,y)
+# define iexport2(x,p,y) \
+       extern __typeof(x) PREFIX(x) __attribute__((__alias__(#p #y)))
+/* ??? We're not currently building a dll, and it's wrong to add dllexport
+   to objects going into a static library archive.  */
+#elif 0 && defined(HAVE_ATTRIBUTE_DLLEXPORT)
+# define export_proto_np(x)    extern __typeof(x) x __attribute__((dllexport))
+# define export_proto(x)    sym_rename(x, PREFIX(x)) __attribute__((dllexport))
+# define iexport_proto(x)      export_proto(x)
+# define iexport(x)            extern char swallow_semicolon
+#else
+# define export_proto(x)       sym_rename(x, PREFIX(x))
+# define export_proto_np(x)    extern char swallow_semicolon
+# define iexport_proto(x)      export_proto(x)
+# define iexport(x)            extern char swallow_semicolon
+#endif
+
+/* TODO: detect the case when we *can* hide the symbol.  */
+#define iexport_data_proto(x)  export_proto(x)
+#define iexport_data(x)                extern char swallow_semicolon
 
 /* The only reliable way to get the offset of a field in a struct
    in a system independent way is via this macro.  */
@@ -129,8 +204,8 @@ typedef size_t index_type;
 typedef GFC_INTEGER_4 gfc_charlen_type;
 
 /* This will be 0 on little-endian machines and one on big-endian machines.  */
-#define l8_to_l4_offset prefix(l8_to_l4_offset)
 extern int l8_to_l4_offset;
+internal_proto(l8_to_l4_offset);
 
 #define GFOR_POINTER_L8_TO_L4(p8) \
   (l8_to_l4_offset + (GFC_LOGICAL_4 *)(p8))
@@ -224,8 +299,8 @@ typedef struct
 options_t;
 
 
-#define options prefix(options)
 extern options_t options;
+internal_proto(options);
 
 
 /* Structure for statement options.  */
@@ -265,204 +340,171 @@ error_codes;
 /* The filename and line number don't go inside the globals structure.
    They are set by the rest of the program and must be linked to.  */
 
-#define line prefix(line)
-extern unsigned line;          /* Location of the current libray call (optional).  */
+/* Location of the current library call (optional).  */
+extern unsigned line;
+iexport_data_proto(line);
 
-#define filename prefix(filename)
 extern char *filename;
+iexport_data_proto(filename);
 
 /* Avoid conflicting prototypes of alloca() in system headers by using 
    GCC's builtin alloca().  */
-
 #define gfc_alloca(x)  __builtin_alloca(x)
 
 
 /* main.c */
 
-#define library_start prefix(library_start)
-void library_start (void);
-
-#define library_end prefix(library_end)
-void library_end (void);
+extern void library_start (void);
+internal_proto(library_start);
 
-#define set_args prefix(set_args)
-void set_args (int, char **);
+extern void library_end (void);
+internal_proto(library_end);
 
-#define get_args prefix(get_args)
-void get_args (int *, char ***);
+extern void set_args (int, char **);
+export_proto(set_args);
 
+extern void get_args (int *, char ***);
+internal_proto(get_args);
 
 /* error.c */
-#define itoa prefix(itoa)
-char *itoa (int64_t);
-
-#define xtoa prefix(xtoa)
-char *xtoa (uint64_t);
 
-#define os_error prefix(os_error)
-void os_error (const char *) __attribute__ ((noreturn));
+extern char *itoa (int64_t);
+internal_proto(itoa);
 
-#define show_locus prefix(show_locus)
-void show_locus (void);
+extern char *xtoa (uint64_t);
+internal_proto(xtoa);
 
-#define runtime_error prefix(runtime_error)
-void runtime_error (const char *) __attribute__ ((noreturn));
+extern void os_error (const char *) __attribute__ ((noreturn));
+internal_proto(os_error);
 
-#define internal_error prefix(internal_error)
-void internal_error (const char *) __attribute__ ((noreturn));
+extern void show_locus (void);
+internal_proto(show_locus);
 
-#define get_oserror prefix(get_oserror)
-const char *get_oserror (void);
+extern void runtime_error (const char *) __attribute__ ((noreturn));
+iexport_proto(runtime_error);
 
-#define write_error prefix(write_error)
-void write_error (const char *);
+extern void internal_error (const char *) __attribute__ ((noreturn));
+internal_proto(internal_error);
 
-#define sys_exit prefix(sys_exit)
-void sys_exit (int) __attribute__ ((noreturn));
+extern const char *get_oserror (void);
+internal_proto(get_oserror);
 
-#define st_printf prefix(st_printf)
-int st_printf (const char *, ...) __attribute__ ((format (printf, 1, 2)));
+extern void sys_exit (int) __attribute__ ((noreturn));
+internal_proto(sys_exit);
 
-#define st_sprintf prefix(st_sprintf)
-void st_sprintf (char *, const char *, ...) __attribute__ ((format (printf, 2, 3)));
+extern int st_printf (const char *, ...)
+  __attribute__ ((format (printf, 1, 2)));
+internal_proto(st_printf);
 
-#define translate_error prefix(translate_error)
-const char *translate_error (int);
+extern void st_sprintf (char *, const char *, ...)
+  __attribute__ ((format (printf, 2, 3)));
+internal_proto(st_sprintf);
 
-#define generate_error prefix(generate_error)
-void generate_error (int, const char *);
+extern const char *translate_error (int);
+internal_proto(translate_error);
 
+extern void generate_error (int, const char *);
+internal_proto(generate_error);
 
 /* memory.c */
 
-#define memory_init    prefix(memory_init)
-void memory_init (void);
-
-#define runtime_cleanup        prefix(runtime_cleanup)
-void runtime_cleanup (void);
-
-#define get_mem                prefix(get_mem)
-void *get_mem (size_t) __attribute__ ((malloc));
-
-#define free_mem       prefix(free_mem)
-void free_mem (void *);
-
-#define internal_malloc_size   prefix(internal_malloc_size)
-void *internal_malloc_size (size_t);
-
-#define internal_malloc        prefix(internal_malloc)
-void *internal_malloc (GFC_INTEGER_4);
-
-#define internal_malloc64 prefix(internal_malloc64)
-void *internal_malloc64 (GFC_INTEGER_8);
+extern void *get_mem (size_t) __attribute__ ((malloc));
+internal_proto(get_mem);
 
-#define internal_free  prefix(internal_free)
-void internal_free (void *);
+extern void free_mem (void *);
+internal_proto(free_mem);
 
-#define allocate       prefix(allocate)
-void allocate (void **, GFC_INTEGER_4, GFC_INTEGER_4 *);
-
-#define allocate64     prefix(allocate64)
-void allocate64 (void **, GFC_INTEGER_8, GFC_INTEGER_4 *);
-
-#define deallocate     prefix(deallocate)
-void deallocate (void **, GFC_INTEGER_4 *);
+extern void *internal_malloc_size (size_t);
+internal_proto(internal_malloc_size);
 
+extern void internal_free (void *);
+iexport_proto(internal_free);
 
 /* environ.c */
 
-#define check_buffered prefix(check_buffered)
-int check_buffered (int);
-
-#define init_variables prefix(init_variables)
-void init_variables (void);
+extern int check_buffered (int);
+internal_proto(check_buffered);
 
-#define show_variables prefix(show_variables)
-void show_variables (void);
+extern void init_variables (void);
+internal_proto(init_variables);
 
+extern void show_variables (void);
+internal_proto(show_variables);
 
 /* string.c */
 
-#define find_option prefix(find_option)
-int find_option (const char *, int, st_option *, const char *);
+extern int find_option (const char *, int, st_option *, const char *);
+internal_proto(find_option);
 
-#define fstrlen prefix(fstrlen)
-int fstrlen (const char *, int);
+extern int fstrlen (const char *, int);
+internal_proto(fstrlen);
 
-#define fstrcpy prefix(fstrcpy)
-void fstrcpy (char *, int, const char *, int);
+extern void fstrcpy (char *, int, const char *, int);
+internal_proto(fstrcpy);
 
-#define cf_strcpy prefix(cf_strcpy)
-void cf_strcpy (char *, int, const char *);
+extern void cf_strcpy (char *, int, const char *);
+internal_proto(cf_strcpy);
 
 /* io.c */
 
-#define init_units prefix(init_units)
-void init_units (void);
+extern void init_units (void);
+internal_proto(init_units);
 
-#define close_units prefix(close_units)
-void close_units (void);
+extern void close_units (void);
+internal_proto(close_units);
 
 /* stop.c */
-#define stop_numeric prefix(stop_numeric)
-void stop_numeric (GFC_INTEGER_4);
+
+extern void stop_numeric (GFC_INTEGER_4);
+iexport_proto(stop_numeric);
 
 /* reshape_packed.c */
-#define reshape_packed prefix(reshape_packed)
-void reshape_packed (char *, index_type, const char *, index_type,
-                    const char *, index_type);
 
-/* Repacking functions.  */
-#define internal_pack prefix(internal_pack)
-void *internal_pack (gfc_array_char *);
+extern void reshape_packed (char *, index_type, const char *, index_type,
+                           const char *, index_type);
+internal_proto(reshape_packed);
 
-#define internal_unpack prefix(internal_unpack)
-void internal_unpack (gfc_array_char *, const void *);
+/* Repacking functions.  */
 
-#define internal_pack_4 prefix(internal_pack_4)
+/* ??? These four aren't currently used by the compiler, though we
+   certainly could do so.  */
 GFC_INTEGER_4 *internal_pack_4 (gfc_array_i4 *);
+internal_proto(internal_pack_4);
 
-#define internal_pack_8 prefix(internal_pack_8)
 GFC_INTEGER_8 *internal_pack_8 (gfc_array_i8 *);
+internal_proto(internal_pack_8);
 
-#define internal_unpack_4 prefix(internal_unpack_4)
-void internal_unpack_4 (gfc_array_i4 *, const GFC_INTEGER_4 *);
-
-#define internal_unpack_8 prefix(internal_unpack_8)
-void internal_unpack_8 (gfc_array_i8 *, const GFC_INTEGER_8 *);
+extern void internal_unpack_4 (gfc_array_i4 *, const GFC_INTEGER_4 *);
+internal_proto(internal_unpack_4);
 
-/* date_and_time.c */
-
-#define date_and_time prefix(date_and_time)
-void date_and_time (char *, char *, char *, gfc_array_i4 *,
-                   GFC_INTEGER_4, GFC_INTEGER_4, GFC_INTEGER_4);
+extern void internal_unpack_8 (gfc_array_i8 *, const GFC_INTEGER_8 *);
+internal_proto(internal_unpack_8);
 
 /* string_intrinsics.c */
 
-#define compare_string prefix(compare_string)
-GFC_INTEGER_4 compare_string (GFC_INTEGER_4, const char *,
-                             GFC_INTEGER_4, const char *);
+extern GFC_INTEGER_4 compare_string (GFC_INTEGER_4, const char *,
+                                    GFC_INTEGER_4, const char *);
+iexport_proto(compare_string);
 
 /* random.c */
 
-#define random_seed prefix(random_seed)
-void random_seed (GFC_INTEGER_4 * size, gfc_array_i4 * put,
-                 gfc_array_i4 * get);
+extern void random_seed (GFC_INTEGER_4 * size, gfc_array_i4 * put,
+                        gfc_array_i4 * get);
+iexport_proto(random_seed);
 
 /* normalize.c */
 
-#define normalize_r4_i4 prefix(normalize_r4_i4)
-GFC_REAL_4 normalize_r4_i4 (GFC_UINTEGER_4, GFC_UINTEGER_4);
+extern GFC_REAL_4 normalize_r4_i4 (GFC_UINTEGER_4, GFC_UINTEGER_4);
+internal_proto(normalize_r4_i4);
 
-#define normalize_r8_i8 prefix(normalize_r8_i8)
-GFC_REAL_8 normalize_r8_i8 (GFC_UINTEGER_8, GFC_UINTEGER_8);
+extern GFC_REAL_8 normalize_r8_i8 (GFC_UINTEGER_8, GFC_UINTEGER_8);
+internal_proto(normalize_r8_i8);
 
 /* size.c */
 
 typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, void) array_t;
 
-#define size0 prefix(size0)
-index_type size0 (const array_t * array); 
+extern index_type size0 (const array_t * array); 
+iexport_proto(size0);
 
 #endif  /* LIBGFOR_H  */
-
index 46ae7ce133540e06ff07b34a45c984bfe4332a16..989f91cfdb620802d5e6355144e99f855f28c426 100644 (file)
@@ -26,9 +26,15 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"'
 include(iparm.m4)dnl
 
+void __cshift1_`'atype_kind (const gfc_array_char * ret,
+                            const gfc_array_char * array,
+                            const atype * h, const atype_name * pwhich);
+export_proto_np(__cshift1_`'atype_kind);
+
 void
-`__cshift1_'atype_kind (const gfc_array_char * ret, const gfc_array_char * array,
-    const atype * h, const atype_name * pwhich)
+__cshift1_`'atype_kind (const gfc_array_char * ret,
+                       const gfc_array_char * array,
+                       const atype * h, const atype_name * pwhich)
 {
   /* r.* indicates the return array.  */
   index_type rstride[GFC_MAX_DIMENSIONS - 1];
@@ -42,7 +48,7 @@ void
   index_type soffset;
   const char *sptr;
   const char *src;
-`  /* h.* indicates the shift array.  */'
+  /* h.* indicates the shift array.  */
   index_type hstride[GFC_MAX_DIMENSIONS - 1];
   index_type hstride0;
   const atype_name *hptr;
@@ -71,7 +77,7 @@ void
   size = GFC_DESCRIPTOR_SIZE (array);
   n = 0;
 
-`/* Initialized for avoiding compiler warnings.  */'
+  /* Initialized for avoiding compiler warnings.  */
   roffset = size;
   soffset = size;
   len = 0;
@@ -116,7 +122,7 @@ void
 
   while (rptr)
     {
-`      /* Do the shift for this dimension.  */'
+      /* Do the shift for this dimension.  */
       sh = *hptr;
       sh = (div (sh, len)).rem;
       if (sh < 0)
@@ -168,4 +174,3 @@ void
         }
     }
 }
-
index bde4c20512c8459d5c4186133dc6115384021e73..3e3245c0aac24bc105886bccc0f978ebf7ecf50f 100644 (file)
@@ -27,9 +27,12 @@ include(iparm.m4)dnl
 
 typedef GFC_ARRAY_DESCRIPTOR(GFC_MAX_DIMENSIONS, char) char_array;
 
+extern rtype_name __dot_product_`'rtype_code (rtype * a, rtype * b);
+export_proto_np(__dot_product_`'rtype_code);
+
 /* Both parameters will already have been converted to the result type.  */
 rtype_name
-`__dot_product_'rtype_code (rtype * a, rtype * b)
+__dot_product_`'rtype_code (rtype * a, rtype * b)
 {
   rtype_name *pa;
   rtype_name *pb;
@@ -63,4 +66,3 @@ sinclude(`dotprod_asm_'rtype_code`.m4')dnl
 
   return res;
 }
-
index eb97efa3121aa477dda774651e6566d617b18a65..38ef7fc0849814bd6dd58481b8cc4e845542349e 100644 (file)
@@ -28,9 +28,12 @@ include(iparm.m4)dnl
 
 typedef GFC_ARRAY_DESCRIPTOR(GFC_MAX_DIMENSIONS, char) char_array;
 
+extern rtype_name __dot_product_`'rtype_code (rtype * a, rtype * b);
+export_proto_np(__dot_product_`'rtype_code);
+
 /* Both parameters will already have been converted to the result type.  */
 rtype_name
-`__dot_product_'rtype_code (rtype * a, rtype * b)
+__dot_product_`'rtype_code (rtype * a, rtype * b)
 {
   rtype_name *pa;
   rtype_name *pb;
@@ -66,4 +69,3 @@ sinclude(`dotprod_asm_'rtype_code`.m4')dnl
 
   return res;
 }
-
index 8f886d3bd608aa90a5d12d17973207a6c08f87f0..dc196e0bb1b65f57ee149ce644217ec10980b329 100644 (file)
@@ -25,8 +25,11 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"'
 include(iparm.m4)dnl
 
+extern rtype_name __dot_product_`'rtype_code (gfc_array_l4 *, gfc_array_l4 *);
+export_proto_np(__dot_product_`'rtype_code);
+
 rtype_name
-`__dot_product_'rtype_code (gfc_array_l4 * a, gfc_array_l4 * b)
+__dot_product_`'rtype_code (gfc_array_l4 * a, gfc_array_l4 * b)
 {
   GFC_LOGICAL_4 *pa;
   GFC_LOGICAL_4 *pb;
@@ -72,4 +75,3 @@ rtype_name
 
   return 0;
 }
-
index a7852e0e40a6ee7af3156bd98e6d6479bc755ebc..f8ae460b78c4192e01f71acc7ebd3ec08b24f533 100644 (file)
@@ -29,9 +29,17 @@ include(iparm.m4)dnl
 static const char zeros[16] =
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 
+extern void __eoshift1_`'atype_kind (const gfc_array_char *,
+                                    const gfc_array_char *,
+                                    const atype *, const char *,
+                                    const atype_name *);
+export_proto_np(__eoshift1_`'atype_kind);
+
 void
-`__eoshift1_'atype_kind (const gfc_array_char * ret, const gfc_array_char * array,
-    const atype * h, const char * pbound, const atype_name * pwhich)
+__eoshift1_`'atype_kind (const gfc_array_char *ret,
+                        const gfc_array_char *array,
+                        const atype *h, const char *pbound,
+                        const atype_name *pwhich)
 {
   /* r.* indicates the return array.  */
   index_type rstride[GFC_MAX_DIMENSIONS - 1];
@@ -176,4 +184,3 @@ void
         }
     }
 }
-
index a5407520b0b8a4f00fa52e617d46a9995c193166..4e706dc8aa3536d2f883c7473471601ca6b8b119 100644 (file)
@@ -29,9 +29,15 @@ include(iparm.m4)dnl
 static const char zeros[16] =
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 
+extern void __eoshift3_`'atype_kind (gfc_array_char *, gfc_array_char *,
+                                    atype *, const gfc_array_char *,
+                                    atype_name *);
+export_proto_np(__eoshift3_`'atype_kind);
+
 void
-`__eoshift3_'atype_kind (gfc_array_char * ret, gfc_array_char * array,
-    atype * h, const gfc_array_char * bound, atype_name * pwhich)
+__eoshift3_`'atype_kind (gfc_array_char *ret, gfc_array_char *array,
+                        atype *h, const gfc_array_char *bound,
+                        atype_name *pwhich)
 {
   /* r.* indicates the return array.  */
   index_type rstride[GFC_MAX_DIMENSIONS - 1];
@@ -191,4 +197,3 @@ void
         }
     }
 }
-
index 510f763292de5714d7f313be9fa8e39307a330d2..a0e31e3c84b5c80b9d656965f5bef48bf9133e2a 100644 (file)
@@ -23,8 +23,11 @@ Boston, MA 02111-1307, USA.  */
 
 include(`mtype.m4')dnl
 
+extern GFC_INTEGER_4 exponent_r`'kind (real_type s);
+export_proto(exponent_r`'kind);
+
 GFC_INTEGER_4
-prefix(exponent_r`'kind) (real_type s)
+exponent_r`'kind (real_type s)
 {
   int ret;
   frexp`'q (s, &ret);
index c453e78ac410f7250226956597f9e71ad3ae6e3b..dd71865d4d3d0f128881adf3c9969b8695819e4b 100644 (file)
@@ -23,8 +23,11 @@ Boston, MA 02111-1307, USA.  */
 
 include(`mtype.m4')dnl
 
+extern real_type fraction_r`'kind (real_type s);
+export_proto(fraction_r`'kind);
+
 real_type
-prefix(fraction_r`'kind) (real_type s)
+fraction_r`'kind (real_type s)
 {
   int dummy_exp;
   return frexp`'q (s, &dummy_exp);
index 4106ddc7aafbad053b93e15b25ffe674c128e9d6..b67770b4843c7f8f72d788ff641411887655d074 100644 (file)
@@ -3,7 +3,11 @@ dnl Contains the generic sections of the array functions.
 dnl This file is part of the GNU Fortran 95 Runtime Library (libgfortran)
 dnl Distributed under the GNU LGPL.  See COPYING for details.
 define(START_FOREACH_FUNCTION,
-`void
+`
+extern void `__'name`'rtype_qual`_'atype_code (rtype * retarray, atype *array);
+export_proto_np(`__'name`'rtype_qual`_'atype_code);
+
+void
 `__'name`'rtype_qual`_'atype_code (rtype * retarray, atype *array)
 {
   index_type count[GFC_MAX_DIMENSIONS];
@@ -85,7 +89,11 @@ define(FINISH_FOREACH_FUNCTION,
   }
 }')dnl
 define(START_MASKED_FOREACH_FUNCTION,
-`void
+`
+extern void `__m'name`'rtype_qual`_'atype_code (rtype *, atype *, gfc_array_l4 *);
+export_proto_np(`__m'name`'rtype_qual`_'atype_code);
+
+void
 `__m'name`'rtype_qual`_'atype_code (rtype * retarray, atype *array, gfc_array_l4 * mask)
 {
   index_type count[GFC_MAX_DIMENSIONS];
index 93b31973e1c9c5f65d60651eb4405361349fbf3b..0a377a58e9f201d87403c8ad374bbab5304713b4 100644 (file)
@@ -18,8 +18,12 @@ dnl Execution should be allowed to continue to the end of the block.
 dnl You should not return or break from the inner loop of the implementation.
 dnl Care should also be taken to avoid using the names defined in iparm.m4
 define(START_ARRAY_FUNCTION,
-`void
-`__'name`'rtype_qual`_'atype_code (rtype * retarray, atype *array, index_type *pdim)
+`
+extern void `__'name`'rtype_qual`_'atype_code (rtype *, atype *, index_type *);
+export_proto_np(`__'name`'rtype_qual`_'atype_code);
+
+void
+`__'name`'rtype_qual`_'atype_code (rtype *retarray, atype *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -138,7 +142,12 @@ define(FINISH_ARRAY_FUNCTION,
     }
 }')dnl
 define(START_MASKED_ARRAY_FUNCTION,
-`void
+`
+extern void `__m'name`'rtype_qual`_'atype_code (rtype *, atype *, index_type *,
+                                               gfc_array_l4 *);
+export_proto_np(`__m'name`'rtype_qual`_'atype_code);
+
+void
 `__m'name`'rtype_qual`_'atype_code (rtype * retarray, atype * array, index_type *pdim, gfc_array_l4 * mask)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
index 9af77ceea503ce8509a284cf2a19fff8781e1f86..ef631d3e5f8fff50706ceaad876ad11d45c3d58b 100644 (file)
@@ -38,6 +38,9 @@ include(iparm.m4)dnl
          C(I,J) = C(I,J)+A(I,K)*B(K,J)
 */
 
+extern void `__matmul_'rtype_code (rtype * retarray, rtype * a, rtype * b);
+export_proto_np(`__matmul_'rtype_code);
+
 void
 `__matmul_'rtype_code (rtype * retarray, rtype * a, rtype * b)
 {
index 0d66a42a4e22aebb071f3069e33c8f323dd4a682..4091ef65f2eac8b7bddf0cb23d71892ccc695744 100644 (file)
@@ -27,6 +27,10 @@ include(iparm.m4)dnl
 
 /* Dimensions: retarray(x,y) a(x, count) b(count,y).
    Either a or b can be rank 1.  In this case x or y is 1.  */
+
+extern void `__matmul_'rtype_code (rtype *, gfc_array_l4 *, gfc_array_l4 *);
+export_proto_np(`__matmul_'rtype_code);
+
 void
 `__matmul_'rtype_code (rtype * retarray, gfc_array_l4 * a, gfc_array_l4 * b)
 {
index 5168d99c8e2abc97894259bf8742582e904cb7df..54b8550e9b1128989a7dc1c2dab6f7dce85e5a22 100644 (file)
@@ -24,8 +24,11 @@ Boston, MA 02111-1307, USA.  */
 
 include(`mtype.m4')dnl
 
+extern real_type nearest_r`'kind (real_type s, real_type dir);
+export_proto(nearest_r`'kind);
+
 real_type
-prefix(nearest_r`'kind) (real_type s, real_type dir)
+nearest_r`'kind (real_type s, real_type dir)
 {
   dir = copysign`'q (__builtin_inf`'q (), dir);
   if (FLT_EVAL_METHOD != 0)
index 4bf453a3946d751c7cf43a95029f1377c78f93c5..724cebe5d5d1863b89c34a114216011471b08360 100644 (file)
@@ -23,13 +23,16 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"'
 include(iparm.m4)dnl
 
-/* Uuse Binary Method to calculate the powi. This is not an optimal but
+/* Use Binary Method to calculate the powi. This is not an optimal but
    a simple and reasonable arithmetic. See section 4.6.3, "Evaluation of
    Powers" of Donald E. Knuth, "Seminumerical Algorithms", Vol. 2, "The Art
    of Computer Programming", 3rd Edition, 1998.  */
 
+rtype_name `pow_'rtype_code`_'atype_code (rtype_name a, atype_name b);
+export_proto(pow_`'rtype_code`_'atype_code);
+
 rtype_name
-`prefix(pow_'rtype_code`_'atype_code) (rtype_name a, atype_name b)
+`pow_'rtype_code`_'atype_code (rtype_name a, atype_name b)
 {
   rtype_name pow, x;
   atype_name n, u;
index 7400f31ad7623f9d23116147800ec78165aff23d..7355a7a172b0074ef808b9f3b1f4f47575c3f28b 100644 (file)
@@ -30,6 +30,11 @@ typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type;
 /* The shape parameter is ignored. We can currently deduce the shape from the
    return array.  */
 dnl Only the kind (ie size) is used to name the function.
+
+extern void `__reshape_'rtype_kind (rtype *, rtype *, shape_type *,
+                                   rtype *, shape_type *);
+extern_proto_np(`__reshape_'rtype_kind);
+
 void
 `__reshape_'rtype_kind (rtype * ret, rtype * source, shape_type * shape,
                       rtype * pad, shape_type * order)
@@ -224,4 +229,3 @@ void
         }
     }
 }
-
index 352a129865eebad9de6f068331fbaef0ddfbcbf0..00ea8b0d941188f7622af2d0dc2a32de0cbeeb27 100644 (file)
@@ -23,8 +23,11 @@ Boston, MA 02111-1307, USA.  */
 
 include(`mtype.m4')dnl
 
+extern real_type set_exponent_r`'kind (real_type s, GFC_INTEGER_4 i);
+export_proto(set_exponent_r`'kind);
+
 real_type
-prefix(set_exponent_r`'kind) (real_type s, GFC_INTEGER_4 i)
+set_exponent_r`'kind (real_type s, GFC_INTEGER_4 i)
 {
   int dummy_exp;
   return scalbn`'q (frexp`'q (s, &dummy_exp), i);
index 6c58658738b04da47b1df6ea7f95d4e4c730abb0..e10fe0c09865ca99716bd61cbdd40c844dd74154 100644 (file)
@@ -25,6 +25,9 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"'
 include(iparm.m4)dnl
 
+extern void `__shape_'rtype_kind (rtype * ret, const rtype * array);
+export_proto_np(`__shape_'rtype_kind);
+
 void
 `__shape_'rtype_kind (rtype * ret, const rtype * array)
 {
@@ -41,4 +44,3 @@ void
         array->dim[n].ubound + 1 - array->dim[n].lbound;
     }
 }
-
index 55f4b572917bda8db35022d4ae2356cfcac3cf69..e519b2965adeca6bc5b9e3beeca6efef6d7e86b3 100644 (file)
@@ -24,6 +24,9 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"'
 include(iparm.m4)dnl
 
+extern void `__transpose_'rtype_kind (rtype * ret, rtype * source);
+export_proto_np(`__transpose_'rtype_kind);
+
 void
 `__transpose_'rtype_kind (rtype * ret, rtype * source)
 {
index dc6e590a10b26709af317a232f87b0b2a235b4d5..02831f14a0e8c6540666cf9dfc4d3f06d6ec3a1b 100644 (file)
@@ -37,7 +37,7 @@ Boston, MA 02111-1307, USA.  */
  * but other variables are checked during execution of the user's
  * program. */
 
-options_t options;
+options_t options = { };
 
 extern char **environ;
 
index 913812c9f516d34c02764d2aa382449aca5f82bb..2ccaff0676873406845eac581244a328013f1c21 100644 (file)
@@ -48,8 +48,11 @@ Boston, MA 02111-1307, USA.  */
  * that files that report loci and those that do not can be linked
  * together without reporting an erroneous position. */
 
-char *filename;
-unsigned line;
+char *filename = 0;
+iexport_data(filename);
+
+unsigned line = 0;
+iexport_data(line);
 
 static char buffer[32];                /* buffer for integer/ascii conversions */
 
@@ -332,6 +335,7 @@ runtime_error (const char *message)
   st_printf ("Fortran runtime error: %s\n", message);
   sys_exit (2);
 }
+iexport(runtime_error);
 
 
 /* void internal_error()-- These are this-can't-happen errors
index fefac079dbd7ff7921af1a337e2dc8df3471ffb5..7849a58012f642034f122599719c0d83c50f0cf1 100644 (file)
@@ -25,6 +25,9 @@ Boston, MA 02111-1307, USA.  */
 #include <string.h>
 #include "libgfortran.h"
 
+extern void *internal_pack (gfc_array_char *);
+export_proto(internal_pack);
+
 void *
 internal_pack (gfc_array_char * source)
 {
index d468e741ea7a58da8084e5c81f5c12a649030f98..313a79f5fa228cc3bc5f266f14977ff944bd8f80 100644 (file)
@@ -25,6 +25,9 @@ Boston, MA 02111-1307, USA.  */
 #include <string.h>
 #include "libgfortran.h"
 
+extern void internal_unpack (gfc_array_char *, const void *);
+export_proto(internal_unpack);
+
 void
 internal_unpack (gfc_array_char * d, const void * s)
 {
index 4e1f78c93c749b4af1f7ca2cfe6969c1309395af..882946c41a01c83235fbc19d29f517263b497862 100644 (file)
@@ -29,12 +29,11 @@ Boston, MA 02111-1307, USA.  */
 /* This is the offset (in bytes) required to cast from logical(8)* to
    logical(4)*. and still get the same result.  Will be 0 for little-endian
    machines and 4 for big-endian machines.  */
-int l8_to_l4_offset;
+int l8_to_l4_offset = 0;
 
 
 /* Figure out endianness for this machine.  */
 
-#define detetmine_endianness   prefix(determine_endianness)
 static void
 determine_endianness (void)
 {
@@ -95,12 +94,10 @@ init (void)
   if (argc > 1 && strcmp (argv[1], "--help") == 0)
     show_variables ();
 
-/*  if (argc > 1 && strcmp(argv[1], "--resume") == 0) resume();  */
+  /* if (argc > 1 && strcmp(argv[1], "--resume") == 0) resume();  */
 #endif
 
-  memory_init ();
   random_seed(NULL,NULL,NULL);
-
 }
 
 
index 22808483619a80fd1f1e55786e3a54a6baad7e55..71bad9f3bd93af778fd8ba2fdb31e6fc1723187b 100644 (file)
@@ -37,7 +37,6 @@ Boston, MA 02111-1307, USA.  */
    the memory we allocate internally.  We could also use this for user
    allocated memory (ALLOCATE/DEALLOCATE).  This should be stored in a
    seperate list.  */
-#define malloc_t       prefix(malloc_t)
 typedef struct malloc_t
 {
   int magic;
@@ -59,31 +58,25 @@ malloc_t;
 
 /* The root of the circular double linked list for compiler generated
    malloc calls.  */
-static malloc_t mem_root;
-
-
-void
-memory_init (void)
-{
-  /* The root should never be used directly, so don't set the magic.  */
-  mem_root.magic = 0;
-  mem_root.next = &mem_root;
-  mem_root.prev = &mem_root;
-  mem_root.marker = 0;
-}
-
-
+static malloc_t mem_root = {
+       .next = &mem_root,
+       .prev = &mem_root
+};
+
+#if 0
+/* ??? Disabled because, well, it wasn't being called before transforming
+   it to a destructor, and turning it on causes testsuite failures.  */
 /* Doesn't actually do any cleaning up, just throws an error if something
    has got out of sync somewhere.  */
 
-void
+static void __attribute__((destructor))
 runtime_cleanup (void)
 {
   /* Make sure all memory we've allocated is freed on exit.  */
   if (mem_root.next != &mem_root)
     runtime_error ("Unfreed memory on program termination");
 }
-
+#endif
 
 
 void *
@@ -92,13 +85,9 @@ get_mem (size_t n)
   void *p;
 
 #ifdef GFC_CLEAR_MEMORY
-  p = (void *) calloc (n, 1);
+  p = (void *) calloc (1, n);
 #else
-#define temp malloc
-#undef malloc
   p = (void *) malloc (n);
-#define malloc temp
-#undef temp
 #endif
   if (p == NULL)
     os_error ("Memory allocation failed");
@@ -157,6 +146,8 @@ internal_malloc_size (size_t size)
   return DATA_POINTER (newmem);
 }
 
+extern void *internal_malloc (GFC_INTEGER_4);
+export_proto(internal_malloc);
 
 void *
 internal_malloc (GFC_INTEGER_4 size)
@@ -170,6 +161,8 @@ internal_malloc (GFC_INTEGER_4 size)
   return internal_malloc_size ((size_t) size);
 }
 
+extern void *internal_malloc64 (GFC_INTEGER_8);
+export_proto(internal_malloc64);
 
 void *
 internal_malloc64 (GFC_INTEGER_8 size)
@@ -209,6 +202,7 @@ internal_free (void *mem)
 
   free (m);
 }
+iexport(internal_free);
 
 
 /* User-allocate, one call for each member of the alloc-list of an
@@ -244,6 +238,8 @@ allocate_size (void **mem, size_t size, GFC_INTEGER_4 * stat)
     *stat = 0;
 }
 
+extern void allocate (void **, GFC_INTEGER_4, GFC_INTEGER_4 *);
+export_proto(allocate);
 
 void
 allocate (void **mem, GFC_INTEGER_4 size, GFC_INTEGER_4 * stat)
@@ -258,6 +254,8 @@ allocate (void **mem, GFC_INTEGER_4 size, GFC_INTEGER_4 * stat)
   allocate_size (mem, (size_t) size, stat);
 }
 
+extern void allocate64 (void **, GFC_INTEGER_8, GFC_INTEGER_4 *);
+export_proto(allocate64);
 
 void
 allocate64 (void **mem, GFC_INTEGER_8 size, GFC_INTEGER_4 * stat)
@@ -276,6 +274,9 @@ allocate64 (void **mem, GFC_INTEGER_8 size, GFC_INTEGER_4 * stat)
 
 /* User-deallocate; pointer is NULLified. */
 
+extern void deallocate (void **, GFC_INTEGER_4 *);
+export_proto(deallocate);
+
 void
 deallocate (void **mem, GFC_INTEGER_4 * stat)
 {
index e2d08bea6b30f5386729ceb3f643bd8bfc51c8ba..e6d683b70fb96584bfe6c307a9c4418340d31169 100644 (file)
@@ -25,9 +25,6 @@ Boston, MA 02111-1307, USA.  */
 
 #include "libgfortran.h"
 
-#define pause_numeric prefix(pause_numeric)
-#define pause_string prefix(pause_string)
-
 static void
 do_pause (void)
 {
@@ -42,6 +39,10 @@ do_pause (void)
 }
 
 /* A numeric or blank STOP statement.  */
+
+extern void pause_numeric (GFC_INTEGER_4 code);
+export_proto(pause_numeric);
+
 void
 pause_numeric (GFC_INTEGER_4 code)
 {
@@ -55,6 +56,8 @@ pause_numeric (GFC_INTEGER_4 code)
   do_pause ();
 }
 
+extern void pause_string (char *string, GFC_INTEGER_4 len);
+export_proto(pause_string);
 
 void
 pause_string (char *string, GFC_INTEGER_4 len)
index 5ee873aefcb738f403c236422083a7b9f1f49f8a..807845cee583155ebba773dba6d9cfc3eca73491 100644 (file)
@@ -30,15 +30,18 @@ typedef struct
 }
 select_struct;
 
-
-#define select_string prefix(select_string)
+extern void * select_string (select_struct *table, int table_len,
+                            void *default_jump, const char *selector,
+                            int selector_len);
+export_proto(select_string);
 
 
 /* select_string()-- Given a selector string and a table of
  * select_struct structures, return the address to jump to. */
 
-void *select_string (select_struct *table, int table_len, void *default_jump,
-                    const char *selector, int selector_len)
+void *
+select_string (select_struct *table, int table_len, void *default_jump,
+              const char *selector, int selector_len)
 {
   select_struct *t;
   int i, low, high, mid;
index ef8741aa748d5a296d191666960c7c9765e8c8c6..5ae06ec957bedda95df7569c88808da0c43a392a 100644 (file)
@@ -24,8 +24,6 @@ Boston, MA 02111-1307, USA.  */
 
 #include "libgfortran.h"
 
-#define stop_string prefix(stop_string)
-
 /* A numeric or blank STOP statement.  */
 void
 stop_numeric (GFC_INTEGER_4 code)
@@ -39,7 +37,11 @@ stop_numeric (GFC_INTEGER_4 code)
 
   sys_exit (code);
 }
+iexport(stop_numeric);
+
 
+extern void stop_string (const char *string, GFC_INTEGER_4 len);
+export_proto(stop_string);
 
 void
 stop_string (const char *string, GFC_INTEGER_4 len)