mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
7ea795e02e
commit
833abd9e0e
@ -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
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user