diff liboctave/sun-utils.h @ 2401:30cd01f9970c

[project @ 1996-10-13 16:22:35 by jwe]
author jwe
date Sun, 13 Oct 1996 16:22:35 +0000
parents c2d20f365b84
children bcdd6bf533ea
line wrap: on
line diff
--- a/liboctave/sun-utils.h
+++ b/liboctave/sun-utils.h
@@ -23,13 +23,15 @@
 #if !defined (octave_sun_utils_h)
 #define octave_sun_utils_h 1
 
-#if defined (sun)
+// I think that this is really only needed if linking to Fortran
+// compiled libraries on a Sun.  It also seems to be needed on
+// Linux/ELF systems with g77.  It should never be called.
 
-// I think that this is really only needed if linking to Fortran
-// compiled libraries on a Sun.  It should never be called.
-// There should probably be a sysdep.cc file, eh?
-
-extern "C" int MAIN_ (void);
+#if defined (sun)
+extern "C" int MAIN_ ();
+#elif defined (linux) && defined (__ELF__)
+extern "C" int MAIN__ ();
+#endif
 
 // This is only needed to dereference pointers to doubles if mixing
 // GCC and Sun f77/cc compiled code.  See the GCC manual (where the
@@ -37,7 +39,7 @@
 // which explains that doubles are not always aligned on 8 byte
 // boundaries.
 
-#if defined (__GNUC__)
+#if defined (sun) && defined (__GNUC__)
 
 inline double
 access_double (double *unaligned_ptr)
@@ -68,7 +70,6 @@
 
 #endif
 #endif
-#endif
 
 /*
 ;;; Local Variables: ***