diff --git a/gio/Makefile.am b/gio/Makefile.am index e8f48653d..9c1557ea8 100644 --- a/gio/Makefile.am +++ b/gio/Makefile.am @@ -32,6 +32,8 @@ AM_CPPFLAGS = \ $(gmodule_INCLUDES) \ $(GLIB_DEBUG_FLAGS) \ -DGIO_COMPILATION \ + -D_GIO_API=G_PUBLIC_API \ + -D_G_API=_GIO_API \ -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\" lib_LTLIBRARIES = libgio-2.0.la diff --git a/glib/Makefile.am b/glib/Makefile.am index e3d50b355..8b339c2ed 100644 --- a/glib/Makefile.am +++ b/glib/Makefile.am @@ -47,6 +47,8 @@ AM_CPPFLAGS = \ -DG_LOG_DOMAIN=\"GLib\" \ $(GLIB_DEBUG_FLAGS) \ -DGLIB_COMPILATION \ + -D_GLIB_API=G_PUBLIC_API \ + -D_G_API=_GLIB_API \ -DPCRE_STATIC glib.def: glib.symbols $(top_builddir)/glib/glibconfig.h $(top_srcdir)/glib/process-symbol-file.sh Makefile diff --git a/glib/gmacros.h b/glib/gmacros.h index 4ad57da36..9ef6335cb 100644 --- a/glib/gmacros.h +++ b/glib/gmacros.h @@ -324,6 +324,25 @@ #define G_UNAVAILABLE(maj,min) #endif +#ifndef _G_API +#define _G_API +#endif +#ifndef _GLIB_API +#define _GLIB_API +#endif +#ifndef _GTHREAD_API +#define _GTHREAD_API +#endif +#ifndef _GMODULE_API +#define _GMODULE_API +#endif +#ifndef _GOBJECT_API +#define _GOBJECT_API +#endif +#ifndef _GIO_API +#define _GIO_API +#endif + /* These macros are used to mark deprecated functions in GLib headers, * and thus have to be exposed in installed headers. But please * do *not* use them in other projects. Instead, use G_DEPRECATED @@ -331,13 +350,13 @@ */ #ifdef GLIB_DISABLE_DEPRECATION_WARNINGS -#define GLIB_DEPRECATED -#define GLIB_DEPRECATED_FOR(f) -#define GLIB_UNAVAILABLE(maj,min) +#define GLIB_DEPRECATED _G_API +#define GLIB_DEPRECATED_FOR(f) _G_API +#define GLIB_UNAVAILABLE(maj,min) _G_API #else -#define GLIB_DEPRECATED G_DEPRECATED -#define GLIB_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) -#define GLIB_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) +#define GLIB_DEPRECATED _G_API G_DEPRECATED +#define GLIB_DEPRECATED_FOR(f) _G_API G_DEPRECATED_FOR(f) +#define GLIB_UNAVAILABLE(maj,min) _G_API G_UNAVAILABLE(maj,min) #endif #endif /* __G_MACROS_H__ */ diff --git a/glib/gversionmacros.h b/glib/gversionmacros.h index 04718ce57..60ad55cb3 100644 --- a/glib/gversionmacros.h +++ b/glib/gversionmacros.h @@ -191,84 +191,84 @@ # define GLIB_DEPRECATED_IN_2_26 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_26_FOR(f) GLIB_DEPRECATED_FOR(f) #else -# define GLIB_DEPRECATED_IN_2_26 -# define GLIB_DEPRECATED_IN_2_26_FOR(f) +# define GLIB_DEPRECATED_IN_2_26 _G_API +# define GLIB_DEPRECATED_IN_2_26_FOR(f) _G_API #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_26 # define GLIB_AVAILABLE_IN_2_26 GLIB_UNAVAILABLE(2, 26) #else -# define GLIB_AVAILABLE_IN_2_26 +# define GLIB_AVAILABLE_IN_2_26 _G_API #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_28 # define GLIB_DEPRECATED_IN_2_28 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_28_FOR(f) GLIB_DEPRECATED_FOR(f) #else -# define GLIB_DEPRECATED_IN_2_28 -# define GLIB_DEPRECATED_IN_2_28_FOR(f) +# define GLIB_DEPRECATED_IN_2_28 _G_API +# define GLIB_DEPRECATED_IN_2_28_FOR(f) _G_API #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_28 # define GLIB_AVAILABLE_IN_2_28 GLIB_UNAVAILABLE(2, 28) #else -# define GLIB_AVAILABLE_IN_2_28 +# define GLIB_AVAILABLE_IN_2_28 _G_API #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_30 # define GLIB_DEPRECATED_IN_2_30 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_30_FOR(f) GLIB_DEPRECATED_FOR(f) #else -# define GLIB_DEPRECATED_IN_2_30 -# define GLIB_DEPRECATED_IN_2_30_FOR(f) +# define GLIB_DEPRECATED_IN_2_30 _G_API +# define GLIB_DEPRECATED_IN_2_30_FOR(f) _G_API #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_30 # define GLIB_AVAILABLE_IN_2_30 GLIB_UNAVAILABLE(2, 30) #else -# define GLIB_AVAILABLE_IN_2_30 +# define GLIB_AVAILABLE_IN_2_30 _G_API #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_32 # define GLIB_DEPRECATED_IN_2_32 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_32_FOR(f) GLIB_DEPRECATED_FOR(f) #else -# define GLIB_DEPRECATED_IN_2_32 -# define GLIB_DEPRECATED_IN_2_32_FOR(f) +# define GLIB_DEPRECATED_IN_2_32 _G_API +# define GLIB_DEPRECATED_IN_2_32_FOR(f) _G_API #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_32 # define GLIB_AVAILABLE_IN_2_32 GLIB_UNAVAILABLE(2, 32) #else -# define GLIB_AVAILABLE_IN_2_32 +# define GLIB_AVAILABLE_IN_2_32 _G_API #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_34 # define GLIB_DEPRECATED_IN_2_34 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_34_FOR(f) GLIB_DEPRECATED_FOR(f) #else -# define GLIB_DEPRECATED_IN_2_34 -# define GLIB_DEPRECATED_IN_2_34_FOR(f) +# define GLIB_DEPRECATED_IN_2_34 _G_API +# define GLIB_DEPRECATED_IN_2_34_FOR(f) _G_API #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_34 # define GLIB_AVAILABLE_IN_2_34 GLIB_UNAVAILABLE(2, 34) #else -# define GLIB_AVAILABLE_IN_2_34 +# define GLIB_AVAILABLE_IN_2_34 _G_API #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_36 # define GLIB_DEPRECATED_IN_2_36 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_36_FOR(f) GLIB_DEPRECATED_FOR(f) #else -# define GLIB_DEPRECATED_IN_2_36 -# define GLIB_DEPRECATED_IN_2_36_FOR(f) +# define GLIB_DEPRECATED_IN_2_36 _G_API +# define GLIB_DEPRECATED_IN_2_36_FOR(f) _G_API #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_36 # define GLIB_AVAILABLE_IN_2_36 GLIB_UNAVAILABLE(2, 36) #else -# define GLIB_AVAILABLE_IN_2_36 +# define GLIB_AVAILABLE_IN_2_36 _G_API #endif #endif /* __G_VERSION_MACROS_H__ */ diff --git a/gmodule/Makefile.am b/gmodule/Makefile.am index c79741496..20ab31ecb 100644 --- a/gmodule/Makefile.am +++ b/gmodule/Makefile.am @@ -6,6 +6,8 @@ BUILT_SOURCES = AM_CPPFLAGS = \ $(glib_INCLUDES) \ -DG_LOG_DOMAIN=\"GModule\" \ + -D_GMODULE_API=G_PUBLIC_API \ + -D_G_API=_GMODULE_API \ @GLIB_DEBUG_FLAGS@ \ -DG_DISABLE_DEPRECATED diff --git a/gobject/Makefile.am b/gobject/Makefile.am index 9c6eb0908..f5d5fca70 100644 --- a/gobject/Makefile.am +++ b/gobject/Makefile.am @@ -16,7 +16,10 @@ AM_CPPFLAGS = \ -DG_LOG_DOMAIN=\"GLib-GObject\" \ $(glib_INCLUDES) \ $(GLIB_DEBUG_FLAGS) \ - -DGOBJECT_COMPILATION + -DGOBJECT_COMPILATION \ + -D_GOBJECT_API=G_PUBLIC_API \ + -D_G_API=_GOBJECT_API \ + $(NULL) gobject.def: gobject.symbols $(top_builddir)/glib/glibconfig.h $(top_srcdir)/glib/process-symbol-file.sh Makefile $(AM_V_GEN) env GLIB_DEBUG_FLAGS="$(GLIB_DEBUG_FLAGS)" $(top_srcdir)/glib/process-symbol-file.sh $< $@ diff --git a/gthread/Makefile.am b/gthread/Makefile.am index 73859d06c..4b6a75202 100644 --- a/gthread/Makefile.am +++ b/gthread/Makefile.am @@ -4,6 +4,8 @@ include $(top_srcdir)/Makefile.decl AM_CPPFLAGS = \ $(glib_INCLUDES) \ -DG_LOG_DOMAIN=\"GThread\" \ + -D_GTHREAD_API=G_PUBLIC_API \ + -D_G_API=_GTHREAD_API \ @GTHREAD_COMPILE_IMPL_DEFINES@ \ @GLIB_DEBUG_FLAGS@