Fix to find glade symbols on some *BSD systems.

* src/gnome-utils/dialog-utils.c: When trying to load the symbol
	  from a glade file, Fall back to dlsym() if g_module_symbol()
	  fails.  This is necessary to find the symbols on on certain *BSD
	  systems.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10899 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2005-02-16 22:27:00 +00:00
parent 7ea795e02e
commit 833abd9e0e
2 changed files with 16 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2005-02-16 Derek Atkins <derek@ihtfp.com>
* src/gnome-utils/dialog-utils.c: When trying to load the symbol
from a glade file, Fall back to dlsym() if g_module_symbol()
fails. This is necessary to find the symbols on on certain *BSD
systems.
2005-02-06 Chris Lyttle <chris@wilddev.net>
* src/scm/main.scm: Update for 1.8.11 release

View File

@ -22,11 +22,14 @@
* *
\********************************************************************/
#define _GNU_SOURCE 1 /* necessary to get RTLD_DEFAULT on linux */
#include "config.h"
#include <glade/glade.h>
#include <gnome.h>
#include <gmodule.h>
#include <dlfcn.h>
#include "dialog-utils.h"
#include "global-options.h"
@ -38,7 +41,6 @@
#include "gnc-euro.h"
#include "gnc-ui-util.h"
/* This static indicates the debugging module that this .o belongs to. */
static short module = MOD_GUI;
@ -1012,8 +1014,12 @@ gnc_glade_autoconnect_full_func(const gchar *handler_name,
}
if (!g_module_symbol(allsymbols, handler_name, (gpointer *)p_func)) {
g_warning("could not find signal handler '%s'.", handler_name);
return;
/* Fallback to dlsym -- necessary for *BSD linkers */
func = dlsym(RTLD_DEFAULT, handler_name);
if (func == NULL) {
g_warning("ggaff: could not find signal handler '%s'.", handler_name);
return;
}
}
if (other_object) {