summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdk-pixbuf/ChangeLog24
-rw-r--r--gdk-pixbuf/Makefile.am36
-rwxr-xr-xgdk-pixbuf/abicheck.sh5
-rw-r--r--gdk-pixbuf/gdk-pixbuf-animation.c1
-rw-r--r--gdk-pixbuf/gdk-pixbuf-data.c1
-rw-r--r--gdk-pixbuf/gdk-pixbuf-io.c1
-rw-r--r--gdk-pixbuf/gdk-pixbuf-loader.c1
-rw-r--r--gdk-pixbuf/gdk-pixbuf-scale.c1
-rw-r--r--gdk-pixbuf/gdk-pixbuf-util.c1
-rw-r--r--gdk-pixbuf/gdk-pixbuf.c1
-rw-r--r--gdk-pixbuf/gdk-pixbuf.symbols101
-rw-r--r--gdk-pixbuf/gdk-pixdata.c1
-rw-r--r--gdk-pixbuf/gdk_pixbuf.def88
-rwxr-xr-xgdk-pixbuf/makegdkpixbufalias.pl56
14 files changed, 222 insertions, 96 deletions
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog
index 13f0466a6..adf4104b6 100644
--- a/gdk-pixbuf/ChangeLog
+++ b/gdk-pixbuf/ChangeLog
@@ -1,3 +1,27 @@
+Tue Aug 10 23:53:59 2004 Matthias Clasen <maclas@gmx.de>
+
+ Add hidden aliases for exported symbols which are
+ used internally in order to get rid of many PLT
+ entries. (#145519, Arjan van de Ven)
+
+ * gdk/Makefile.am: Add rules to generate gdk_pixbuf.def and
+ gdk-pixbuf-alias.h from gdk-pixbuf.symbols, and make make
+ check check the abi with abicheck.sh.
+
+ * gdk/gdk-pixbuf.symbols: New file. Definition of the gdk-pixbuf
+ ABI. The file can be processed by cpp to filter out certain
+ subsets of symbols.
+
+ * gdk/abicheck.sh: New file. Script to check the actually
+ symbols exported from libgdk_pibuf.2.0.so against the symbols
+ found in gdk-pixbuf.symbols.
+
+ * gdk/makegdkpixbufalias.pl: New file. Perl script to generate the
+ header containing the alias definitions for internally used
+ exported symbols from a list of symbols.
+
+ * *.c: Include gdk-pixbuf-alias.h
+
2004-08-06 Hans Breuer <hans@breuer.org>
* gdk_pixbuf.def makefile.msc : updated
diff --git a/gdk-pixbuf/Makefile.am b/gdk-pixbuf/Makefile.am
index bddb3061a..21dfe16f1 100644
--- a/gdk-pixbuf/Makefile.am
+++ b/gdk-pixbuf/Makefile.am
@@ -39,6 +39,16 @@ install-ms-lib:
uninstall-ms-lib:
endif
+gdk_pixbuf.def: gdk-pixbuf.symbols
+ (echo -e EXPORTS; cpp -P -DINCLUDE_VARIABLES gdk-pixbuf.symbols | sed -e '/^$$/d' -e 's/^/\t/') > gdk_pixbuf.def
+
+gdk-pixbuf-alias.h: gdk-pixbuf.symbols
+ cpp -P -DINCLUDE_INTERNAL_SYMBOLS gdk-pixbuf.symbols | ./makegdkpixbufalias.pl > gdk-pixbuf-alias.h
+
+if OS_UNIX
+TESTS = abicheck.sh
+endif
+
lib_LTLIBRARIES = \
libgdk_pixbuf-2.0.la
@@ -325,16 +335,23 @@ libgdk_pixbufinclude_HEADERS = \
gdk-pixdata.h
noinst_HEADERS = \
+ gdk-pixbuf-alias.h \
gdk-pixbuf-private.h
-BUILT_SOURCES = gdk-pixbuf-enum-types.h gdk-pixbuf-enum-types.c \
- gdk-pixbuf-marshal.h gdk-pixbuf-marshal.c
+BUILT_SOURCES = \
+ gdk-pixbuf-alias.h \
+ gdk-pixbuf-enum-types.h \
+ gdk-pixbuf-enum-types.c \
+ gdk-pixbuf-marshal.h \
+ gdk-pixbuf-marshal.c
CLEANFILES =
-MAINTAINERCLEANFILES = \
- gdk-pixbuf-enum-types.h gdk-pixbuf-enum-types.c \
- gdk-pixbuf-marshal.h gdk-pixbuf-marshal.c \
- gdk-pixbuf.loaders
+MAINTAINERCLEANFILES = \
+ gdk-pixbuf-enum-types.h \
+ gdk-pixbuf-enum-types.c \
+ gdk-pixbuf-marshal.h \
+ gdk-pixbuf-marshal.c \
+ gdk-pixbuf.loaders
#
# gdk-pixbuf-enum-types.h
@@ -361,7 +378,7 @@ MAINTAINERCLEANFILES += s-enum-types-h
#
gdk-pixbuf-enum-types.c: @REBUILD@ $(gdk_pixbuf_headers) Makefile
(cd $(srcdir) && glib-mkenums \
- --fhead "#include <gdk-pixbuf/gdk-pixbuf.h>" \
+ --fhead "#include \"gdk-pixbuf-alias.h\"\n#include <gdk-pixbuf/gdk-pixbuf.h>" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
@@ -387,7 +404,7 @@ MAINTAINERCLEANFILES += stamp-gdk-pixbuf-marshal.h
# gdk-pixbuf-marshal.c
#
$(srcdir)/gdk-pixbuf-marshal.c: @REBUILD@ $(srcdir)/gdk-pixbuf-marshal.list
- $(GLIB_GENMARSHAL) --prefix=gdk_pixbuf_marshal $(srcdir)/gdk-pixbuf-marshal.list --body >> xgen-gmc \
+ (echo -e "#include \"gdk-pixbuf-alias.h\"" | $(GLIB_GENMARSHAL) --prefix=gdk_pixbuf_marshal $(srcdir)/gdk-pixbuf-marshal.list --body ) >> xgen-gmc \
&& cp xgen-gmc gdk-pixbuf-marshal.c \
&& rm -f xgen-gmc xgen-gmc~
@@ -403,6 +420,9 @@ distclean-local:
EXTRA_DIST = \
gdk-pixbuf-csource.1 \
makefile.msc \
+ gdk-pixbuf.symbols \
+ makegdkpixbufalias.pl \
+ abicheck.sh \
gdk_pixbuf.def \
gdk_pixbuf.rc \
gdk-pixbuf-marshal.c \
diff --git a/gdk-pixbuf/abicheck.sh b/gdk-pixbuf/abicheck.sh
new file mode 100755
index 000000000..9363c889d
--- /dev/null
+++ b/gdk-pixbuf/abicheck.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+cpp -P -DINCLUDE_INTERNAL_SYMBOLS -DINCLUDE_MMX_SYMBOLS gdk-pixbuf.symbols | sed -e '/^$/d' | sort > expected-abi
+nm -D .libs/libgdk_pixbuf-2.0.so | grep " T " | cut -c12- | grep "^\(gdk\|pixops\)_" | sort > actual-abi
+diff -u expected-abi actual-abi
diff --git a/gdk-pixbuf/gdk-pixbuf-animation.c b/gdk-pixbuf/gdk-pixbuf-animation.c
index 863ea6e7c..b5edb861f 100644
--- a/gdk-pixbuf/gdk-pixbuf-animation.c
+++ b/gdk-pixbuf/gdk-pixbuf-animation.c
@@ -24,6 +24,7 @@
#include <config.h>
#include <errno.h>
+#include "gdk-pixbuf-alias.h"
#include "gdk-pixbuf-private.h"
#include "gdk-pixbuf-io.h"
#include "gdk-pixbuf-i18n.h"
diff --git a/gdk-pixbuf/gdk-pixbuf-data.c b/gdk-pixbuf/gdk-pixbuf-data.c
index 112133835..e8a007657 100644
--- a/gdk-pixbuf/gdk-pixbuf-data.c
+++ b/gdk-pixbuf/gdk-pixbuf-data.c
@@ -21,6 +21,7 @@
*/
#include <config.h>
+#include "gdk-pixbuf-alias.h"
#include "gdk-pixbuf.h"
#include "gdk-pixbuf-private.h"
#include <stdlib.h>
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
index 984acebc2..88d223ee4 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.c
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
@@ -33,6 +33,7 @@
#include <unistd.h>
#endif
+#include "gdk-pixbuf-alias.h"
#include "gdk-pixbuf-private.h"
#include "gdk-pixbuf-io.h"
diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c
index 7bb0f74fa..e25c2db51 100644
--- a/gdk-pixbuf/gdk-pixbuf-loader.c
+++ b/gdk-pixbuf/gdk-pixbuf-loader.c
@@ -27,6 +27,7 @@
#include <config.h>
#include <string.h>
+#include "gdk-pixbuf-alias.h"
#include "gdk-pixbuf-private.h"
#include "gdk-pixbuf-animation.h"
#include "gdk-pixbuf-io.h"
diff --git a/gdk-pixbuf/gdk-pixbuf-scale.c b/gdk-pixbuf/gdk-pixbuf-scale.c
index 041bd254e..d5326a33b 100644
--- a/gdk-pixbuf/gdk-pixbuf-scale.c
+++ b/gdk-pixbuf/gdk-pixbuf-scale.c
@@ -23,6 +23,7 @@
#include <config.h>
#include <math.h>
#include <string.h>
+#include "gdk-pixbuf-alias.h"
#include "gdk-pixbuf-private.h"
#include "pixops/pixops.h"
diff --git a/gdk-pixbuf/gdk-pixbuf-util.c b/gdk-pixbuf/gdk-pixbuf-util.c
index 9ee844a28..4abca5260 100644
--- a/gdk-pixbuf/gdk-pixbuf-util.c
+++ b/gdk-pixbuf/gdk-pixbuf-util.c
@@ -22,6 +22,7 @@
*/
#include <config.h>
+#include "gdk-pixbuf-alias.h"
#include "gdk-pixbuf-private.h"
#include <string.h>
diff --git a/gdk-pixbuf/gdk-pixbuf.c b/gdk-pixbuf/gdk-pixbuf.c
index 7a43464ac..84d6cb2f3 100644
--- a/gdk-pixbuf/gdk-pixbuf.c
+++ b/gdk-pixbuf/gdk-pixbuf.c
@@ -28,6 +28,7 @@
#include <stdlib.h>
#include <string.h>
#define GDK_PIXBUF_COMPILATION
+#include "gdk-pixbuf-alias.h"
#include "gdk-pixbuf.h"
#include "gdk-pixbuf-private.h"
diff --git a/gdk-pixbuf/gdk-pixbuf.symbols b/gdk-pixbuf/gdk-pixbuf.symbols
new file mode 100644
index 000000000..5762b2103
--- /dev/null
+++ b/gdk-pixbuf/gdk-pixbuf.symbols
@@ -0,0 +1,101 @@
+gdk_colorspace_get_type
+gdk_interp_type_get_type
+gdk_pixbuf_add_alpha
+gdk_pixbuf_alpha_mode_get_type
+gdk_pixbuf_animation_get_height
+gdk_pixbuf_animation_get_iter
+gdk_pixbuf_animation_get_static_image
+gdk_pixbuf_animation_get_type
+gdk_pixbuf_animation_get_width
+gdk_pixbuf_animation_is_static_image
+gdk_pixbuf_animation_iter_advance
+gdk_pixbuf_animation_iter_get_delay_time
+gdk_pixbuf_animation_iter_get_pixbuf
+gdk_pixbuf_animation_iter_get_type
+gdk_pixbuf_animation_iter_on_currently_loading_frame
+gdk_pixbuf_animation_new_from_file
+gdk_pixbuf_animation_ref
+gdk_pixbuf_animation_unref
+gdk_pixbuf_composite
+gdk_pixbuf_composite_color
+gdk_pixbuf_composite_color_simple
+gdk_pixbuf_copy
+gdk_pixbuf_copy_area
+gdk_pixbuf_error_get_type
+gdk_pixbuf_error_quark
+gdk_pixbuf_fill
+gdk_pixbuf_flip
+gdk_pixbuf_format_get_description
+gdk_pixbuf_format_get_extensions
+gdk_pixbuf_format_get_license
+gdk_pixbuf_format_get_mime_types
+gdk_pixbuf_format_get_name
+gdk_pixbuf_format_is_disabled
+gdk_pixbuf_format_is_scalable
+gdk_pixbuf_format_is_writable
+gdk_pixbuf_format_set_disabled
+gdk_pixbuf_from_pixdata
+gdk_pixbuf_get_bits_per_sample
+gdk_pixbuf_get_colorspace
+gdk_pixbuf_get_file_info
+gdk_pixbuf_get_formats
+gdk_pixbuf_get_has_alpha
+gdk_pixbuf_get_height
+gdk_pixbuf_get_n_channels
+gdk_pixbuf_get_option
+gdk_pixbuf_get_pixels
+gdk_pixbuf_get_rowstride
+gdk_pixbuf_get_type
+gdk_pixbuf_get_width
+gdk_pixbuf_loader_close
+gdk_pixbuf_loader_get_animation
+gdk_pixbuf_loader_get_format
+gdk_pixbuf_loader_get_pixbuf
+gdk_pixbuf_loader_get_type
+gdk_pixbuf_loader_new
+gdk_pixbuf_loader_new_with_mime_type
+gdk_pixbuf_loader_new_with_type
+gdk_pixbuf_loader_set_size
+gdk_pixbuf_loader_write
+#ifdef INCLUDE_INTERNAL_SYMBOLS
+gdk_pixbuf_marshal_VOID__INT_INT
+gdk_pixbuf_marshal_VOID__INT_INT_INT_INT
+#endif
+gdk_pixbuf_new
+gdk_pixbuf_new_from_data
+gdk_pixbuf_new_from_file
+gdk_pixbuf_new_from_file_at_size
+gdk_pixbuf_new_from_inline
+gdk_pixbuf_new_from_xpm_data
+gdk_pixbuf_new_subpixbuf
+gdk_pixbuf_non_anim_new
+gdk_pixbuf_ref
+gdk_pixbuf_rotate_simple
+gdk_pixbuf_rotation_get_type
+gdk_pixbuf_saturate_and_pixelate
+gdk_pixbuf_save
+gdk_pixbuf_save_to_buffer
+gdk_pixbuf_save_to_bufferv
+gdk_pixbuf_save_to_callback
+gdk_pixbuf_save_to_callbackv
+gdk_pixbuf_savev
+gdk_pixbuf_scale
+gdk_pixbuf_scale_simple
+gdk_pixbuf_set_option
+gdk_pixbuf_unref
+#ifdef INCLUDE_VARIABLES
+gdk_pixbuf_major_version
+gdk_pixbuf_micro_version
+gdk_pixbuf_minor_version
+gdk_pixbuf_version
+#endif
+gdk_pixdata_deserialize
+gdk_pixdata_from_pixbuf
+gdk_pixdata_serialize
+gdk_pixdata_to_csource
+#ifdef INCLUDE_MMX_SYMBOLS
+pixops_composite_line_22_4a4_mmx
+pixops_composite_line_color_22_4a4_mmx
+pixops_have_mmx
+pixops_scale_line_22_33_mmx
+#endif
diff --git a/gdk-pixbuf/gdk-pixdata.c b/gdk-pixbuf/gdk-pixdata.c
index 7e63bfa65..66f665877 100644
--- a/gdk-pixbuf/gdk-pixdata.c
+++ b/gdk-pixbuf/gdk-pixdata.c
@@ -17,6 +17,7 @@
* Boston, MA 02111-1307, USA.
*/
#include <config.h>
+#include "gdk-pixbuf-alias.h"
#include "gdk-pixdata.h"
#include "gdk-pixbuf-private.h"
diff --git a/gdk-pixbuf/gdk_pixbuf.def b/gdk-pixbuf/gdk_pixbuf.def
deleted file mode 100644
index cf9dcfd9c..000000000
--- a/gdk-pixbuf/gdk_pixbuf.def
+++ /dev/null
@@ -1,88 +0,0 @@
-EXPORTS
- gdk_colorspace_get_type
- gdk_interp_type_get_type
- gdk_pixbuf_add_alpha
- gdk_pixbuf_alpha_mode_get_type
- gdk_pixbuf_animation_get_height
- gdk_pixbuf_animation_get_iter
- gdk_pixbuf_animation_get_static_image
- gdk_pixbuf_animation_get_type
- gdk_pixbuf_animation_get_width
- gdk_pixbuf_animation_is_static_image
- gdk_pixbuf_animation_iter_advance
- gdk_pixbuf_animation_iter_get_delay_time
- gdk_pixbuf_animation_iter_get_pixbuf
- gdk_pixbuf_animation_iter_get_type
- gdk_pixbuf_animation_iter_on_currently_loading_frame
- gdk_pixbuf_animation_new_from_file
- gdk_pixbuf_animation_ref
- gdk_pixbuf_animation_unref
- gdk_pixbuf_composite
- gdk_pixbuf_composite_color
- gdk_pixbuf_composite_color_simple
- gdk_pixbuf_copy
- gdk_pixbuf_copy_area
- gdk_pixbuf_error_get_type
- gdk_pixbuf_error_quark
- gdk_pixbuf_fill
- gdk_pixbuf_flip
- gdk_pixbuf_format_get_description
- gdk_pixbuf_format_get_extensions
- gdk_pixbuf_format_get_mime_types
- gdk_pixbuf_format_get_name
- gdk_pixbuf_format_is_scalable
- gdk_pixbuf_format_is_writable
- gdk_pixbuf_from_pixdata
- gdk_pixbuf_get_bits_per_sample
- gdk_pixbuf_get_colorspace
- gdk_pixbuf_get_file_info
- gdk_pixbuf_get_formats
- gdk_pixbuf_get_has_alpha
- gdk_pixbuf_get_height
- gdk_pixbuf_get_n_channels
- gdk_pixbuf_get_option
- gdk_pixbuf_get_pixels
- gdk_pixbuf_get_rowstride
- gdk_pixbuf_get_type
- gdk_pixbuf_get_width
- gdk_pixbuf_loader_close
- gdk_pixbuf_loader_get_animation
- gdk_pixbuf_loader_get_format
- gdk_pixbuf_loader_get_pixbuf
- gdk_pixbuf_loader_get_type
- gdk_pixbuf_loader_new
- gdk_pixbuf_loader_new_with_mime_type
- gdk_pixbuf_loader_new_with_type
- gdk_pixbuf_loader_set_size
- gdk_pixbuf_loader_write
- gdk_pixbuf_major_version
- gdk_pixbuf_micro_version
- gdk_pixbuf_minor_version
- gdk_pixbuf_new
- gdk_pixbuf_new_from_data
- gdk_pixbuf_new_from_file
- gdk_pixbuf_new_from_file_at_size
- gdk_pixbuf_new_from_inline
- gdk_pixbuf_new_from_xpm_data
- gdk_pixbuf_new_subpixbuf
- gdk_pixbuf_non_anim_new
- gdk_pixbuf_ref
- gdk_pixbuf_rotate_simple
- gdk_pixbuf_rotation_get_type
- gdk_pixbuf_saturate_and_pixelate
- gdk_pixbuf_save
- gdk_pixbuf_save_to_buffer
- gdk_pixbuf_save_to_bufferv
- gdk_pixbuf_save_to_callback
- gdk_pixbuf_save_to_callbackv
- gdk_pixbuf_savev
- gdk_pixbuf_scale
- gdk_pixbuf_scale_simple
- gdk_pixbuf_set_option
- gdk_pixbuf_unref
- gdk_pixbuf_version
- gdk_pixdata_deserialize
- gdk_pixdata_from_pixbuf
- gdk_pixdata_serialize
- gdk_pixdata_to_csource
-
diff --git a/gdk-pixbuf/makegdkpixbufalias.pl b/gdk-pixbuf/makegdkpixbufalias.pl
new file mode 100755
index 000000000..a76b61599
--- /dev/null
+++ b/gdk-pixbuf/makegdkpixbufalias.pl
@@ -0,0 +1,56 @@
+#!/usr/bin/perl -w
+
+print <<EOF;
+/* Generated by makegdkpixbufalias.pl */
+
+#include <glib.h>
+
+#ifdef G_HAVE_GNUC_VISIBILITY
+
+#ifdef GDK_PIXBUF_DISABLE_DEPRECATED
+#define WAS_NO_DEPR
+#endif
+#undef GDK_PIXBUF_DISABLE_DEPRECATED
+
+#ifdef G_DISABLE_DEPRECATED
+#define WAS_NO_G_DEPR
+#endif
+#undef G_DISABLE_DEPRECATED
+
+#include "gdk-pixbuf.h"
+#include "gdk-pixdata.h"
+#include "gdk-pixbuf-marshal.h"
+
+EOF
+
+while (<>) {
+
+ # ignore empty lines
+ next if /^\s*$/;
+
+ my $str = $_;
+ chomp($str);
+ my $alias = $str."__internal_alias";
+
+ print "extern __typeof ($str) $alias __attribute((visibility(\"hidden\"))); \n";
+ print "extern __typeof ($str) $str __attribute((alias(\"$alias\"), visibility(\"default\"))); \n";
+ print "#define $str $alias \n";
+ print "\n";
+}
+
+print <<EOF;
+
+#ifdef WAS_NO_DEPR
+#define GDK_PIXBUF_DISABLE_DEPRECATED
+#undef WAS_NO_DEPR
+#endif
+
+#ifdef WAS_NO_G_DEPR
+#define G_DISABLE_DEPRECATED
+#undef WAS_NO_G_DEPR
+#endif
+
+#endif /* G_HAVE_GNUC_VISIBILITY */
+EOF
+
+