1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 22:31:12 +02:00

* Makefile.am (INCLUDES): Include from ../libguile-ltdl/ instead

of from $(INCLTDL).
(libguile_la_LIBADD): Use ../libguile-ltdl/libguile-ltdl.la
instead of $(LIBLTDL).

* guile.c: Include "guile-ltdl.h" instead of "libltdl/ltdl.h".
(main): switch to scm_lt_dlset_preloaded_symbols;

* dynl.c: Include "guile-ltdl.h" instead of "libltdl/ltdl.h".
(sysdep_dynl_link): switch to scm_lt_dlhandle, scm_lt_dlopenext,
and scm_lt_dlerror.
(sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
and scm_lt_dlerror.
(sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym, and
scm_lt_dlerror.
(sysdep_dynl_init): switch to scm_lt_dlinit();
This commit is contained in:
Marius Vollmer 2002-10-25 16:26:07 +00:00
parent a05b4f6e02
commit abeff04457
3 changed files with 16 additions and 13 deletions

View file

@ -26,7 +26,7 @@ DEFS = @DEFS@
## Check for headers in $(srcdir)/.., so that #include
## <libguile/MUMBLE.h> will find MUMBLE.h in this dir when we're
## building.
INCLUDES = -I.. -I$(srcdir)/.. ${INCLTDL}
INCLUDES = -I.. -I$(srcdir)/.. -I$(top_srcdir)/libguile-ltdl
ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/' \
--regex='/[ \t]*SCM_[G]?DEFINE1?[ \t]*(\([^,]*\),[^,]*/\1/'
@ -112,7 +112,7 @@ noinst_HEADERS = coop-threads.c coop-threads.h coop.c \
num2integral.i.c num2float.i.c
libguile_la_DEPENDENCIES = @LIBLOBJS@
libguile_la_LIBADD = @LIBLOBJS@ $(LIBLTDL) $(THREAD_LIBS_LOCAL)
libguile_la_LIBADD = @LIBLOBJS@ ../libguile-ltdl/libguile-ltdl.la $(THREAD_LIBS_LOCAL)
libguile_la_LDFLAGS = -version-info @LIBGUILE_INTERFACE_CURRENT@:@LIBGUILE_INTERFACE_REVISION@:@LIBGUILE_INTERFACE_AGE@ -export-dynamic -no-undefined
# These are headers visible as <guile/mumble.h>

View file

@ -237,13 +237,13 @@ SCM_DEFINE (scm_clear_registered_modules, "c-clear-registered-modules", 0, 0, 0,
#ifdef DYNAMIC_LINKING
#include "libltdl/ltdl.h"
#include "guile-ltdl.h"
static void *
sysdep_dynl_link (const char *fname, const char *subr)
{
lt_dlhandle handle;
handle = lt_dlopenext (fname);
scm_lt_dlhandle handle;
handle = scm_lt_dlopenext (fname);
if (NULL == handle)
{
SCM fn;
@ -251,7 +251,7 @@ sysdep_dynl_link (const char *fname, const char *subr)
SCM_ALLOW_INTS;
fn = scm_makfrom0str (fname);
msg = scm_makfrom0str (lt_dlerror ());
msg = scm_makfrom0str (scm_lt_dlerror ());
scm_misc_error (subr, "file: ~S, message: ~S", scm_list_2 (fn, msg));
}
return (void *) handle;
@ -260,10 +260,10 @@ sysdep_dynl_link (const char *fname, const char *subr)
static void
sysdep_dynl_unlink (void *handle, const char *subr)
{
if (lt_dlclose ((lt_dlhandle) handle))
if (scm_lt_dlclose ((scm_lt_dlhandle) handle))
{
SCM_ALLOW_INTS;
scm_misc_error (subr, (char *) lt_dlerror (), SCM_EOL);
scm_misc_error (subr, (char *) scm_lt_dlerror (), SCM_EOL);
}
}
@ -272,11 +272,11 @@ sysdep_dynl_func (const char *symb, void *handle, const char *subr)
{
void *fptr;
fptr = lt_dlsym ((lt_dlhandle) handle, symb);
fptr = scm_lt_dlsym ((scm_lt_dlhandle) handle, symb);
if (!fptr)
{
SCM_ALLOW_INTS;
scm_misc_error (subr, (char *) lt_dlerror (), SCM_EOL);
scm_misc_error (subr, (char *) scm_lt_dlerror (), SCM_EOL);
}
return fptr;
}
@ -284,7 +284,7 @@ sysdep_dynl_func (const char *symb, void *handle, const char *subr)
static void
sysdep_dynl_init ()
{
lt_dlinit ();
scm_lt_dlinit ();
}
#else

View file

@ -51,8 +51,9 @@
#ifdef HAVE_CONFIG_H
#include <libguile/scmconfig.h>
#endif
#ifdef DYNAMIC_LINKING
#include <libltdl/ltdl.h>
#include "guile-ltdl.h"
#endif
#ifdef HAVE_WINSOCK2_H
@ -86,7 +87,9 @@ int
main (int argc, char **argv)
{
#ifdef DYNAMIC_LINKING
LTDL_SET_PRELOADED_SYMBOLS ();
/* libtool automagically inserts this variable into your executable... */
extern const scm_lt_dlsymlist lt_preloaded_symbols[];
scm_lt_dlpreload_default (lt_preloaded_symbols);
#endif
scm_boot_guile (argc, argv, inner_main, 0);
return 0; /* never reached */