New visibility handling in gdk

Change the visibility handling to be the same way we do it in
GLib now. We pass -fvisibility=hidden to gcc and decorate public
functions with __attribute__((visibility("default"))).

This commit just does this for GDK, GTK+ will follow later.
This commit is contained in:
Matthias Clasen
2013-03-15 06:35:30 -04:00
parent f5f5b70355
commit 8af16c5d44
7 changed files with 63 additions and 24 deletions

View File

@ -144,11 +144,11 @@ gdk_c_sources = \
gdkwindowimpl.c
gdk_built_sources = \
gdkenumtypes.h \
gdkenumtypes.c \
gdkmarshalers.h \
gdkmarshalers.c \
gdkversionmacros.h \
gdkenumtypes.h
gdkversionmacros.h
#
# setup GDK sources and their dependencies
@ -166,6 +166,7 @@ common_sources = \
gdkmarshalers.h
libgdk_3_la_SOURCES = $(common_sources)
libgdk_3_la_CFLAGS = $(AM_CFLAGS) $(GDK_HIDDEN_VISIBILITY_CFLAGS)
libgdk_3_la_LIBADD = $(GDK_DEP_LIBS)
libgdk_3_la_LDFLAGS = $(LDADD)