* libguile/win32-socket.h:
* libguile/win32-socket.c (getservent, endservent, setservent)
(getprotoent, endprotoent, setprotoent): Remove mingw32 wrappers.
Their place is in gnulib, if anywhere.
Fixes <http://bugs.gnu.org/11887>.
* libguile/numbers.c (mem2ureal): New argument 'allow_inf_or_nan'.
Accept infinities and NaNs only if 'allow_inf_or_nan' is true and "#e"
is not present. Check for "inf.0" or "nan." case-insensitively. Do
not accept rationals with zero divisors.
(mem2complex): Pass new 'allow_inf_or_nan' argument to 'mem2ureal',
which is set if and only if a explicit sign was present.
* test-suite/tests/numbers.test ("string->number"): Add tests.
* libguile/vm.c (initialize_default_stack_size): New helper.
(scm_bootstrap_vm): Call initialize_default_stack_size.
* doc/ref/guile-invoke.texi (Environment Variables): Add docs.
Based on a patch by Stefan Israelsson Tampe.
* module/language/tree-il/compile-glil.scm (flatten-lambda-case):
Support calls and tail-calls with more than 255 formals.
* test-suite/tests/tree-il.test ("many args"): Add a test.
* libguile/struct.h (SCM_VTABLE_FLAG_SIMPLE, SCM_VTABLE_FLAG_SIMPLE_RW):
* libguile/struct.c (set_vtable_layout_flags): Vtable whose layouts
include a tail array are not simple. Fixes bug 12808.
Reported by Jan Schukat <shookie@email.de>.
Partly fixes <http://bugs.gnu.org/13848>.
* libguile/__scm.h (SCM_LONG_BIT)[!defined LONG_BIT]: Use
SCM_SIZEOF_LONG since `sizeof' cannot be used in #if directives as
found in numbers.c.
* libguile/debug.c (scm_local_eval):
libguile/ports.c (scm_current_warning_port):
libguile/strports.c (scm_eval_string_in_module): Perform
lazy-initialization while holding a mutex. Use SCM_UNDEFINED as the
uninitialized value. Use 'scm_c_*_variable'.
* doc/ref/api-modules.texi (Accessing Modules from C): Fix
'my_eval_string' example to be thread-safe.
* doc/ref/api-debug.texi:
* doc/ref/api-evaluation.texi:
* doc/ref/api-modules.texi:
* doc/ref/compiler.texi:
* doc/ref/web.texi: Make Texinfo function headers more consistent.
Change lesser used keyword notation to the predominant form.
* doc/ref/api-procedures.texi: Fix an argument name in a header that should
use repeated argument notation.
* doc/ref/srfi-modules.texi: Update references in Texinfo function
definition body to match previously updated variable notation in
definition header.
* doc/ref/api-control.texi (Handling Errors): Move misplaced description
for `scm_memory_error' & co.
* doc/ref/r6rs.texi (rnrs base): Change `deffnx' of `let-syntax' and
`letrec-syntax' to fit on one line.
Fixes <http://bugs.gnu.org/13611>.
Reported by Mike Gran <spk121@yahoo.com>.
* libguile/smob.c (current_mark_stack_pointer,
current_mark_stack_limit): New variables.
(smob_mark): Use CURRENT_MARK_STACK_POINTER and
CURRENT_MARK_STACK_LIMIT instead of the same-named fields of
`SCM_I_CURRENT_THREAD'.
(scm_gc_mark): Likewise.
(scm_smob_prehistory): Initialize CURRENT_MARK_STACK_LIMIT and
CURRENT_MARK_STACK_POINTER.
* libguile/threads.h (scm_i_thread): Add comment that
`current_mark_stack_ptr' and `current_mark_stack_limit' are no longer
used.
* configure.ac: Check for `GC_set_all_interior_pointers',
`GC_get_gc_no', and `GC_set_java_finalization'.
* libguile/gc.c (scm_gc_stats)[HAVE_GC_GET_GC_NO]: Use `GC_get_gc_no'.
(scm_storage_prehistory)[HAVE_GC_SET_ALL_INTERIOR_POINTERS]: Use
`GC_set_all_interior_pointers'.
* libguile/guardians.c (scm_init_guardians)[HAVE_GC_SET_JAVA_FINALIZATION]:
Use `GC_set_java_finalization'.
* test-suite/tests/00-socket.test:
* test-suite/tests/alist.test:
* test-suite/tests/elisp.test:
* test-suite/tests/encoding-iso88591.test:
* test-suite/tests/encoding-iso88597.test:
* test-suite/tests/encoding-utf8.test:
* test-suite/tests/hash.test:
* test-suite/tests/i18n.test:
* test-suite/tests/modules.test:
* test-suite/tests/ports.test:
* test-suite/tests/srfi-35.test: Make tests use eqv? instead of eq? when
comparing numbers, characters. Checked also for similar uses of
assq[-ref].
* test-suite/tests/vlist.test ("vhash-delete honors HASH"): Change test
to use eqv-ness, not eq-ness, which should not impact its purpose as
these two are equivalent for strings.
Based on a patch by David Kastrup <dak@gnu.org>.
Fixes <http://bugs.gnu.org/13843>.
* libguile/fluids.c (scm_i_make_with_fluids): Reverse direction of inner
loop that checks for duplicates, to properly handle more than two
bindings to the same fluid.
Based on a patch by David Kastrup <dak@gnu.org>.
Fixes <http://bugs.gnu.org/13838>.
* libguile/fluids.c (scm_i_make_with_fluids): Remove the duplicate
binding instead of the last binding.
* test-suite/tests/fluids.test: Add test, and fix existing duplicate
tests.
* THANKS: Thanks David Kastrup.
* libguile/foreign.c (OBJCODE_HEADER, META_HEADER, META): Change these
into higher-order macros.
(GEN_CODE): New higher-order macro based on 'CODE'.
(M_STATIC, M_DYNAMIC): New macros.
(CODE): Reimplement using 'GEN_CODE' and 'M_STATIC'.
(make_objcode_trampoline): New static function.
(large_objcode_trampolines, large_objcode_trampolines_mutex): New
static variables.
(get_objcode_trampoline): New static function.
(cif_to_procedure): Use 'get_objcode_trampoline'.
* test-suite/standalone/test-ffi-lib.c (test_ffi_sum_many):
New function.
* test-suite/standalone/test-ffi: Add test.
* module/system/base/target.scm (triplet-pointer-size): Fix typo in the
x32 triplet name.
* test-suite/tests/asm-to-bytecode.test (native-os): New procedure.
(test-target): Use (native-word-size) only when both the CPU and OS
match.
* module/system/base/target.scm (triplet-pointer-size): Add case for
"^x64_64-.*-gnux32".
* test-suite/tests/asm-to-bytecode.test ("cross-compilation"):
["x86_64-unknown-linux-gnux32"]: New test.
* module/system/base/target.scm (cpu-word-size): Rename to...
(triplet-pointer-size): ... this. Update caller. Take a triplet as
the argument. Check the `triplet-os' part when checking for equality
with the host. Add support "mips64.*-gnuabi64".
* test-suite/tests/asm-to-bytecode.test ("cross-compilation")
[ "mips64el-unknown-linux-gnuabi64"]: New test.
* module/system/base/target.scm (cpu-word-size): Consider MIPS64 to
default to n32 or o32.
* test-suite/tests/asm-to-bytecode.test ("cross-compilation")
["mips64el-unknown-linux-gnu"]: New test.
* libguile/random.c (random_state_of_last_resort): Simplify optional
inclusion of PID in the random state. Clarify in the comments that
the PID is only included where scm_getpid is present.
* doc/ref/api-data.texi (Random): Clarify that
'random-state-from-platform' includes the PID in the random state only
if scm_getpid is present.
* module/language/glil/decompile-assembly.scm: Remove. This module
never worked, and even failed to compile.
* module/language/glil/spec.scm:
* module/Makefile.am: Remove references to (language glil
decompile-assembly).
* module/ice-9/mapping.scm (mapping-create-handle!): INIT is required.
(mapping-ref): Rewrite. Fix problem with DFLT.
(hash-table-mapping-hooks): Drop DELETE-PROC, hash-table accessors
only use ASSOC-PROC. Add INIT to create-handle hook. Use correct
hash-table accessors.
(make-hash-table-mapping): Drop DELETE-PROC.
(hash-table-mapping): Rewrite. Drop DELETE-PROC.
* libguile/filesys.c (is_file_name_separator): New helper, as in
load.c.
(scm_dirname, scm_basename, scm_i_relativize_path): Use
is_file_name_separator.
* libguile/load.c (is_file_name_separator, is_drive_letter):
(is_absolute_file_name): New helpers, like the ones in boot-9.
Perhaps we should just define them in C.
(search_path, scm_try_auto_compile, canonical_suffix): Rewrite using
the new helpers.
* module/ice-9/boot-9.scm (absolute-file-name?) [WINDOWS]: Allow '/' as
well as '\' when detecting UNC names.
(load-in-vicinity): Add a comment about the purpose of
canonical->suffix.