* 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 (<dynamic-object>): Hackily export
<foreign-library> 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.
* libguile/gen-scmconfig.c (main) [HAVE_PTHREAD_SIGMASK]: new output
define SCM_HAVE_PTHREAD_SIGMASK
* libguile/null-threads.h (scm_i_pthread_sigmask) [SCM_HAVE_PTHREAD_SIGMASK]:
make inline function conditional on existence of pthread_sigmask
On Windows, deleting a file on an open port does not succeed
* test-suite/tests/ports.test ("%default-port-encoding, wrong encoding"):
ensure port is closed before deleting
* configure.ac (AC_CHECK_FUNCS): add mkdtemp! test
* doc/ref/posix.texi: document mkdtemp!
* libguile/filesys.c (scm_mkdtemp_x): new function
* libguile/filesys.h: new declaration for scm_mkdtemp_x
* test-suite/tests/filesys.test: add tests for mkdtemp!
Adapted from a patch by Rob Browning.
The underlying function was moved to filesys.c in
073167ef7b but the declaration didn't follow
* libguile/filesys.h: add declaration for scm_mkstemp
* libguile/posix.h: remove declaration for scm_mkstemp
* libguile/r6rs-ports.c (scm_i_make_transcoded_ports): make sure to
include SCM_RDNG for input/output ports.
Thanks to Göran Weinholt for reporting the problem.
Closes: 41045
* module/scheme/base.scm (member): Match the r7rs requirement, as assoc
already does.
Thanks to Erik Dominikus for reporting the problem.
Closes: 43304
The line, part of the sentence above it in a comment, was accidentally
removed in commit b8d757732f "Rationalize
include order in C files".
* libguile/guile.c: restore missing line.
[rlb@defaultvalue.org: augment commit message; add THANKS]
Closes: 42331
* libguile/srfi-13.c (scm_reverse_list_to_string): Replace string->list
with list->string in the composition explaning how it works. Thanks
to Andrey Ivanov for reporting the problem.
Closes: 34457
* module/rnrs/io/ports.scm (call-with-port): Remove local definition.
* module/system/repl/server.scm (system): Call-with-port is imported
via (ice-9 ports).
* module/ice-9/binary-ports.scm (call-with-input-bytevector):
(call-with-output-bytevector): New functions.
* module/ice-9/iconv.scm: Remove superfluous copies of
call-with-output-string* and call-with-output-bytevector*, now that
the former closes the port and the latter exists.
(call-with-encoded-output-string): Adapt.
* module/web/uri.scm: Use (ice-9 iconv) instead of local
bytevector/string conversion procedures.
* module/ice-9/ports.scm (call-with-port): New procedure, from r7rs.
(call-with-input-file, call-with-output-file): Refactor to use
call-with-port.
(call-with-output-string): Close the string after normal exit.
* module/scheme/base.scm (scheme): Re-export call-with-port from base.
* lightening/x86.c (jit_try_shorten): If the address is within the
last instruction, don't shorten. If the intstruction is a jump, we
could elide it entirely in some cases, but we don't know if the user
captured the PC before calling jit_patch_here. Better to leave this
to the user.
Thanks to Helmut Eller for the bug report and test case in
https://gitlab.com/wingo/lightening/-/issues/17.
* module/ice-9/boot-9.scm (%auto-compilation-options): Add
use-before-definition and non-idempotent-definition.
* module/language/tree-il/analyze.scm (<use-before-def-info>): New
analysis info.
(make-use-before-definition-analysis): New function.
(goops-toplevel-definition): Move down.
(unbound-variable-analysis, macro-use-before-definition): Remove, as
they are subsumed by use-before-def. There are some deprecated
bindings though.
(make-analyzer): Rework to allow for use-before-def analysis to handle
multiple
* module/system/base/message.scm (%warning-types): Add handlers for the
new warning types.
* test-suite/tests/tree-il.test: Add tests.
* doc/ref/api-evaluation.texi (Compilation): Update.
* libguile/gc.c (DEFAULT_INITIAL_HEAP_SIZE): Bump a bit farther (2 MB on
64-bit, 1 MB on 32-bit) as we now expand to this size instead of
expanding by this amount.
(scm_storage_prehistory): Expand to the initial heap size instead of
expanding by the size.