[atkmm/use-dllexport-2-28: 1/4] atk/atkmmconfig.h.in: Re-organize ATKMM_API definition
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [atkmm/use-dllexport-2-28: 1/4] atk/atkmmconfig.h.in: Re-organize ATKMM_API definition
- Date: Wed, 1 Apr 2020 11:12:09 +0000 (UTC)
commit 7d15b4532562cfdba6c5369367877ec0281d07b4
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Apr 1 17:25:47 2020 +0800
atk/atkmmconfig.h.in: Re-organize ATKMM_API definition
We also activate ATKMM_DLL when we are building with Visual Studio, and
define ATKMM_API as __declspec(dllexport) when ATKMM_DLL and ATKMM_BUILD
are defined.
Since we may be building with sources that are generated by gmmproc that
did not support marking generated items with ATKMM_API, we also leave
around a ATKMM_USE_GENDEF macro that would be defined if we find out
that an older gmmproc was used to generate the sources from the .ccg/.hg
files.
atk/atkmmconfig.h.in | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/atk/atkmmconfig.h.in b/atk/atkmmconfig.h.in
index d744602..8cf3d17 100644
--- a/atk/atkmmconfig.h.in
+++ b/atk/atkmmconfig.h.in
@@ -18,13 +18,16 @@
#undef ATKMM_STATIC_LIB
/* Enable DLL-specific stuff only when not building a static library */
-#if !defined(ATKMM_STATIC_LIB) defined(__MINGW32__) && !defined(__CYGWIN__)
+#if !defined(ATKMM_STATIC_LIB) && ((defined(__MINGW32__) && !defined(__CYGWIN__)) || defined (_MSC_VER)) &&
!defined (ATKMM_USE_GENDEF)
# define ATKMM_DLL 1
#endif
-/* Do not dllexport as it is handled by gendef on MSVC */
-#if defined(ATKMM_DLL) && !defined(ATKMM_BUILD)
-# define ATKMM_API __declspec(dllimport)
+#ifdef ATKMM_DLL
+# ifdef ATKMM_BUILD
+# define ATKMM_API __declspec(dllexport)
+# else
+# define ATKMM_API __declspec(dllimport)
+# endif
#else
# define ATKMM_API
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]