[atkmm/atkmm-2-28] atkmmconfig.h.*: Don't dllimport on MinGW



commit e80c5e7ea7144e2f3fbcd3b16fac4b98ade589cf
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Tue Mar 9 15:37:44 2021 +0800

    atkmmconfig.h.*: Don't dllimport on MinGW
    
    This will fix warnings when building items using atkmm with MinGW/GCC.
    
    Please see: https://gitlab.gnome.org/GNOME/gtkmm/-/issues/90

 atk/atkmmconfig.h.in    | 4 +++-
 atk/atkmmconfig.h.meson | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/atk/atkmmconfig.h.in b/atk/atkmmconfig.h.in
index 8cf3d17..9b18ee8 100644
--- a/atk/atkmmconfig.h.in
+++ b/atk/atkmmconfig.h.in
@@ -25,8 +25,10 @@
 #ifdef ATKMM_DLL
 # ifdef ATKMM_BUILD
 #  define ATKMM_API __declspec(dllexport)
-# else
+# elif !defined (__GNUC__)
 #  define ATKMM_API __declspec(dllimport)
+# else /* don't dllimport classes/methods on GCC/MinGW */
+#  define ATKMM_API
 # endif
 #else
 # define ATKMM_API
diff --git a/atk/atkmmconfig.h.meson b/atk/atkmmconfig.h.meson
index a039354..7d9142e 100644
--- a/atk/atkmmconfig.h.meson
+++ b/atk/atkmmconfig.h.meson
@@ -28,8 +28,10 @@
 #ifdef ATKMM_DLL
 # ifdef ATKMM_BUILD
 #  define ATKMM_API __declspec(dllexport)
-# else
+# elif !defined (__GNUC__)
 #  define ATKMM_API __declspec(dllimport)
+# else /* don't dllimport classes/methods on GCC/MinGW */
+#  define ATKMM_API
 # endif
 #else
 # define ATKMM_API


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]