In response to <http://bugs.gnu.org/13958>.
Reported by Lluís Batlle i Rossell <viric@viric.name>.
* doc/ref/posix.texi (Network Databases): Document the missing errno
value for EAI_SYSTEM.
* libguile/net_db.c (scm_getaddrinfo): Likewise.
* configure.ac: Check for <sys/sendfile.h> and `sendfile'.
* libguile/filesys.c (scm_sendfile): New function.
* libguile/filesys.h (scm_sendfile): New declaration.
* test-suite/tests/filesys.test ("sendfile"): New test prefix.
* doc/ref/posix.texi (File System): Document `sendfile'.
* module/ice-9/boot-9.scm (%cond-expand-features): Remove redundant list
of feature identifiers in the comment. Explain more clearly what
belongs in this list. Remove srfi-6.
* module/srfi/srfi-4.scm, module/srfi/srfi-27.scm,
module/srfi/srfi-31.scm, module/srfi/srfi-38.scm,
module/srfi/srfi-39.scm, module/srfi/srfi-42.scm,
module/srfi/srfi-45.scm, module/srfi/srfi-67.scm: Add missing
'cond-expand-provide'.
* module/srfi/srfi-69.scm: Fix erroneous 'cond-expand-provide'.
* doc/ref/srfi-modules.texi (SRFI-0): Update the list of features in
Guile core.
* doc/ref/srfi-modules.texi (About SRFI Usage): Use SRFI-13 as an
example of a module which is included in core Guile, instead of
SRFI-6.
(SRFI-6): Mention the non-conformance of the core 'open-input-string'
and 'open-output-string' procedures. Remove the claim that importing
this module does nothing. Recommend that users import the module.
* module/srfi/srfi-45.scm (eager): Accept any number of arguments.
Store the list of arguments in the value record. Previously, only one
argument was accepted, and that value was stored in the value record.
(delay): Support expressions that return any number of arguments.
(force): Return the list of values stored in the value record.
(promise?): Export.
* doc/ref/srfi-modules.texi (SRFI-45): Update docs. Remove typing
for simplicity in discussing multiple values.
* test-suite/tests/srfi-45.test: Add tests. Add FSF copyright for 2010
and 2013. Add missing year to André van Tonder's copyright notice.
* configure.ac: Remove `doc/ref/effective-version.texi' from the
`AC_CONFIG_FILES'.
* doc/ref/Makefile.am ($(srcdir)/effective-version.texi): New target.
* doc/ref/web.texi: Say `World Wide Web'; the hyphenated form is almost
never used (c.f. w3.org).
General predicate arguments are named `obj'. Fill in arguments
omitted from some procedure definitions (e.g. `request-method').
Minor tweaks, such as using en-dash and missing markup as appropriate.
Wrap very long deffn lines.
* module/web/*.scm: Expand texinfo markup in doc strings. Synchronize
with changes in web.texi.
* libguile/numbers.c (left_shift_exact_integer,
floor_right_shift_exact_integer, round_right_shift_exact_integer): New
static functions.
(scm_round_ash): New procedure.
(scm_ash): Reimplement in terms of 'left_shift_exact_integer' and
'floor_right_shift_exact_integer'.
* libguile/numbers.h: Add prototype for scm_round_ash. Rename the
second argument of 'scm_ash' from 'cnt' to 'count'.
* test-suite/tests/numbers.test (round-ash, ash): Add new unified
testing framework for 'ash' and 'round-ash'. Previously, the tests
for 'ash' were not very comprehensive; for example, they did not
include a single test where the number to be shifted was a bignum.
* doc/ref/api-data.texi (Bitwise Operations): Add documentation for
'round-ash'. Improve documentation for `ash'.
* 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.
* 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.
* 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.
* libguile/hashtab.c (scm_hash_count): New function. Count the number
of elements in a hash table.
* doc/ref/api-compound.texi (Hash Tables): Update examples and
reference.
* test-suite/tests/hash.test (hash-count): New test.
* doc/ref/api-foreign.texi (Foreign Types): Replace references to the
old foreign->bytevector and bytevector->foreign with the new procedure
names using pointer.
* module/sxml/simple.scm (read-internal-doctype-as-string): New helper.
(xml->sxml): Add #:doctype-handler argument.
* doc/ref/sxml.texi (Reading and Writing XML): Document
#:doctype-handler. Fix some other examples, and fix the default value
of #:declare-namespaces?.
* test-suite/tests/sxml.simple.test: Add all tests from the manual
here.
* doc/ref/sxml.texi (SXML): Reorder and begin rewriting. Fix formatting
throughout, provide a new introduction, and the beginning of proper
SSAX documentation.
* doc/ref/sxml-match.texi:
* doc/ref/texinfo.texi:
* doc/ref/web.texi: Update references to new node names.
* module/system/base/language.scm (<language>): Add 'for-humans?'
field, and export new 'language-for-humans?' predicate.
* doc/ref/compiler.texi (Compiler Tower): Document.
* module/language/assembly/spec.scm, module/language/bytecode/spec.scm,
module/language/glil/spec.scm, module/language/objcode/spec.scm,
module/language/tree-il/spec.scm, module/language/value/spec.scm:
Mark these languages as 'for-humans?'.
* module/ice-9/boot-9.scm (current-language): New parameter.
* module/system/base/language.scm (*current-language*): Pull fluid from
parameter.
(current-language): Now a re-exported parameter.
* doc/ref/compiler.texi: Update reference from *current-language* fluid
to current-language parameter.
* module/system/base/compile.scm (compile-and-load):
* module/ice-9/top-repl.scm (top-repl): Default to the current language,
not to Scheme.
* module/ice-9/eval-string.scm:
* module/system/base/language.scm:
* module/system/repl/command.scm:
* module/system/repl/repl.scm: Update to use current-language parameter
and parameterize.
* module/ice-9/boot-9.scm (make-parameter): Add a docstring.
(fluid->parameter): New interface. Use it when turning port fluids
into parameters.
* doc/ref/api-scheduling.texi (Parameters): Deffn instead of defun for
make-parameter documentation. Add docs for fluid->parameter.
* module/ice-9/psyntax.scm (include): Like `load', interpret relative
paths as being relative to the file that does the `include'.
* doc/ref/api-evaluation.texi: Update docs.
* doc/ref/libguile-concepts.texi (Multi-Threading): Use functions in the
example instead of macros. Performance is really not a concern with
this interface, especially now that scm_car and scm_cdr are inline
functions.
* doc/ref/api-smobs.texi (Smobs): Document scm_new_smob and
scm_new_double_smob instead of the SCM_NEWSMOB / SCM_RETURN_NEWSMOB
family of macros.
* doc/ref/libguile-smobs.texi (Creating Smob Instances): Use
scm_new_smob.
* libguile/load.c (scm_primitive_load_path): If the second argument is a
procedure, call it like a thunk.
* doc/ref/api-evaluation.texi (Load Paths): Update docs.
* module/ice-9/boot-9.scm (resolve-interface): Use `unless'.
(try-module-autoload): Use the new primitive-load-path to detect
failure to find an appropriate file. Fixes a bug reported by Diogo
F. S. Ramos. Thanks to Noah Lavine for tracking it down.
* libguile/posix.c (scm_fork): Issue a warning on a multithreaded fork.
* doc/ref/posix.texi (Processes): Add note about multithreaded fork.
* test-suite/tests/00-socket.test: Moved here, from socket.test, so as
to run before any threads are created.
* test-suite/Makefile.am: Adapt.
* libguile/posix.c (scm_fork): Issue a warning instead of an error on a
multithreaded fork.
* doc/ref/posix.texi (Processes): Add note about multithreaded fork.
* module/system/vm/trace.scm (build-prefix): New helper.
(print-application, print-return): Use the helper.
(trace-calls-to-procedure, trace-calls-in-procedure):
(trace-instructions-in-procedure, call-with-trace): Add #:max-indent
argument, defaulting to the terminal width less 40 characters.
* doc/ref/scheme-using.texi: Update `trace' docs.
Based on a patch by Nala Ginrut.
* module/ice-9/peg.scm: rename 'peg-sexp-compile' to
'compile-peg-pattern'
* module/ice-9/peg/codegen.scm: same
* module/ice-9/peg/string-peg.scm: same
* module/ice-9/peg/using-parsers.scm: same
* doc/ref/api-peg.texi: same