Update to 2.4.8.

More importantly, pull out the NetBSD diff that dealt with
*BSDesque dlopen issues and, now that we have a working
RTLD_DEFAULT, go with the FreeBSD hack^H^H^H^H method which works
better.
This commit is contained in:
marcm 2004-12-07 06:16:20 +00:00
parent dc7e6b760e
commit 60eea62380
9 changed files with 35 additions and 212 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.17 2004/11/23 11:22:02 espie Exp $
# $OpenBSD: Makefile,v 1.18 2004/12/07 06:16:20 marcm Exp $
COMMENT= "general-purpose utility library"
COMMENT-docs= "glib2 documentation"
VERSION= 2.4.7
VERSION= 2.4.8
DISTNAME= glib-${VERSION}
PKGNAME= glib2-${VERSION}
PKGNAME-docs= glib2-docs-${VERSION}

View File

@ -1,3 +1,3 @@
MD5 (glib-2.4.7.tar.bz2) = eff6fec89455addf8b0dee5a19e343be
RMD160 (glib-2.4.7.tar.bz2) = 689c314a07b033026394e7df4c7472381ff0e701
SHA1 (glib-2.4.7.tar.bz2) = 0209a4301fc60a3659801ddb755f37a25253a167
MD5 (glib-2.4.8.tar.bz2) = e160a5feecf46e0fbb36db09c356953c
RMD160 (glib-2.4.8.tar.bz2) = a9d74e610973ca1589b6e16521af60a39519e6ea
SHA1 (glib-2.4.8.tar.bz2) = 416ad637a3f77d5a0b6f0fc065ec25dd84b48e04

View File

@ -1,101 +0,0 @@
$OpenBSD: patch-configure,v 1.6 2004/10/26 03:49:03 marcm Exp $
--- configure.orig Fri Oct 8 10:59:07 2004
+++ configure Mon Oct 11 17:49:34 2004
@@ -465,7 +465,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot GLIB_MAJOR_VERSION GLIB_MINOR_VERSION GLIB_MICRO_VERSION GLIB_VERSION GLIB_INTERFACE_AGE GLIB_BINARY_AGE LT_RELEASE LT_CURRENT LT_REVISION LT_AGE LT_CURRENT_MINUS_AGE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os OS_WIN32_TRUE OS_WIN32_FALSE G_LIB_WIN32_RESOURCE G_MODULE_WIN32_RESOURCE G_OBJECT_WIN32_RESOURCE G_THREAD_WIN32_RESOURCE GLIB_DEF GMODULE_DEF GOBJECT_DEF GTHREAD_DEF TESTGMODULE_EXP ms_librarian MS_LIB_AVAILABLE_TRUE MS_LIB_AVAILABLE_FALSE ENABLE_GC_FRIENDLY DISABLE_MEM_POOLS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE HAVE_CXX_TRUE HAVE_CXX_FALSE PKG_CONFIG PERL INDENT REBUILD PERL_PATH CPP EGREP USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLLIBS PO_IN_DATADIR_TRUE PO_IN_DATADIR_FALSE POFILES POSUB MKINSTALLDIRS GETTEXT_PACKAGE ICONV_LIBS LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ALLOCA GLIBC21 HAVE_GOOD_PRINTF_TRUE HAVE_GOOD_PRINTF_FALSE G_MODULE_SUPPORTED G_MODULE_IMPL G_MODULE_LIBS G_MODULE_LIBS_EXTRA G_MODULE_PLUGIN_LIBS G_MODULE_LDFLAGS G_MODULE_HAVE_DLERROR G_MODULE_BROKEN_RTLD_GLOBAL G_MODULE_NEED_USCORE GLIB_DEBUG_FLAGS GSPAWN GIO PLATFORMDEP ENABLE_TIMELOOP_TRUE ENABLE_TIMELOOP_FALSE PLATFORM_WIN32_TRUE PLATFORM_WIN32_FALSE GTHREAD_COMPILE_IMPL_DEFINES G_THREAD_CFLAGS G_THREAD_LIBS G_THREAD_LIBS_FOR_GTHREAD G_THREAD_LIBS_EXTRA G_LIBS_EXTRA CROSS_COMPILING_TRUE CROSS_COMPILING_FALSE GLIB_GENMARSHAL HTML_DIR ENABLE_GTK_DOC_TRUE ENABLE_GTK_DOC_FALSE GTK_DOC_USE_LIBTOOL_TRUE GTK_DOC_USE_LIBTOOL_FALSE XSLTPROC XML_CATALOG_FILE XMLCATALOG ENABLE_MAN_TRUE ENABLE_MAN_FALSE LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot GLIB_MAJOR_VERSION GLIB_MINOR_VERSION GLIB_MICRO_VERSION GLIB_VERSION GLIB_INTERFACE_AGE GLIB_BINARY_AGE LT_RELEASE LT_CURRENT LT_REVISION LT_AGE LT_CURRENT_MINUS_AGE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os OS_WIN32_TRUE OS_WIN32_FALSE G_LIB_WIN32_RESOURCE G_MODULE_WIN32_RESOURCE G_OBJECT_WIN32_RESOURCE G_THREAD_WIN32_RESOURCE GLIB_DEF GMODULE_DEF GOBJECT_DEF GTHREAD_DEF TESTGMODULE_EXP ms_librarian MS_LIB_AVAILABLE_TRUE MS_LIB_AVAILABLE_FALSE ENABLE_GC_FRIENDLY DISABLE_MEM_POOLS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE HAVE_CXX_TRUE HAVE_CXX_FALSE PKG_CONFIG PERL INDENT REBUILD PERL_PATH CPP EGREP USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLLIBS PO_IN_DATADIR_TRUE PO_IN_DATADIR_FALSE POFILES POSUB MKINSTALLDIRS GETTEXT_PACKAGE ICONV_LIBS LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ALLOCA GLIBC21 HAVE_GOOD_PRINTF_TRUE HAVE_GOOD_PRINTF_FALSE G_MODULE_SUPPORTED G_MODULE_IMPL G_MODULE_LIBS G_MODULE_LIBS_EXTRA G_MODULE_PLUGIN_LIBS G_MODULE_LDFLAGS G_MODULE_HAVE_DLERROR G_MODULE_BROKEN_RTLD_GLOBAL G_MODULE_BROKEN_DLOPEN_NULL G_MODULE_NEED_USCORE GLIB_DEBUG_FLAGS GSPAWN GIO PLATFORMDEP ENABLE_TIMELOOP_TRUE ENABLE_TIMELOOP_FALSE PLATFORM_WIN32_TRUE PLATFORM_WIN32_FALSE GTHREAD_COMPILE_IMPL_DEFINES G_THREAD_CFLAGS G_THREAD_LIBS G_THREAD_LIBS_FOR_GTHREAD G_THREAD_LIBS_EXTRA G_LIBS_EXTRA CROSS_COMPILING_TRUE CROSS_COMPILING_FALSE GLIB_GENMARSHAL HTML_DIR ENABLE_GTK_DOC_TRUE ENABLE_GTK_DOC_FALSE GTK_DOC_USE_LIBTOOL_TRUE GTK_DOC_USE_LIBTOOL_FALSE XSLTPROC XML_CATALOG_FILE XMLCATALOG ENABLE_MAN_TRUE ENABLE_MAN_FALSE LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -30430,6 +30430,7 @@ else
fi
G_MODULE_NEED_USCORE=0
G_MODULE_BROKEN_RTLD_GLOBAL=0
+G_MODULE_BROKEN_DLOPEN_NULL=0
G_MODULE_HAVE_DLERROR=0
if test -z "$G_MODULE_IMPL"; then
case "$host" in
@@ -31083,6 +31084,72 @@ echo "${ECHO_T}$glib_cv_rtldglobal_broke
else
G_MODULE_BROKEN_RTLD_GLOBAL=0
fi
+ echo "$as_me:$LINENO: checking for dlopen(NULL, 0) brokenness" >&5
+echo $ECHO_N "checking for dlopen(NULL, 0) brokenness... $ECHO_C" >&6
+if test "${glib_cv_dlopennull_broken+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test "$cross_compiling" = yes; then
+ glib_cv_dlopennull_broken=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <dlfcn.h>
+#ifndef RTLD_GLOBAL
+# define RTLD_GLOBAL 0
+#endif
+#ifndef RTLD_LAZY
+# define RTLD_LAZY 0
+#endif
+int gettext;
+int main () {
+ void *handle;
+ handle = dlopen ("libintl.so", RTLD_GLOBAL | RTLD_LAZY);
+ if (!handle) return 0;
+ handle = dlopen (NULL, 0);
+ if (!handle) return 0;
+ handle = dlsym (handle, "gettext");
+ return handle == NULL;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glib_cv_dlopennull_broken=no
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+glib_cv_dlopennull_broken=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ rm -f plugin.c plugin.o plugin.lo
+
+fi
+echo "$as_me:$LINENO: result: $glib_cv_dlopennull_broken" >&5
+echo "${ECHO_T}$glib_cv_dlopennull_broken" >&6
+ if test "x$glib_cv_dlopennull_broken" = "xyes"; then
+ G_MODULE_BROKEN_DLOPEN_NULL=1
+ else
+ G_MODULE_BROKEN_DLOPEN_NULL=0
+ fi
echo "$as_me:$LINENO: checking for preceeding underscore in symbols" >&5
echo $ECHO_N "checking for preceeding underscore in symbols... $ECHO_C" >&6
if test "${glib_cv_uscore+set}" = set; then
@@ -38406,6 +38473,7 @@ s,@G_MODULE_PLUGIN_LIBS@,$G_MODULE_PLUGI
s,@G_MODULE_LDFLAGS@,$G_MODULE_LDFLAGS,;t t
s,@G_MODULE_HAVE_DLERROR@,$G_MODULE_HAVE_DLERROR,;t t
s,@G_MODULE_BROKEN_RTLD_GLOBAL@,$G_MODULE_BROKEN_RTLD_GLOBAL,;t t
+s,@G_MODULE_BROKEN_DLOPEN_NULL@,$G_MODULE_BROKEN_DLOPEN_NULL,;t t
s,@G_MODULE_NEED_USCORE@,$G_MODULE_NEED_USCORE,;t t
s,@GLIB_DEBUG_FLAGS@,$GLIB_DEBUG_FLAGS,;t t
s,@GSPAWN@,$GSPAWN,;t t

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-glib_gnulib_g-gnulib_h,v 1.1 2004/06/22 03:15:02 marcm Exp $
--- glib/gnulib/g-gnulib.h.orig 2004-04-01 07:34:06.000000000 -0800
+++ glib/gnulib/g-gnulib.h 2004-04-01 07:35:10.000000000 -0800
@@ -41,6 +41,8 @@
$OpenBSD: patch-glib_gnulib_g-gnulib_h,v 1.2 2004/12/07 06:16:21 marcm Exp $
--- glib/gnulib/g-gnulib.h.orig Sat Oct 23 18:16:24 2004
+++ glib/gnulib/g-gnulib.h Thu Dec 2 23:50:53 2004
@@ -44,6 +44,8 @@
#define HAVE_SNPRINTF 0
#endif

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-gmodule_gmodule-dl_c,v 1.1 2004/12/07 06:16:21 marcm Exp $
--- gmodule/gmodule-dl.c.orig Thu Dec 2 20:46:34 2004
+++ gmodule/gmodule-dl.c Thu Dec 2 20:47:44 2004
@@ -106,6 +106,7 @@ _g_module_open (const gchar *file_name,
static gpointer
_g_module_self (void)
{
+#ifndef __OpenBSD__
gpointer handle;
/* to query symbols from the program itself, special link options
@@ -117,6 +118,9 @@ _g_module_self (void)
g_module_set_error (fetch_dlerror (TRUE));
return handle;
+#else
+ return RTLD_DEFAULT;
+#endif
}
static void

View File

@ -1,18 +0,0 @@
$OpenBSD: patch-gmodule_gmodule-dyld_c,v 1.1 2004/08/08 17:12:55 marcm Exp $
--- gmodule/gmodule-dyld.c.orig Thu Feb 19 17:41:00 2004
+++ gmodule/gmodule-dyld.c Sun Aug 1 22:38:37 2004
@@ -119,7 +119,13 @@ _g_module_symbol (gpointer handle,
if (NSIsSymbolNameDefined (symbol_name))
sym = NSLookupAndBindSymbol (symbol_name);
else
- sym = NULL;
+ {
+ GModule *mod;
+ for (mod = modules, sym = NULL; mod && !sym; mod = mod->next)
+ {
+ sym = NSLookupSymbolInModule (mod->handle, symbol_name);
+ }
+ }
}
else
sym = NSLookupSymbolInModule (handle, symbol_name);

View File

@ -1,66 +0,0 @@
$OpenBSD: patch-gmodule_gmodule_c,v 1.1 2004/08/08 17:12:55 marcm Exp $
--- gmodule/gmodule.c.orig Sat Feb 21 17:31:24 2004
+++ gmodule/gmodule.c Sun Aug 1 22:38:29 2004
@@ -521,6 +521,24 @@ g_module_error (void)
return g_static_private_get (&module_error_private);
}
+static void
+g_module_symbol_aux (GModule *module,
+ const gchar *symbol_name,
+ gpointer *symbol)
+{
+#ifdef G_MODULE_NEED_USCORE
+ {
+ gchar *name;
+
+ name = g_strconcat ("_", symbol_name, NULL);
+ *symbol = _g_module_symbol (module->handle, name);
+ g_free (name);
+ }
+#else /* !G_MODULE_NEED_USCORE */
+ *symbol = _g_module_symbol (module->handle, symbol_name);
+#endif /* !G_MODULE_NEED_USCORE */
+}
+
gboolean
g_module_symbol (GModule *module,
const gchar *symbol_name,
@@ -538,17 +556,28 @@ g_module_symbol (GModule *module,
g_static_rec_mutex_lock (&g_module_global_lock);
-#ifdef G_MODULE_NEED_USCORE
+#ifdef G_MODULE_BROKEN_DLOPEN_NULL
+ if (module == main_module)
{
- gchar *name;
-
- name = g_strconcat ("_", symbol_name, NULL);
- *symbol = _g_module_symbol (module->handle, name);
- g_free (name);
+ g_module_symbol_aux(module, symbol_name, symbol);
+ if (*symbol == NULL)
+ {
+ for (module = modules; module; module = module->next)
+ {
+ g_module_symbol_aux(module, symbol_name, symbol);
+ if (*symbol != NULL)
+ {
+ g_module_set_error (NULL);
+ break;
}
-#else /* !G_MODULE_NEED_USCORE */
- *symbol = _g_module_symbol (module->handle, symbol_name);
-#endif /* !G_MODULE_NEED_USCORE */
+ }
+ }
+ }
+ else
+ g_module_symbol_aux(module, symbol_name, symbol);
+#else /* !G_MODULE_BROKEN_DLOPEN_NULL */
+ g_module_symbol_aux(module, symbol_name, symbol);
+#endif /* G_MODULE_BROKEN_DLOPEN_NULL */
module_error = g_module_error ();
if (module_error)

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-gmodule_gmoduleconf_h_in,v 1.1 2004/08/08 17:12:55 marcm Exp $
--- gmodule/gmoduleconf.h.in.orig Sat Feb 21 17:31:24 2004
+++ gmodule/gmoduleconf.h.in Sun Aug 1 22:39:29 2004
@@ -45,6 +45,9 @@ extern "C" {
#if (@G_MODULE_BROKEN_RTLD_GLOBAL@)
#define G_MODULE_BROKEN_RTLD_GLOBAL
#endif
+#if (@G_MODULE_BROKEN_DLOPEN_NULL@)
+#define G_MODULE_BROKEN_DLOPEN_NULL
+#endif
#ifdef __cplusplus
}

View File

@ -1,5 +1,5 @@
@comment $OpenBSD: PFRAG.shared,v 1.9 2004/10/26 03:49:03 marcm Exp $
@lib lib/libglib-2.0.so.400.7
@lib lib/libgmodule-2.0.so.400.7
@lib lib/libgobject-2.0.so.400.7
@lib lib/libgthread-2.0.so.400.7
@comment $OpenBSD: PFRAG.shared,v 1.10 2004/12/07 06:16:21 marcm Exp $
@lib lib/libglib-2.0.so.400.8
@lib lib/libgmodule-2.0.so.400.8
@lib lib/libgobject-2.0.so.400.8
@lib lib/libgthread-2.0.so.400.8