diff liboctave/f2c-main.c @ 3887:7da18459c08b

[project @ 2002-04-04 00:44:21 by jwe]
author jwe
date Thu, 04 Apr 2002 00:46:37 +0000
parents 8b262e771614
children 4c8a2e4e0717
line wrap: on
line diff
--- a/liboctave/f2c-main.c	Wed Apr 03 21:20:56 2002 +0000
+++ b/liboctave/f2c-main.c	Thu Apr 04 00:46:37 2002 +0000
@@ -22,24 +22,16 @@
 
 #include <assert.h>
 
-/* I think that this is really only needed if linking to Fortran
-   compiled libraries on a Sun.  It also seems to be needed on
-   some Linux/ELF systems with g77.  It should never be called. */
+
+/* Dummy Fortran main declaration, needed in order to link to some
+   Fortran libraries.  See the AC_F77_DUMMY_MAIN macro documentation. 
+   This function should never be called. */
 
-#if defined (sun)
-int
-MAIN_ ()
-{
-  assert (0);
-  return 0;
-}
-#elif defined (__linux__)
-int
-MAIN__ ()
-{
-  assert (0);
-  return 0;
-}
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+extern "C"
+#  endif
+int F77_DUMMY_MAIN() { assert(0); return 1; }
 #endif
 
 /*