* test-suite/standalone/test-unwind.c (check_ports)[__MINGW32__]: Use
$TEMP, $TMP, or / as the value for TMPDIR.
Patch by Eli Zaretskii <eliz@gnu.org>.
Partly fixes <http://bugs.gnu.org/14042>.
Reported by Marc Girod <marc.girod@gmail.com>
* test-suite/standalone/test-language: Use a shell construct that
/bin/sh on Solaris 10 can understand.
* libguile/keywords.c (scm_keyword_argument_error): New variable.
(scm_c_bind_keyword_arguments): New API function.
* libguile/keywords.h (enum scm_keyword_arguments_flags): New enum.
(scm_t_keyword_arguments_flags): New typedef.
(scm_c_bind_keyword_arguments): New prototype.
* doc/ref/api-data.texi (Coding With Keywords, Keyword Procedures): Add
documentation.
* test-suite/standalone/test-scm-c-bind-keyword-arguments.c: New file.
* test-suite/standalone/Makefile.am: Add
test-scm-c-bind-keyword-arguments test.
* 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.
* libguile/strings.c (scm_to_utf8_stringn): Fix another new bug in this
recent comedy of errors: pass the size of the preallocated buffer to
u32_to_u8. Arrange to call 'scm_i_string_wide_chars' and
'scm_i_string_length' only once each. Rename local variables for
improved code clarity.
* test-suite/standalone/test-conversion.c (test_to_utf8_stringn): New
function to test scm_to_utf8_stringn.
Fixes <http://bugs.gnu.org/10742>.
Reported by Alírio Eyng <alirioeyng@ig.com.br>.
* gnulib-local/lib/localcharset.c.diff (environ_locale_charset): Change
to set CODESET to "" when LOCALE lacks a dot. Return "ISO-8859-1"
when CODESET is the empty string.
* lib/localcharset.c: Update.
* test-suite/standalone/Makefile.am (check_SCRIPTS): Add
`test-command-line-encoding2'.
(TESTS): Likewise.
* test-suite/standalone/test-command-line-encoding2: New file.
* module/ice-9/local-eval.scm: New module (ice-9 local-eval) which
exports `the-environment', `local-eval', and `local-compile'.
* libguile/debug.c (scm_local_eval): New C function that calls the
Scheme implementation of `local-eval' in (ice-9 local-eval).
* libguile/debug.h (scm_local_eval): Add prototype.
* doc/ref/api-evaluation.texi (Local Evaluation): Add documentation.
* test-suite/tests/eval.test (local evaluation): Add tests.
* test-suite/standalone/test-loose-ends.c (test_scm_local_eval):
Add test.
* module/Makefile.am: Add ice-9/local-eval.scm.
Based on a patch by Mark H Weaver <mhw@netris.org>.
Based on a patch by Julian Graham <julian@member.fsf.org>
* libguile/values.c, libguile/values.h (scm_c_value_ref): New function.
* doc/ref/api-control.texi (Multiple Values): Add documentation.
* test-suite/standalone/test-scm-values.c: New test program.
* test-suite/standalone/Makefile.am: Add test-scm-values test.
This is a temporary workaround for the 2.0 stable series. The next
stable series should have an implicit `setlocale (LC_ALL, "")' call,
which will make this unnecessary.
* libguile/feature.c (progargs_fluid): Rename to...
(scm_program_arguments_fluid): ... this. Update users.
* libguile/feature.h (scm_program_arguments_fluid): New internal
declaration.
* libguile/init.c (invoke_main_func): Call
`scm_i_set_boot_program_arguments' instead of
`scm_set_program_arguments'.
* libguile/script.c (locale_arguments_to_string_list,
scm_i_set_boot_program_arguments): New functions.
(scm_compile_shell_switches): Use `locale_arguments_to_string_list'.
* libguile/script.h (scm_i_set_boot_program_arguments): New internal
declaration.
* test-suite/standalone/Makefile.am (check_SCRIPTS, TESTS): Add
`test-command-line-encoding'.
* test-suite/standalone/test-command-line-encoding: New file.
* doc/ref/api-data.texi (Exact and Inexact Numbers): doc for scm_is_exact
and scm_is_inexact
* libguile/numbers.c (scm_is_exact, scm_is_inexact): new functions
* libguile/numbers.h: declarations for scm_is_exact and scm_is_inexact
* test/suite/standalone/test-conversion.c (test_is_exact, test_is_inexact):
new tests
This was a pretty big merge involving a fair amount of porting,
especially to peval and its tests. I did not update psyntax-pp.scm,
that comes in the next commit.
Conflicts:
module/ice-9/boot-9.scm
module/ice-9/psyntax-pp.scm
module/language/ecmascript/compile-tree-il.scm
module/language/tree-il.scm
module/language/tree-il/analyze.scm
module/language/tree-il/inline.scm
test-suite/tests/tree-il.test
* libguile/strings.c (scm_to_latin1_stringn): Fix for substrings.
* test-suite/standalone/Makefile.am:
* test-suite/standalone/test-scm-to-latin1-string.c: Add test case.
Thanks to David Hansen for the bug report and test case, and Stefan
Israelsson Tampe for the fix.
This fixes warnings saying "this decimal constant is unsigned only in
ISO C90".
* test-suite/standalone/test-ffi-lib.c (test_ffi_u32_, test_ffi_u32_u8,
test_ffi_u32_s64, test_ffi_s64_s64, test_ffi_u64_u8,
test_ffi_u64_s64): Mark constants as unsigned.
* test-suite/standalone/Makefile.am (GUILE_AUTO_COMPILE): Add srcdir to
the environment.
* test-suite/standalone/test-import-order: Look for the modules in the
srcdir. Fixes out-of-tree builds.
* module/ice-9/boot-9.scm (define-module): Fix to load the #:use-module
clauses in the order in which they appear in the define-module form.
Thanks to Jan Nieuwenhuizen for the report.
* test-suite/standalone/test-import-order: Add new test that
define-module and use-modules resolve the interface in the right
order.
* test-suite/standalone/Makefile.am:
* test-suite/standalone/test-import-order-a.scm:
* test-suite/standalone/test-import-order-b.scm:
* test-suite/standalone/test-import-order-c.scm:
* test-suite/standalone/test-import-order-d.scm: Aux files.
* test-suite/standalone/test-num2integral.c (test_long_long):
(test_ulong_long): Replace SCM_I_LLONG and SCM_I_ULLONG defines with
their counterparts from limits.h.
* libguile/__scm.h: Remove SCM_I_LLONG and SCM_I_ULLONG limit defines.
* test-suite/standalone/test-num2integral.c (out_of_range_handler): Fix
SCM used as a truth value.
* test-suite/standalone/test-scm-spawn-thread.c (inner_main): Use
SCM2PTR here.
* test-suite/standalone/test-pthread-create.c (inner_main): New
function.
(main): Call it within `scm_with_guile', instead of using
`scm_init_guile'. This improves portability--e.g.,
`GC_get_stack_base', used by `scm_init_guile', failed on Darwin
up to BDW-GC 7.1alpha4 included (thanks, Mark, for the hint.)