Fixes <http://bugs.gnu.org/18988>.
Reported by Chris Vine <chris@cvine.freeserve.co.uk>.
* libguile/filesys.c (scm_select): Clarify handling of signal
interruptions.
* doc/ref/posix.texi (Ports and File Descriptors): Adjust accordingly.
Fixes <http://bugs.gnu.org/19027>.
* libguile/bytevectors.c (scm_bytevector_fill_x): Accept fill arguments
between -128 and 255.
* test-suite/tests/bytevectors.test ("2.2 General Operations"): Add
tests.
* libguile/bytevectors.c (ULONG_MAX): Remove (unportable) fallback
definition. It is no longer used.
(scm_make_bytevector): Use 'size_t' instead of 'unsigned' for
indices. Use 'scm_t_uint8' instead of 'signed char' for elements
and c_fill. Previously relied on GNU-C-specific behavior when
casting integers in the range 128-255 to signed char.
(GENERIC_INTEGER_ACCESSOR_PROLOGUE, INTEGER_LIST_TO_BYTEVECTOR)
(scm_bytevector_eq_p, scm_bytevector_copy_x, scm_bytevector_copy)
(scm_bytevector_to_u8_list, scm_u8_list_to_bytevector)
(scm_bytevector_fill_x): Use 'size_t' instead of 'unsigned' for
indices. Use 'scm_t_uint8' for elements.
Fixes <http://bugs.gnu.org/18065>.
Reported and fixed by Glenn Michaels <gmichaels@Safe-mail.net>.
* libguile/error.c (scm_strerror): Convert the argument to a C integer
outside of the critical section, to avoid deadlock on error.
* THANKS: Add Glenn Michaels to the fixes section.
* module/texinfo.scm (texi-command-specs): The body of @url{} can have
texinfo commands.
* test-suite/tests/texinfo.test ("test-texinfo->stexinfo"): Add tests.
* module/web/uri.scm (validate-uri): Add reference? keyword argument,
for validating references.
(build-uri): Clarify comments to indicate that the result is an
absolute URI.
(build-uri-reference): New interface, to build URI-references.
(string->uri-reference): Rename from string->uri*. Fix fragment
parsing to not include the #.
(string->uri): Adapt to string->uri-reference name change.
* module/web/request.scm (request-absolute-uri): Add default-scheme
optional argument. Use it if the request-uri has no scheme, or
error.
* module/web/http.scm (write-uri): Reflow to use "when". Fix writing of
URI-reference instances.
(declare-uri-reference-header!): Rename from
declare-relative-uri-header!. Use string->uri-reference.
("Location"): Declare as a URI-reference header, as per RFC 7231.
* module/web/client.scm (open-socket-for-uri): Handle the case in which
there is no URI scheme.
* test-suite/tests/web-http.test:
* test-suite/tests/web-uri.test: Add tests.
* libguile/load.c (stringbuf_free): Remove.
(stringbuf_grow): Use 'scm_gc_malloc_pointerless' instead of 'scm_realloc'.
(search_path): Use stack-allocated INITIAL_BUFFER instead of
'scm_malloc'. Remove use of 'stringbuf_free'.
* libguile/load.c (scm_c_string_has_an_ext): Rename to...
(string_has_an_ext): ... this. Add docstring. Change
'str' to be an SCM, and remove 'len' parameter. Change loop body to
use 'scm_string_suffix_p'.
(search_path): Update accordingly.
Suggested by David Kastrup <dak@gnu.org> in <http://bugs.gnu.org/13644>.
* libguile/read.c (scm_read_string_like_syntax): Accept "\(" as
equivalent to "(".
* doc/ref/api-data.texi (String Syntax): Document it.
* test-suite/tests/reader.test ("reading"): Add test.
Fixes <http://bugs.gnu.org/17869>.
Reported and fixed by Alexei Matveev <alexei.matveev@gmail.com>.
* doc/ref/api-modules.texi (Accessing Modules from C): Change documented
return type of 'scm_c_export' to 'void' to reflect reality.
* THANKS: Add Alexei Matveev to the fixes section.
Fixes <http://bugs.gnu.org/17634>.
Reported by Josep Portella Florit <jpf@primfilat.com>.
* module/language/tree-il/peval.scm (inlined-application): When inlining
an application whose operator is a lambda expression with optional
arguments that rely on default initializers, expand into a series of
nested let expressions, to ensure that previous arguments are in scope
when the default initializers are evaluated.
* test-suite/tests/peval.test ("partial evaluation"): Add tests.
Fixes <http://bugs.gnu.org/18495>.
* libguile/smob.h (SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_0_LOC)
(SCM_SMOB_OBJECT_1_LOC, SCM_SMOB_OBJECT_2_LOC)
(SCM_SMOB_OBJECT_3_LOC): These elementary API macros have been broken
by commit 56164dc47f in 2009.
Signed-off-by: David Kastrup <dak@gnu.org>
Subset of a patch by Andreas Schwab <schwab@linux-m68k.org>.
Reported by Rob Browning <rlb@defaultvalue.org>.
* libguile/vm-engine.h (IP_REG)[__mc68000__]: Use register "a3".
Reported by Rob Browning <rlb@defaultvalue.org>.
* libguile/vm-engine.h (IP_REG)[__arm__]: Remove explicit register
choice ("r7") for FP_REG, which was reported to cause compilation
failures on ARM.
Reported by Rob Browning <rlb@defaultvalue.org>.
* libguile/vm-i-scheme.c (ASM_MUL)[ARM]: Add earlyclobber (&) constraint
to the SMULL output registers.
Reported by Eli Zaretskii <eliz@gnu.org>.
* test-suite/standalone/Makefile.am (test_scm_take_locale_symbol_LDADD):
Add libgnu.la, for the 'strdup' replacement.
Fixes <http://bugs.gnu.org/18299>.
Reported by Frank Terbeck <ft@bewatermyfriend.org>.
* module/language/tree-il/analyze.scm (format-string-argument-count):
Add case for ~p.
* test-suite/tests/tree-il.test ("warnings")["format"]("~p", "~p, too
few arguments", "~:p", "~:@p, too many arguments", "~:@p, too few
arguments"): New tests.
* module/language/cps/types.scm (&all-types): Represent true and false
as separate bits, so that #f can be removed from types on true
branches. Adapt all users.
* module/language/cps/type-fold.scm (&scalar-types):
(fold-and-reduce): Adapt to boolean type representation change.
Based on a patch by Eli Zaretskii <eliz@gnu.org>.
* libguile/i18n.c (copy_string_or_null): New static function.
(scm_nl_langinfo): Use 'copy_string_or_null' to copy the result from
'nl_langinfo' and 'nl_langinfo_l' before the next call and before
releasing the locale mutex.
* test-suite/tests/coding.test (with-temp-file): Instead of
hard-coding "/tmp" as the temporary directory, use $TMPDIR or
$TEMP from the environment, and fall back on "/tmp" if none of
those 2 is defined.
* doc/ref/api-utility.texi (Object Properties)[make-object-property]:
Clarify that object-properties cannot be reliably applied to numbers.
Signed-off-by: David Kastrup <dak@gnu.org>