1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

16114 commits

Author SHA1 Message Date
Ludovic Courtès
df3d365a99 build: Build and check (ice-9 popen) only when --enable-posix and HAVE_FORK.
Fixes <http://bugs.gnu.org/13848>.
Reported by Jan Schukat <shookie@email.de>.

* configure.ac: Rename `HAVE_FORK' conditional to `BUILD_ICE_9_POPEN'.
  Set it when both $enable_posix and $ac_cv_func_fork are true.
* libguile/posix.c (scm_init_posix): Add the `fork' feature.
* doc/ref/api-options.texi (Common Feature Symbols): Add `fork'.
* doc/ref/posix.texi (Pipes): Add footnote mentioning the `fork'
  feature.
* module/Makefile.am (SCRIPTS_SOURCES): Make `scripts/autofrisk.scm' and
  `scripts/scan-api.scm' conditional on `BUILD_ICE_9_POPEN'.
* test-suite/tests/popen.test (if-supported): New macro.
  Wrap body in `if-supported'.
2013-03-29 19:20:01 +01:00
Ludovic Courtès
7e7c6f6a93 build: Remove redundant check for `struct timespec'.
* m4/gnulib-cache.m4: Add `time'.
* lib/Makefile.am: Update, still from v0.0-7865-ga828bb2.
* configure.ac: Remove check for `struct timespec', which was redundant
  with Gnulib, and conflicted with pthread-win32's <pthread.h>:
  <http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00096.html>.
2013-03-29 19:20:01 +01:00
Mark H Weaver
7bfbd2935f doc: Use '@defvr' to introduce 'stream-null'.
* doc/ref/srfi-modules.texi (SRFI-41): Use @defvr to introduce
  'stream-null'.
2013-03-29 11:35:20 -04:00
Mark H Weaver
0ddf484d3e Revert "doc: Consider `stream-null' as a variable."
This reverts commit 4a0821a8d5.
2013-03-29 11:33:59 -04:00
Mark H Weaver
c33ecf96a4 Merge remote-tracking branch 'origin/stable-2.0' 2013-03-28 22:24:00 -04:00
Ludovic Courtès
4702deb424 tests: Skip `test-pthread-create-secondary' except on Linux-based systems.
* test-suite/standalone/test-pthread-create-secondary.c: Skip on
  non-Linux-based systems.
2013-03-28 23:33:44 +01:00
Ludovic Courtès
465ff50245 build: Require GMP >= 4.2.
* NEWS, README: Update.
2013-03-28 22:53:59 +01:00
Ludovic Courtès
2a7d614cc0 tests: Fix file name canonicalization tests for when $srcdir contains symlinks.
* test-suite/tests/ports.test ("%file-port-name-canonicalization"): Use
  `pass-if-equal' instead of `pass-if'.
  ["relative canonicalization from ice-9"]: Throw to `unresolved' when
  %LOAD-PATH is not canonical.
  ["absolute canonicalization from ice-9"]: Canonicalize the result.
2013-03-28 22:42:31 +01:00
Ludovic Courtès
8d6e3dd83a Add Gnulib commit ID in `NEWS'. 2013-03-28 22:19:12 +01:00
Ludovic Courtès
07b390d582 Allow compilation with GMP < 5.0.0.
* libguile/numbers.c (VARARG_MPZ_ITERATOR)[!HAVE_DECL_MPZ_INITS]: New
  macro.
  (mpz_inits, mpz_clears)[!HAVE_DECL_MPZ_INITS]: New functions.
* configure.ac: Check for the declaration of `mpz_inits'.
2013-03-28 22:19:12 +01:00
Ludovic Courtès
06589f5c22 Fix erroneous FUNC_NAME' for scm_array_length'.
* libguile/generalized-arrays.c (scm_array_length): Fix `FUNC_NAME'.
2013-03-28 22:19:12 +01:00
Ludovic Courtès
4a0821a8d5 doc: Consider `stream-null' as a variable.
* doc/ref/srfi-modules.texi (SRFI-41): Use @var{stream-null}, not
  @code{stream-null}.  Use @defvr to introduce `stream-null'.
2013-03-28 22:19:10 +01:00
Ian Price
10d278fde5 Document (system repl server)
* doc/ref/api-evaluation.texi (REPL Servers): New Subsection.
2013-03-28 19:15:26 +00:00
Mark H Weaver
26d148066f Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	configure.ac
	libguile/deprecated.c
	libguile/deprecated.h
	libguile/filesys.h
	libguile/fluids.c
	libguile/fports.c
	libguile/gc.c
	libguile/guile.c
	libguile/numbers.c
	libguile/objcodes.c
	libguile/r6rs-ports.c
	libguile/smob.c
	libguile/socket.c
	libguile/threads.h
	module/language/scheme/decompile-tree-il.scm
	module/language/tree-il/peval.scm
	test-suite/tests/syncase.test
2013-03-28 05:09:53 -04:00
Mark H Weaver
579127cce4 SRFI-41 stream-null is a Scheme Variable, not a Constant.
Suggested by Ludovic Courtès <ludo@gnu.org>.

* doc/ref/srfi-modules.texi (SRFI-41 Stream Primitives):
  Label 'stream-null' as a Scheme Variable, not a Constant.
2013-03-27 21:11:06 -04:00
Chris K. Jester-Young
10b8cf1ebd Use BT Templeton's preferred name.
* THANKS: Use BT Templeton's preferred name.
2013-03-27 15:30:26 -04:00
Mark H Weaver
82ab673cea Thanks Chris K. Jester-Young.
* THANKS: Add Chris K Jester-Young to the list of contributors.
2013-03-27 13:40:35 -04:00
Mark H Weaver
80b809f114 Add full documentation for SRFI-41.
* doc/ref/misc-modules.texi (Streams): Add cross-reference to SRFI-41.

* doc/ref/srfi-modules.texi (SRFI-41): Replace stub with full
  documentation.
  (SRFI-41 Stream Fundamentals, SRFI-41 Stream Primitives,
  SRFI-41 Stream Library): New subsubsections.
2013-03-27 13:37:45 -04:00
Chris K. Jester-Young
50d08cd894 Add SRFI-41.
Incorporates suggestions from Mark H Weaver <mhw@netris.org>
and Ian Price <ianprice90@googlemail.com>.

* module/srfi/srfi-41.scm: New file.

* module/Makefile.am (SRFI_SOURCES): Add srfi/srfi-41.scm.

* test-suite/tests/srfi-41.test: New file.

* test-suite/Makefile.am (SCM_TESTS): Add tests/srfi-41.test.

* doc/ref/srfi-modules.texi (SRFI Support): Add SRFI-41.
  (SRFI-41): New node which refers the reader to
  <http://srfi.schemers.org/srfi-41/srfi-41.html>.
2013-03-27 13:37:45 -04:00
Ludovic Courtès
ed4aa26489 Update `NEWS'. 2013-03-27 18:09:50 +01:00
Ludovic Courtès
8a177d316c futures: Limit the number of nested futures on the same stack.
Fixes <http://bugs.gnu.org/13188>.
Reported by Nala Ginrut <nalaginrut@gmail.com>.

* module/ice-9/futures.scm (%nesting-level): Rename to...
  (%nesting-level): ... this.  Default to 0 instead of #f.  Update
  users.
  (%max-nesting-level): New variable.
  (touch): When FUTURE is queued and (%nesting-level) is above
  %MAX-NESTING-LEVEL, abort to %FUTURE-PROMPT.
* test-suite/tests/future.test ("nested futures")["loop"]: Remove
  `compile' call.
* test-suite/tests/threads.test ("par-map")["long list"]: New test.
* doc/ref/api-scheduling.texi (Futures): Add a paragraph about stack
  consumption.
2013-03-27 18:09:49 +01:00
Ludovic Courtès
8cd109bf0a Document `and=>'.
* module/ice-9/boot-9.scm (and=>): Add docstring.
* doc/ref/api-procedures.texi (Higher-Order Functions): Add `and=>'.
2013-03-27 18:09:49 +01:00
Daniel Hartwig
ffc8eca636 web http: parse numeric time zones in headers
* module/web/http.scm (parse-zone-offset, normalize-date): New
  procedures.
  (parse-rfc-822-date, parse-rfc-850-date, parse-date): Update.
* test-suite/tests/web-http.test ("general headers"): Add test.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2013-03-27 18:09:49 +01:00
Ludovic Courtès
c548da6949 doc: Use a preferred naming convention in SRFI-9 examples.
* doc/ref/api-compound.texi (SRFI-9 Records): Use "Scheme Syntax"
  instead of "library syntax".  Remove `get-' from getter names, and add
  an exclamation mark in setter names.  Change `employee-type' to
  `<employee>'.
2013-03-27 18:09:49 +01:00
Mark H Weaver
41502bd00f Manual: xref SRFI-45 from core Delayed Evaluation section.
* doc/ref/api-evaluation.texi (Delayed Evaluation): Add cross-reference
  to SRFI-45.
2013-03-26 21:25:12 -04:00
Mark H Weaver
d291d7990d SRFI-45: add promise? predicate.
* module/srfi/srfi-45.scm (promise?): Export.

* doc/ref/srfi-modules.texi (SRFI-45): Update docs.

* test-suite/tests/srfi-45.test: Add test.  Add FSF copyright for 2010
  and 2013.  Add missing year to André van Tonder's copyright notice.
2013-03-26 21:22:11 -04:00
Mark H Weaver
65ad02b96d Revert "SRFI-45: Support multiple values; add promise? predicate."
This reverts commit 1d64b4edb9.
2013-03-26 21:16:26 -04:00
Ludovic Courtès
59b0f9d763 SRFI-37: Fix infinite loop when processing short option with no required arg.
Fixes <http://bugs.gnu.org/13176>.

* module/srfi/srfi-37.scm (args-fold)[short-option-argument]: When ARGS
  is a pair, always set it to its cdr.
* test-suite/tests/srfi-37.test ("SRFI-37")["short option with optional
  argument omitted", "short option with optional argument provided"]:
  New tests.
2013-03-25 23:25:57 +01:00
Ludovic Courtès
5bb40f9df0 getaddrinfo: Document the missing errno value for EAI_SYSTEM.
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.
2013-03-25 22:46:53 +01:00
Ludovic Courtès
570fdeceac build: Use portable sed constructs.
Partly fixes <http://bugs.gnu.org/14042>.
Reported by Marc Girod <marc.girod@gmail.com>.

* meta/Makefile.am (guile-config): Use separate "s" expressions to
  accommodate Solaris sed.
2013-03-25 22:27:37 +01:00
Ludovic Courtès
11ed42771d sendfile: Make sure we have a Linux-style `sendfile'.
* libguile/filesys.c (scm_sendfile): Change conditional to
  HAVE_SYS_SENDFILE_H && HAVE_SENDFILE.
2013-03-25 13:51:57 +01:00
Ludovic Courtès
f28885f495 sendfile: Check return value of `lseek'.
* libguile/filesys.c (scm_sendfile): Check return value of
  `lseek_or_lseek64', and use `SCM_SYSERROR' upon error.
2013-03-25 13:28:42 +01:00
Ludovic Courtès
45417ab106 Skip relevant `sendfile' tests when thread support is lacking.
* test-suite/tests/filesys.test ("sendfile")["pipe", "pipe with
  offset"]: Throw to `unresolved' when not (provided? 'threads).
2013-03-25 13:26:52 +01:00
Ludovic Courtès
86fafc4402 tests: Add more `maybe-gc-flakiness'.
Fixes <http://bugs.gnu.org/14001>.
Reported by Dennis Clarke <dclarke@blastwave.org>.

* test-suite/tests/gc.test ("gc")["Lexical vars are collectable"]: Wrap
  in `maybe-gc-flakiness'.
2013-03-22 22:24:27 +01:00
Ludovic Courtès
fbac7c6113 Add bindings for `sendfile'.
* 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'.
2013-03-22 22:21:13 +01:00
Ludovic Courtès
e8a57fb052 texinfo plain-text: Use match' for stexi->plain-text'.
* module/texinfo/plain-text.scm (def)[list/spaces]: Remove.
  (stexi->plain-text): Use `match' instead of `cond'.
2013-03-22 22:09:05 +01:00
Ludovic Courtès
43c2a48323 texinfo: Add whitespace after periods.
* module/texinfo/string-utils.scm (end-of-sentence?): New procedure.
  (make-text-wrapper): Append an extra space after LINE when it matches
  `end-of-sentence?' and COLLAPSE-WHITESPACE? is false.
* test-suite/tests/texinfo.serialize.test ("test-serialize"): Adjust
  accordingly.
* test-suite/tests/texinfo.string-utils.test ("text wrapping")["two
  spaces after end of sentence"]: New test prefix.
2013-03-22 22:05:23 +01:00
Ludovic Courtès
c5c7c1146f build: Adjust makefiles for `guile-procedures.txt'.
* libguile/Makefile.am (all-local): New target.
* Makefile.am (libguile/guile-procedures.txt): Output to $@.tmp first.
  (CLEANFILES): New variable.
2013-03-22 00:52:16 +01:00
Ludovic Courtès
6cfdc6b878 Build guile-procedures.txt' using (texinfo) instead of makeinfo'.
* Makefile.am (schemelibdir, schemelib_DATA): New variables.
  (libguile/guile-procedures.txt): New target.
  (EXTRA_DIST): Add libguile/texi-fragments-to-docstrings.
* libguile/Makefile.am (guile-procedures.txt): Remove target.
  (schemelibdir, schemelib_DATA): Remove.
* libguile/texi-fragments-to-docstrings: New file.
2013-03-21 23:24:47 +01:00
Ludovic Courtès
2bb7a73013 texinfo plain-text: Properly render @dots{}.
* module/texinfo/plain-text.scm (tag-handlers): Add `dot' handler.
2013-03-21 23:24:46 +01:00
Ludovic Courtès
8fe4c4eccb test suite: Fix typo in `texinfo.test'.
* test-suite/tests/texinfo.test ("test-texinfo->stexinfo"): Add missing
  quote.
2013-03-21 19:17:56 +01:00
Ludovic Courtès
4215ea75a5 texinfo: Recognize `@:'.
* module/texinfo.scm (read-command-token): Recognize @:.
* test-suite/tests/texinfo.test ("test-texinfo->stexinfo"): Add test.
2013-03-21 18:52:29 +01:00
Ludovic Courtès
797b2aa69a texinfo: Allow markup in the arguments of `@pxref'.
* module/texinfo.scm (texi-command-specs)[pxref]: Change to
  `INLINE-TEXT-ARGS'.
* test-suite/tests/texinfo.test ("test-texinfo->stexinfo")["@pxref{Locales,
  @code{setlocale}}"]: New test.
2013-03-21 18:52:29 +01:00
Ludovic Courtès
c52ce75a1f test suite: Use `pass-if-equal' in texinfo.test.
* test-suite/tests/texinfo.test: Replace occurrences of
  `(pass-if (equal? ...))' by `pass-if-equal'.
2013-03-21 18:52:29 +01:00
Mike Gran
14ae4725ab Document quit and exit
* doc/ref/posix.texi (Processes): document `quit' and `exit'
* doc/ref/r6rs.texi (rnrs programs): xref exit
2013-03-21 09:20:31 -07:00
Mark H Weaver
edb6de0bec Add missing 'cond-expand' feature identifiers; remove srfi-6 from core list.
* 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.
2013-03-21 12:50:04 -04:00
Mark H Weaver
8edab37f17 Mention the non-conformance of the core SRFI-6 procedures in the manual.
* 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.
2013-03-21 12:48:03 -04:00
Mark H Weaver
ddb7174236 Improve sqrt handling of large integers and large and small rationals.
* libguile/numbers.c (exact_integer_is_perfect_square,
  exact_integer_floor_square_root): New static functions.

  (scm_sqrt): Use SCM_LIKELY.  Add 'scm_t_inum' variable in inum case to
  reduce the number of uses of SCM_I_INUM.  Rename 'mpz_t' variable.
  Remove unneeded sign check.  Handle bignums too large to fit in a
  double.  Handle fractions too large or too small to fit in a
  normalized double.

* test-suite/tests/numbers.test ("sqrt"): Add tests.
2013-03-20 06:27:39 -04:00
Mark H Weaver
687a87bf01 Optimize inum case of exact-integer-sqrt.
* libguile/numbers.c (scm_exact_integer_sqrt): Use GMP for inum
  case.  It is faster than what we had before.
2013-03-20 02:27:10 -04:00
Mark H Weaver
4400266478 Sqrt returns exact results when possible.
* libguile/numbers.c (scm_sqrt): Handle exact integers and rationals in
  such a way that exact results are returned whenever possible.

* test-suite/tests/numbers.test ("sqrt"): Add tests.
2013-03-20 00:13:43 -04:00