[glib/wip/symbol-visibility: 2/6] G_PUBLIC_API: New macro which directs compiler to export a symbol



commit be9b8259e9a58d1adc198aada8297353128f037f
Author: Ryan Lortie <desrt desrt ca>
Date:   Wed Nov 28 14:59:06 2012 -0500

    G_PUBLIC_API: New macro which directs compiler to export a symbol
    
    This will be used by a future GLib patch to control GLib's own symbol
    exports, but it can also be used by libraries depending on GLib.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688681

 configure.ac               |    4 ++++
 glib/glibconfig.h.win32.in |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 27b33d1..548fa1c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3040,12 +3040,16 @@ _______EOF
 		cat >>$outfile <<_______EOF
 #if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
 #define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
+#define G_PUBLIC_API __attribute__((visibility("default")))
 #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
 #define G_GNUC_INTERNAL __hidden
+#define G_PUBLIC_API __global
 #elif defined (__GNUC__) && defined (G_HAVE_GNUC_VISIBILITY)
 #define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
+#define G_PUBLIC_API   __attribute__((visibility("default")))
 #else
 #define G_GNUC_INTERNAL
+#define G_PUBLIC_API
 #endif 
 _______EOF
 
diff --git a/glib/glibconfig.h.win32.in b/glib/glibconfig.h.win32.in
index ae65d78..9bc794b 100644
--- a/glib/glibconfig.h.win32.in
+++ b/glib/glibconfig.h.win32.in
@@ -203,6 +203,7 @@ typedef unsigned __int64 guintptr;
 #define G_HAVE_GROWING_STACK 0
 
 #define G_GNUC_INTERNAL
+#define G_PUBLIC_API __declspec(dllexport)
 
 #define G_THREADS_ENABLED
 #define G_THREADS_IMPL_WIN32



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