changeset 21287:c4b9567f9405

fix building .oct files that include oct.h * mk-octave-config-h.sh: Emit definitions for OCTAVE_IMPORT and OCTAVE_EXPORT. * oct.h: Don't include config.h.
author John W. Eaton <jwe@octave.org>
date Wed, 17 Feb 2016 11:22:04 -0500
parents 2c93596507fe
children 1a21a0f6364e
files build-aux/mk-octave-config-h.sh libinterp/corefcn/oct.h
diffstat 2 files changed, 8 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/build-aux/mk-octave-config-h.sh	Wed Feb 17 10:21:08 2016 -0500
+++ b/build-aux/mk-octave-config-h.sh	Wed Feb 17 11:22:04 2016 -0500
@@ -113,13 +113,17 @@
 #endif
 
 #if defined (_MSC_VER)
-#  define OCTAVE_API __declspec(dllimport)
-#  define OCTINTERP_API __declspec(dllimport)
+#  define OCTAVE_EXPORT __declspec(dllexport)
+#  define OCTAVE_IMPORT __declspec(dllimport)
 #else
-#  define OCTAVE_API
-#  define OCTINTERP_API
+   /* All other compilers, at least for now. */
+#  define OCTAVE_EXPORT
+#  define OCTAVE_IMPORT
 #endif
 
+#define OCTAVE_API OCTAVE_IMPORT
+#define OCTINTERP_API OCTAVE_IMPORT
+
 #include <stdint.h>
 EOF
 
--- a/libinterp/corefcn/oct.h	Wed Feb 17 10:21:08 2016 -0500
+++ b/libinterp/corefcn/oct.h	Wed Feb 17 11:22:04 2016 -0500
@@ -27,13 +27,7 @@
 
 // Things that are often included to create .oct files.
 
-// config.h needs to be first because it includes #defines that can
-// affect other header files.
-
-#include <config.h>
-
 #include "Matrix.h"
-
 #include "oct-locbuf.h"
 #include "defun-dld.h"
 #include "error.h"