diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2021-03-08 12:01:43 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2021-03-09 15:27:16 +0800 |
commit | 6e242eaba57bbc0f44ab7c4959d2e66ceeeededa (patch) | |
tree | 736ec25cddd288afe40590d707f69590a334eec8 /gio | |
parent | 8efae7518c29dd52b09968ae3e42254e3ceef178 (diff) | |
download | glibmm-6e242eaba57bbc0f44ab7c4959d2e66ceeeededa.tar.gz |
g[io|lib]mmconfig.h.*: Don't dllimport on MinGW
This will fix warnings when building items using glibmm and giomm with
MinGW/GCC.
Please see: https://gitlab.gnome.org/GNOME/gtkmm/-/issues/90
Diffstat (limited to 'gio')
-rw-r--r-- | gio/giommconfig.h.in | 4 | ||||
-rw-r--r-- | gio/giommconfig.h.meson | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/gio/giommconfig.h.in b/gio/giommconfig.h.in index b9579c6e..714ad879 100644 --- a/gio/giommconfig.h.in +++ b/gio/giommconfig.h.in @@ -26,8 +26,10 @@ #ifdef GIOMM_DLL # if defined(GIOMM_BUILD) # define GIOMM_API __declspec(dllexport) -# else +# elif !defined (__GNUC__) # define GIOMM_API __declspec(dllimport) +# else /* don't dllimport classes/methods on GCC/MinGW */ +# define GIOMM_API # endif /* Build a static library or non-native-Windows library */ #else diff --git a/gio/giommconfig.h.meson b/gio/giommconfig.h.meson index 9ac31c6d..41232323 100644 --- a/gio/giommconfig.h.meson +++ b/gio/giommconfig.h.meson @@ -26,8 +26,10 @@ #ifdef GIOMM_DLL # if defined(GIOMM_BUILD) # define GIOMM_API __declspec(dllexport) -# else +# elif !defined (__GNUC__) # define GIOMM_API __declspec(dllimport) +# else /* don't dllimport classes/methods on GCC/MinGW */ +# define GIOMM_API # endif /* Build a static library or non-native-Windows library */ #else |