[gdk-pixbuf] Fix version number variable linkage



commit 630bc277ac61eed0058266714845d842d7c5a8d2
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Jun 13 15:36:07 2016 +0800

    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

 gdk-pixbuf/gdk-pixbuf-features.h.in |    8 ++++++--
 gdk-pixbuf/gdk-pixbuf-macros.h      |    4 ----
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gdk-pixbuf/gdk-pixbuf-features.h.in b/gdk-pixbuf/gdk-pixbuf-features.h.in
index 40cf2c1..6901bc7 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 */
 
 /**
diff --git a/gdk-pixbuf/gdk-pixbuf-macros.h b/gdk-pixbuf/gdk-pixbuf-macros.h
index e81f1f1..0629622 100644
--- a/gdk-pixbuf/gdk-pixbuf-macros.h
+++ b/gdk-pixbuf/gdk-pixbuf-macros.h
@@ -48,10 +48,6 @@
        (GDK_PIXBUF_MAJOR == (major) && GDK_PIXBUF_MINOR == (minor) && \
         GDK_PIXBUF_MICRO >= (micro)))
 
-#ifndef _GDK_PIXBUF_EXTERN
-#define _GDK_PIXBUF_EXTERN extern
-#endif
-
 /**
  * GDK_PIXBUF_VERSION_2_0:
  *


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