From 2e26538d6a51bdd6c2e68ad4539ab3750ef8670a Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 22 Jan 2021 16:39:11 +0100 Subject: Replace libltdl with raw dlopen, dlsym * NEWS: Update. * am/bootstrap.am (SOURCES): * module/Makefile.am (SOURCES): Add system/foreign-library.scm. * configure.ac: Replace ltdl check with -ldl check. * libguile/dynl.c: Rewrite to just expose core dlopen / dlsym / etc to a helper Scheme module. (scm_dynamic_link, scm_dynamic_pointer, scm_dynamic_function) (scm_dynamic_object_p, scm_dynamic_call): Rewrite in terms of (system foreign-library). * libguile/extensions.c (load_extension): Avoid scm_dynamic_call. * module/system/foreign-library.scm: New file. * module/oop/goops.scm (): Hackily export instead of a class here. * doc/ref/api-foreign.texi (Foreign Function Interface): Rewrite to only document the new interfaces. Eventually we will deprecate dynamic-link and friends. * doc/ref/guile.texi (API Reference): Move Foreign Objects after Foreign Function Interface. Seems there should be some closer relationship but this will do for now. * doc/ref/tour.texi (Putting Extensions into Modules): * doc/ref/libguile-parallel.texi (Parallel Installations): Update for rename of Modules and Extensions to Foreign Extensions. * libguile/deprecated.h: * libguile/deprecated.c (scm_dynamic_unlink): Deprecate. * libguile/guile.c: Remove ltdl include. * test-suite/tests/foreign.test: Update tests to use new API, and update error expectations. --- am/bootstrap.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'am') diff --git a/am/bootstrap.am b/am/bootstrap.am index 2821304ec..acc00c762 100644 --- a/am/bootstrap.am +++ b/am/bootstrap.am @@ -1,4 +1,4 @@ -## Copyright (C) 2009-2020 Free Software Foundation, Inc. +## Copyright (C) 2009-2021 Free Software Foundation, Inc. ## ## This file is part of GNU Guile. ## @@ -120,6 +120,7 @@ SOURCES = \ system/vm/program.scm \ system/vm/vm.scm \ system/foreign.scm \ + system/foreign-library.scm \ \ language/tree-il/compile-cps.scm \ language/tree-il/cps-primitives.scm \ -- cgit v1.2.1