From 48876d7fb573f2a3823c20564b705fe1f36726c4 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 30 Sep 2006 14:06:45 +0000 Subject: [PATCH] Fix PLT issues --- ChangeLog | 8 ++++++++ glib/Makefile.am | 2 +- glib/abicheck.sh | 4 ++-- glib/gdataset.c | 2 +- glib/glib.symbols | 1 + glib/gmarkup.c | 3 +-- glib/gnulib/g-gnulib.h | 1 + glib/gshell.c | 2 +- glib/gslice.c | 2 +- glib/gspawn-win32.c | 3 +-- glib/gspawn.c | 3 +-- glib/gutf8.c | 2 +- glib/pltcheck.sh | 19 +++++++++++++++++++ 13 files changed, 39 insertions(+), 13 deletions(-) create mode 100755 glib/pltcheck.sh diff --git a/ChangeLog b/ChangeLog index 2da64715..4dd6fe1c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-09-30 Matthias Clasen + + * glib/pltcheck.sh: A script to check PLT entries. + * glib/Makefile.am (TESTS): Run pltcheck.sh + + * glib/*: Fix includes to correct some issues with + PLT entries. (#354522, Behdad Esfahbod) + 2006-09-17 Hans Breuer * glib/makefile.msc.in gobject/makefile.msc.in : better filtering diff --git a/glib/Makefile.am b/glib/Makefile.am index 8cb352bb..bcb1c016 100644 --- a/glib/Makefile.am +++ b/glib/Makefile.am @@ -24,7 +24,7 @@ galiasdef.c: glib.symbols if OS_LINUX if HAVE_GNUC_VISIBILITY -TESTS = abicheck.sh +TESTS = abicheck.sh pltcheck.sh endif endif diff --git a/glib/abicheck.sh b/glib/abicheck.sh index c814ba15..3e696850 100755 --- a/glib/abicheck.sh +++ b/glib/abicheck.sh @@ -6,8 +6,8 @@ INCLUDES="-include ${top_builddir:-..}/config.h" INCLUDES="$INCLUDES -include glibconfig.cpp" cpp -P -DINCLUDE_INTERNAL_SYMBOLS -DINCLUDE_VARIABLES -DG_STDIO_NO_WRAP_ON_UNIX -DALL_FILES $INCLUDES "${srcdir:-.}/glib.symbols" | sed -e '/^$/d' -e 's/ G_GNUC.*$//' -e 's/ PRIVATE$//' | sort > expected-abi -rm glibconfig.cpp +rm -f glibconfig.cpp nm -D -g --defined-only .libs/libglib-2.0.so | cut -d ' ' -f 3 | sort > actual-abi -diff -u expected-abi actual-abi && rm expected-abi actual-abi +diff -u expected-abi actual-abi && rm -f expected-abi actual-abi diff --git a/glib/gdataset.c b/glib/gdataset.c index 914ffcf5..10ce3dd3 100644 --- a/glib/gdataset.c +++ b/glib/gdataset.c @@ -35,8 +35,8 @@ #include #include "glib.h" -#include "galias.h" #include "gdatasetprivate.h" +#include "galias.h" /* --- defines --- */ diff --git a/glib/glib.symbols b/glib/glib.symbols index 1411e6fd..fb44157a 100644 --- a/glib/glib.symbols +++ b/glib/glib.symbols @@ -1105,6 +1105,7 @@ g_string_down g_string_up #endif #ifdef INCLUDE_INTERNAL_SYMBOLS + /* these are not internal, but we don't want to alias them */ g_string_append_c #endif g_str_equal diff --git a/glib/gmarkup.c b/glib/gmarkup.c index 53fa57ec..37bc884d 100644 --- a/glib/gmarkup.c +++ b/glib/gmarkup.c @@ -27,9 +27,8 @@ #include #include "glib.h" -#include "galias.h" - #include "glibintl.h" +#include "galias.h" GQuark g_markup_error_quark (void) diff --git a/glib/gnulib/g-gnulib.h b/glib/gnulib/g-gnulib.h index ce5dab7c..bb3b0c0d 100644 --- a/glib/gnulib/g-gnulib.h +++ b/glib/gnulib/g-gnulib.h @@ -21,6 +21,7 @@ #include #include #include "glib/glib.h" +#include "glib/galias.h" /* Private namespace for gnulib functions */ #define asnprintf _g_gnulib_asnprintf diff --git a/glib/gshell.c b/glib/gshell.c index 01ea43ac..3bb434e0 100644 --- a/glib/gshell.c +++ b/glib/gshell.c @@ -25,13 +25,13 @@ #include #include "glib.h" -#include "galias.h" #ifdef _ #warning "FIXME remove gettext hack" #endif #include "glibintl.h" +#include "galias.h" GQuark g_shell_error_quark (void) diff --git a/glib/gslice.c b/glib/gslice.c index 5cb12d31..148827a0 100644 --- a/glib/gslice.c +++ b/glib/gslice.c @@ -32,8 +32,8 @@ #include #include "gmem.h" /* gslice.h */ #include "gthreadprivate.h" -#include "galias.h" #include "glib.h" +#include "galias.h" #ifdef HAVE_UNISTD_H #include /* sysconf() */ #endif diff --git a/glib/gspawn-win32.c b/glib/gspawn-win32.c index de72441d..f5bc820b 100644 --- a/glib/gspawn-win32.c +++ b/glib/gspawn-win32.c @@ -46,6 +46,7 @@ #include "glib.h" #include "gprintfint.h" +#include "glibintl.h" #include "galias.h" #include @@ -67,8 +68,6 @@ int _wspawnve (int, const wchar_t *, const wchar_t **, const wchar_t **); int _wspawnv (int, const wchar_t *, const wchar_t **); #endif -#include "glibintl.h" - #ifdef G_SPAWN_WIN32_DEBUG static int debug = 1; #define SETUP_DEBUG() /* empty */ diff --git a/glib/gspawn.c b/glib/gspawn.c index 9550adaf..59397321 100644 --- a/glib/gspawn.c +++ b/glib/gspawn.c @@ -36,9 +36,8 @@ #endif /* HAVE_SYS_SELECT_H */ #include "glib.h" -#include "galias.h" - #include "glibintl.h" +#include "galias.h" static gint g_execute (const gchar *file, gchar **argv, diff --git a/glib/gutf8.c b/glib/gutf8.c index 84d3552b..f9b719d2 100644 --- a/glib/gutf8.c +++ b/glib/gutf8.c @@ -28,7 +28,6 @@ #include #include "glib.h" -#include "galias.h" #ifdef G_PLATFORM_WIN32 #include @@ -40,6 +39,7 @@ #include "libcharset/libcharset.h" #include "glibintl.h" +#include "galias.h" #define UTF8_COMPUTE(Char, Mask, Len) \ if (Char < 128) \ diff --git a/glib/pltcheck.sh b/glib/pltcheck.sh new file mode 100755 index 00000000..b2a04b79 --- /dev/null +++ b/glib/pltcheck.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +LANG=C + +status=0 + +if ! which readelf 2>/dev/null >/dev/null; then + echo "'readelf' not found; skipping test" + exit 0 +fi + +for so in .libs/lib*.so; do + echo Checking $so for local PLT entries + # g_string_insert_c is used in g_string_append_c_inline + # unaliased. Couldn't find a way to fix it. + readelf -r $so | grep 'JU\?MP_SLOT' | grep -v '\' | grep '\