summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/gdk-pixbuf-features.h.in
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2016-06-13 15:36:07 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2016-06-14 13:16:21 +0800
commit630bc277ac61eed0058266714845d842d7c5a8d2 (patch)
tree989695ad7a949fcf570f99687d3e3514c3e2a250 /gdk-pixbuf/gdk-pixbuf-features.h.in
parent01702f7c9aaad495fb049ce352de38a63e81cb9e (diff)
downloadgdk-pixbuf-630bc277ac61eed0058266714845d842d7c5a8d2.tar.gz
Fix version number variable linkage
When we used compiler directives to export symbols, we must also define GDK_PIXBUF_VAR accordingly, so that the version number variables get exported properly. Please see https://bugzilla.gnome.org/show_bug.cgi?id=767164#c8
Diffstat (limited to 'gdk-pixbuf/gdk-pixbuf-features.h.in')
-rw-r--r--gdk-pixbuf/gdk-pixbuf-features.h.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf-features.h.in b/gdk-pixbuf/gdk-pixbuf-features.h.in
index 40cf2c1db..6901bc713 100644
--- a/gdk-pixbuf/gdk-pixbuf-features.h.in
+++ b/gdk-pixbuf/gdk-pixbuf-features.h.in
@@ -48,6 +48,10 @@ Library version numbers.
#define GDK_PIXBUF_MICRO (@GDK_PIXBUF_MICRO@)
#define GDK_PIXBUF_VERSION "@GDK_PIXBUF_VERSION@"
+#ifndef _GDK_PIXBUF_EXTERN
+#define _GDK_PIXBUF_EXTERN extern
+#endif
+
/* We prefix variable declarations so they can
* properly get exported/imported from Windows DLLs.
*/
@@ -57,7 +61,7 @@ Library version numbers.
# else /* !GDK_PIXBUF_STATIC_COMPILATION */
# ifdef GDK_PIXBUF_C_COMPILATION
# ifdef DLL_EXPORT
-# define GDK_PIXBUF_VAR __declspec(dllexport)
+# define GDK_PIXBUF_VAR _GDK_PIXBUF_EXTERN
# else /* !DLL_EXPORT */
# define GDK_PIXBUF_VAR extern
# endif /* !DLL_EXPORT */
@@ -66,7 +70,7 @@ Library version numbers.
# endif /* !GDK_PIXBUF_C_COMPILATION */
# endif /* !GDK_PIXBUF_STATIC_COMPILATION */
#else /* !G_PLATFORM_WIN32 */
-# define GDK_PIXBUF_VAR extern
+# define GDK_PIXBUF_VAR _GDK_PIXBUF_EXTERN
#endif /* !G_PLATFORM_WIN32 */
/**