changeset 4555:fe70d8074644

[project @ 2003-10-27 22:17:36 by jwe]
author jwe
date Mon, 27 Oct 2003 22:17:36 +0000
parents 78e34346f6fd
children 773a21e4fce8
files libcruft/ChangeLog libcruft/misc/f77-fcn.h
diffstat 2 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libcruft/ChangeLog	Mon Oct 27 22:01:49 2003 +0000
+++ b/libcruft/ChangeLog	Mon Oct 27 22:17:36 2003 +0000
@@ -1,5 +1,7 @@
 2003-10-27  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
+	* misc/f77-fcn.h: Only use inline if this is C++.
+
 	* misc/f77-fcn.c (xstopx): Return type is now F77_RET_T.
 	Use F77_RETURN.
 	* misc/machar.c (machar): Likewise.
--- a/libcruft/misc/f77-fcn.h	Mon Oct 27 22:01:49 2003 +0000
+++ b/libcruft/misc/f77-fcn.h	Mon Oct 27 22:17:36 2003 +0000
@@ -118,7 +118,11 @@
 
 typedef void *octave_cray_ftn_ch_dsc;
 
-static inline octave_cray_ftn_ch_dsc
+#ifdef __cplusplus
+#define OCTAVE_F77_FCN_INLINE inline
+#endif
+
+static OCTAVE_F77_FCN_INLINE octave_cray_ftn_ch_dsc
 octave_make_cray_ftn_ch_dsc (char *ptr_arg, unsigned long len_arg)
 {
   octave_cray_descriptor desc;
@@ -127,7 +131,7 @@
   return *((octave_cray_fortran_character_descriptor *) &f);
 }
 
-static inline octave_cray_ftn_ch_dsc
+static OCTAVE_F77_FCN_INLINE octave_cray_ftn_ch_dsc
 octave_make_cray_const_ftn_ch_dsc (const char *ptr_arg, unsigned long len_arg)
 {
   octave_cray_descriptor desc;
@@ -136,6 +140,10 @@
   return *((octave_cray_fcd *) &f);
 }
 
+#ifdef __cplusplus
+#undef OCTAVE_F77_FCN_INLINE
+#endif
+
 #elif defined (F77_USES_VISUAL_FORTRAN_CALLING_CONVENTION)
 
 #define F77_CHAR_ARG(x) x, strlen (x)