Rearrange dllimport/dllexport declarations for MS-Windows.
authorEli Zaretskii <eliz@gnu.org>
Mon, 6 May 2013 17:18:58 +0000 (20:18 +0300)
committerEli Zaretskii <eliz@gnu.org>
Mon, 6 May 2013 17:18:58 +0000 (20:18 +0300)
 gnumake.h (GMK_EXPORT) [_WIN32]: Move the dllexport declaration
 here from makeint.h.
 makeint.h (GMK_BUILDING_MAKE) [WINDOWS32]: Define before
 including gnumake.h.

ChangeLog
gnumake.h
makeint.h

index 0427aa9a6ca47c9cad5127ade45eca72a9abeeea..21e22aef3e18a32047915fb50e625ecd59105600 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2013-05-06  Eli Zaretskii  <eliz@gnu.org>
 
+       * gnumake.h (GMK_EXPORT) [_WIN32]: Move the dllexport declaration
+       here from makeint.h.
+
+       * makeint.h (GMK_BUILDING_MAKE) [WINDOWS32]: Define before
+       including gnumake.h.
+
        * doc/make.texi (Loaded Object Example): Add a note about building
        shared objects on MS-Windows.
 
index 168f37082f909ae75c793e63a326e964eb46fa7f..8c622b7f63ee440e44ccaa9f6d66f643e37c0390 100644 (file)
--- a/gnumake.h
+++ b/gnumake.h
@@ -28,7 +28,9 @@ typedef struct
 
 
 #ifdef _WIN32
-# ifndef GMK_EXPORT
+# ifdef GMK_BUILDING_MAKE
+#  define GMK_EXPORT  __declspec(dllexport)
+# else
 #  define GMK_EXPORT  __declspec(dllimport)
 # endif
 #else
index 14a6c2616ca9d2f471b3229d2962be8e79b3396c..6bff07af24802db5336fe443ced70d7246e95507 100644 (file)
--- a/makeint.h
+++ b/makeint.h
@@ -49,10 +49,10 @@ char *alloca ();
 
 /* Include the externally-visible content.
    Be sure to use the local one, and not one installed on the system.
-   Define GMK_EXPORT for proper selection of dllexport/dllimport declarations
-   for MS-Windows.  */
+   Define GMK_BUILDING_MAKE for proper selection of dllexport/dllimport
+   declarations for MS-Windows.  */
 #ifdef WINDOWS32
-# define GMK_EXPORT  __declspec(dllexport)
+# define GMK_BUILDING_MAKE
 #endif
 #include "gnumake.h"