[Gnucash-changes] r13583 - gnucash/trunk - Gnucash replaced dlopen/dlsym by the g_module functions,

Christian Stimming cstim at cvs.gnucash.org
Fri Mar 10 06:04:03 EST 2006


Author: cstim
Date: 2006-03-10 06:04:02 -0500 (Fri, 10 Mar 2006)
New Revision: 13583
Trac: http://svn.gnucash.org/trac/changeset/13583

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/configure.in
   gnucash/trunk/src/gnome-utils/dialog-utils.c
Log:
Gnucash replaced dlopen/dlsym by the g_module functions, 
so don't error out if they are unavailable; dlsym is needed 
only optionally for BSD linkers. Also removes quotation 
error in AC_MSG_ERROR macro.



Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-03-10 10:58:57 UTC (rev 13582)
+++ gnucash/trunk/ChangeLog	2006-03-10 11:04:02 UTC (rev 13583)
@@ -1,5 +1,10 @@
 2006-03-10  Christian Stimming <stimming at tuhh.de>
 
+	* configure.in, src/gnome-utils/dialog-utils.c: Gnucash replaced
+	dlopen/dlsym by the g_module functions, so don't error out if they
+	are unavailable; dlsym is needed only optionally for BSD
+	linkers. Also removes quotation error in AC_MSG_ERROR macro.
+
 	* src/gnome-utils/gnc-druid-provider-multifile-gnome.h,
 	gnc-druid-provider-file-gnome.c: If <glob.h> unavailable, provide
 	own typedef and disable globbing.

Modified: gnucash/trunk/configure.in
===================================================================
--- gnucash/trunk/configure.in	2006-03-10 10:58:57 UTC (rev 13582)
+++ gnucash/trunk/configure.in	2006-03-10 11:04:02 UTC (rev 13583)
@@ -176,13 +176,13 @@
 
 AC_CHECK_HEADERS(dlfcn.h dl.h utmp.h locale.h mcheck.h unistd.h wctype.h)
 
+# Gnucash replaced dlopen/dlsym by the g_module functions; dlsym
+# is needed optionally in one place for BSD linkers, though.
 DL_LIB=
-AC_CHECK_FUNCS(dlopen,,[
-  AC_CHECK_LIB(dl, dlopen, DL_LIB="-ldl",[
+AC_CHECK_FUNCS(dlsym,,[
+  AC_CHECK_LIB(dl, dlsym, DL_LIB="-ldl",[
     AC_CHECK_LIB(dld, shl_load, DL_LIB="-ldld",[
-      AC_CHECK_FUNCS(dlopen, DL_LIB="",
-      AC_MSG_ERROR(Dynamic linking is not available on this platform.  Some apps,
-like panel, will not run properly.))
+      AC_CHECK_FUNCS(dlsym, DL_LIB="")
     ])
   ])
 ])

Modified: gnucash/trunk/src/gnome-utils/dialog-utils.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-utils.c	2006-03-10 10:58:57 UTC (rev 13582)
+++ gnucash/trunk/src/gnome-utils/dialog-utils.c	2006-03-10 11:04:02 UTC (rev 13583)
@@ -33,7 +33,9 @@
 #include <glib/gi18n.h>
 #include <glade/glade.h>
 #include <gmodule.h>
-#include <dlfcn.h>
+#ifdef HAVE_DLFCN_H
+# include <dlfcn.h>
+#endif
 
 #include "dialog-utils.h"
 #include "gnc-commodity.h"
@@ -869,8 +871,12 @@
   }
 
   if (!g_module_symbol(allsymbols, handler_name, (gpointer *)p_func)) {
+#ifdef HAVE_DLSYM
     /* Fallback to dlsym -- necessary for *BSD linkers */
     func = dlsym(RTLD_DEFAULT, handler_name);
+#else
+    func = NULL;
+#endif
     if (func == NULL) {
       g_warning("ggaff: could not find signal handler '%s'.", handler_name);
       return;



More information about the gnucash-changes mailing list