[pangomm] pangommconfig.h.*: Don't dllimport on MinGW
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pangomm] pangommconfig.h.*: Don't dllimport on MinGW
- Date: Tue, 9 Mar 2021 08:12:36 +0000 (UTC)
commit e83fe5b423782c99dc47843c2ccdce88fc204bbb
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Tue Mar 9 16:07:31 2021 +0800
pangommconfig.h.*: Don't dllimport on MinGW
This will fix warnings when building items using pangomm with MinGW/GCC.
Please see: https://gitlab.gnome.org/GNOME/gtkmm/-/issues/90
pango/pangommconfig.h.in | 4 +++-
pango/pangommconfig.h.meson | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/pango/pangommconfig.h.in b/pango/pangommconfig.h.in
index 5c7932c..710d38d 100644
--- a/pango/pangommconfig.h.in
+++ b/pango/pangommconfig.h.in
@@ -24,8 +24,10 @@
#ifdef PANGOMM_DLL
# if defined(PANGOMM_BUILD)
# define PANGOMM_API __declspec(dllexport)
-# else
+# elif !defined (__GNUC__)
# define PANGOMM_API __declspec(dllimport)
+# else /* don't dllimport classes/methods on GCC/MinGW */
+# define PANGOMM_API
# endif /* PANGOMM_BUILD - _WINDLL */
#else
/* Build a static library or a non-native-Windows library */
diff --git a/pango/pangommconfig.h.meson b/pango/pangommconfig.h.meson
index c4dba01..58fa4d8 100644
--- a/pango/pangommconfig.h.meson
+++ b/pango/pangommconfig.h.meson
@@ -24,8 +24,10 @@
#ifdef PANGOMM_DLL
# if defined(PANGOMM_BUILD)
# define PANGOMM_API __declspec(dllexport)
-# else
+# elif !defined (__GNUC__)
# define PANGOMM_API __declspec(dllimport)
+# else /* don't dllimport classes/methods on GCC/MinGW */
+# define PANGOMM_API
# endif /* PANGOMM_BUILD - _WINDLL */
#else
/* Build a static library or a non-native-Windows library */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]