Mercurial > hg > octave-nkf
changeset 2401:30cd01f9970c
[project @ 1996-10-13 16:22:35 by jwe]
author | jwe |
---|---|
date | Sun, 13 Oct 1996 16:22:35 +0000 |
parents | 49dc322cd9fb |
children | 690435f72e58 |
files | liboctave/ChangeLog liboctave/sun-utils.cc liboctave/sun-utils.h |
diffstat | 3 files changed, 29 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,9 @@ +Sun Oct 13 11:19:00 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * sun-utils.h: Conditionally declare MAIN__ too. Declare MAIN_ + and MAIN__ extern "C". + * sun-utils.cc: Include sun-utils.h here. Delete extern "C" stuff. + Sat Oct 12 12:40:00 1996 John W. Eaton <jwe@bevo.che.wisc.edu> * MArray-misc.cc: New file.
--- a/liboctave/sun-utils.cc +++ b/liboctave/sun-utils.cc @@ -22,26 +22,27 @@ #include <cassert> +#include "sun-utils.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 // Linux/ELF systems with g77. It should never be called. -extern "C" +#if defined (sun) +int +MAIN_ () { -#if defined (sun) - int MAIN_ (void) - { - assert (0); - return 0; - } + assert (0); + return 0; +} #elif defined (linux) && defined (__ELF__) - int MAIN__ (void) - { - assert (0); - return 0; - } +int +MAIN__ () +{ + assert (0); + return 0; +} #endif -} /* ;;; Local Variables: ***
--- 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: ***