1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 04:40:29 +02:00
Commit graph

10750 commits

Author SHA1 Message Date
Ludovic Courtès
a97cd69632 Don't use deprecated functions in `debug-malloc.c'.
* libguile/debug-malloc.c (scm_malloc_stats): Use
  `scm_from_locale_string ()'.  Patch by Linas Vepstas
  <linasvepstas@gmail.com>.
2008-12-18 22:48:45 +01:00
Neil Jerram
bba579611b Update autogen.sh
* autogen.sh: Don't call guile-readline/autogen.sh; not needed because
  autoreconf recurses itself.  Remove copies of config.guess and
  config.sub, which are now invalid because we don't have those files
  in the top level directory.  Remove mention of
  --enable-maintainer-mode, as we don't use AM_MAINTAINER_MODE any
  more.
2008-12-14 14:42:08 +00:00
Ludovic Courtès
200651f2d7 configure: Check for <ltdl.h>.
* configure.in: Check for <ltdl.h>, to clarify misconfigurations.
2008-12-10 10:06:46 +01:00
Ludovic Courtès
e6edcc18a5 configure: Don't substitute `DLPREOPEN'.
* configure.in: Don't substitute `DLPREOPEN' since it's no longer used
  (see commit 72db29f200).
2008-12-10 09:57:33 +01:00
Ludovic Courtès
43ec70085a Bump version number for 1.8.6.
* GUILE-VERSION (GUILE_MICRO_VERSION): Increment.
  (LIBGUILE_INTERFACE_CURRENT): Increment due to the addition of
  `scm_c_symbol_length ()'.
  (LIBGUILE_INTERFACE_AGE): Increment.
2008-12-08 21:34:14 +01:00
Ludovic Courtès
aa57bb21e9 Mention the end of ChangeLog' files in NEWS'. 2008-12-08 21:34:08 +01:00
Ludovic Courtès
9ab373b587 Make `config.status' happier.
* guile-tools.in (datarootdir): New variable, needed since `pkgdatadir'
  may refer to `${datarootdir}'.
2008-12-08 21:17:21 +01:00
Ludovic Courtès
72db29f200 Remove useless references to Libtool's `dlpreopen' mechanism.
* libguile/Makefile.am (guile_LDFLAGS): Remove `@DLPREOPEN@' since it
  has no effect.

* libguile/guile.c (main): Don't invoke `LTDL_SET_PRELOADED_SYMBOLS ()'
  since it had no effect given how we invoke `libtool'.  It also fixes
  compatibility issues when using libltdl 1.5 with a Libtool 2.2
  package.
2008-12-07 22:08:39 +01:00
Ludovic Courtès
93a48a7130 Delete redundant `config.{guess,sub}'. 2008-12-07 22:08:31 +01:00
Neil Jerram
1ea97c4264 Several new hash table tests, written by Gregory Marton.
* test-suite/tests/hash.test ("make-hash-table, hash-table?",
  "hash-set and hash-ref", "auto-resizing hashx", "hashx"): New tests.

* AUTHORS, THANKS: Add Gregory Marton as a contributor.
2008-12-07 16:27:44 +00:00
Ludovic Courtès
deee086c8d Fix sloppy bound checking in `string-{ref,set!}' with the empty string.
* libguile/strings.c (scm_string_ref): Add proper range checking for the
  empty string.
  (scm_string_set_x): Likewise.
  Reported by Bill Schottstaedt <bil@ccrma.Stanford.EDU>.

* test-suite/tests/strings.test ("string-ref"): New test prefix.
  ("string-set!")["empty string", "empty string and non-zero index",
  "out of range", "negative index", "regular string"]: New tests.

* NEWS: Update.
2008-12-02 19:42:39 +01:00
Ludovic Courtès
0affe15f63 Update `NEWS'. 2008-12-02 19:30:56 +01:00
Ludovic Courtès
a87c991545 Fix potential deadlock in `make-struct'.
* libguile/struct.c (scm_make_struct): Remove critical section, as
  suggested by Linas Vepstas <linasvepstas@gmail.com>.  See
  http://lists.gnu.org/archive/html/bug-guile/2008-11/msg00036.html for
  a discussion.
2008-11-30 20:28:47 +01:00
Ludovic Courtès
0328bf6a0e Make GNU Libtool 2.2.x happier.
* configure.in: Use `AC_CONFIG_MACRO_DIR([m4])'.  Reverts patch
  b01284227e and makes `libtoolize' from
  Libtool 2 happier (removes a couple of warnings).

* Makefile.am (ACLOCAL_AMFLAGS): Remove `-I guile-config' since that
  directory only contains macros that we distribute, not macros that we
  use.
2008-11-30 19:37:29 +01:00
Ludovic Courtès
b12a5fd7f6 Check the return value of libc's functions to make `_FORTIFY_SOURCE=2' work.
This fixes bug #24009 reported by Martin Pitt.

* libguile/threads.c (guilify_self_1): Check the return value of
  pipe(2).
  (scm_std_select): Store the return value of read(2) when reading
  from WAKEUP_FD.

* libguile/async.c (scm_i_queue_async_cell): Store the return value
  of write(2) when writing to SLEEP_FD.

* libguile/fports.c (fport_flush): Likewise.

* libguile/posix.c (getgroups): Use the return value of getgroups(2) as
  NGROUPS.
  (scm_nice): Get the return value of nice(2) to make glibc happy.

* libguile/scmsigs.c (take_signal): Store the return value of
  write(2).
2008-11-30 18:58:57 +01:00
Ludovic Courtès
664d1f5eb2 Use orthodox libtoology in `guile'.
* libguile/guile.c (main): Use `LTDL_SET_PRELOADED_SYMBOLS ()' instead
  of our own trick.
2008-11-24 23:15:22 +01:00
Ludovic Courtès
2ae217f418 Run the handler of SRFI-34's `with-exception-handler' in the right dyn. env.
* srfi/srfi-34.scm (with-exception-handler): Use `with-throw-handler'
  instead of `lazy-catch'.

* test-suite/tests/srfi-34.test ("SRFI 34")["`with-exception-handler'
  invokes HANDLER in THUNK's dynamic env."]: New test.

* test-suite/tests/srfi-39.test: Use `(srfi srfi-34)'.
  ("SRFI-39")["SRFI-34"]: New test.

* NEWS: Update.
2008-11-24 09:41:53 +01:00
Ludovic Courtès
f36b070b65 Fix comments in `test-scm-c-read.c'.
* test-suite/standalone/test-scm-c-read.c (make_port): Fix comments.
2008-11-24 09:41:50 +01:00
Ludovic Courtès
86b9e1d9c9 Add C unit test for `scm_c_read ()' and the port API.
* test-suite/standalone/Makefile.am (check_PROGRAMS, TESTS): Add
  `test-scm-c-read'.
  (test_scm_c_read_SOURCES, test_scm_c_read_CFLAGS,
  test_scm_c_read_LDADD): New.
2008-11-23 22:44:41 +00:00
Neil Jerram
1d17348b54 Make scm_c_read use caller buffer only for unbuffered ports.
We recently modified scm_c_read so that it temporarily swaps the
caller's buffer with the port's normal read buffer, in order to
improve performance in the case where the port is unbuffered (which
actually means having a single-byte buffer) - but we implemented the
swap in the buffered case too.  The latter turns out to be a bad idea
- because it means that the C code of a custom port implementation
cannot rely on a port's buffer always being the same as when it was
first set up - and so this commit reverts that.  The buffer swapping
trick now applies to unbuffered ports only.

* libguile/ports.c (scm_c_read): Only do swapping of port and caller
  buffer for unbuffered ports.
2008-11-23 22:38:34 +00:00
Ludovic Courtès
895dfae3ea Update `THANKS'. 2008-11-14 00:41:41 +01:00
Ludovic Courtès
cd1a1e47b5 Update the thread stack base when `scm_with_guile' is invoked multiple times.
* NEWS: Update.

* libguile/threads.c (scm_i_init_thread_for_guile): When the thread is
  already guilified, update `t->base' so that it corresponds to the new
  stack base.  Bug report and patch by Linas Vepstas <linasvepstas@gmail.com>.

* test-suite/standalone/Makefile.am (test_scm_with_guile_CFLAGS,
  test_scm_with_guile_LDADD): New.
  (check_PROGRAMS, TESTS): Add `test-scm-with-guile'.
2008-11-14 00:35:32 +01:00
Ludovic Courtès
b578508acd Augment `.gitignore'. 2008-11-13 23:33:42 +01:00
Ludovic Courtès
49eb8fa20e Update "guile(1)" man page.
* doc/guile.1: Remove reference to the version and date.  Mention R5RS,
  instead of R4RS.  Explicitly say that the full documentation is in
  Texinfo (as other GNU packages do).
2008-11-13 23:33:40 +01:00
Ludovic Courtès
25bb753140 Add "guile(1)" man page.
Robert Merkel's copyright assignment to the FSF had apparently been on
file for some time.

* NEWS: Update.

* doc/Makefile.am (dist_man1_MANS): New.
2008-11-13 23:33:39 +01:00
Neil Jerram
9b20fde272 Fix stack calibration-related errors when running make distcheck.
* libguile/Makefile.am (stack-limit-calibration.scm): Use $(srcdir), to
  support building in a different directory.
  (MOSTLYCLEANFILES): Add stack-limit-calibration.scm.
2008-10-26 21:44:35 +00:00
Neil Jerram
28f979acf1 Add measure-hwm.scm to the set of distribution files.
* libguile/Makefile.am (EXTRA_DIST): Add measure-hwm.scm.
2008-10-24 22:46:43 +01:00
Neil Jerram
05675184ee Avoid Stack overflow' errors when running make check'
For explanation, see comments and text in the new file
libguile/measure-hwm.scm.

* .gitignore: Add libguile/stack-limit-calibration.scm.

* check-guile.in: Load libguile/stack-limit-calibration.scm.

* configure.in: Add AC_CONFIG_FILES to generate test-use-srfi from
  test-use-srfi.in.

* libguile/Makefile.am (TESTS, TESTS_ENVIRONMENT,
  stack-limit-calibration.scm): New targets, so that `make check'
  calibrates the stack limit before running the Guile test suite.

* libguile/measure-hwm.scm: New file, calibrates stack limit for `make
  check'.

* libguile/stackchk.c (scm_sys_get_stack_size): New primitive.

* libguile/stackchk.h (scm_sys_get_stack_size): New primitive
  (declaration).

* test-suite/standalone/test-use-srfi: Renamed test-use-srfi.in, so
  that ./configure can fill in variables in it.

* test-suite/standalone/test-use-srfi.in: Load
  libguile/stack-limit-calibration.scm.
2008-10-17 22:02:17 +01:00
Ludovic Courtès
c18ed8cead Fix compilation error due to strict aliasing rules on `i386-unknown-freebsd7.0'.
* libguile/threads.c (scm_threads_mark_stacks): Cast `&t->regs' to
  `(void *)' rather than `(SCM_STACKITEM *)' to avoid "warning:
  dereferencing type-punned pointer will break strict-aliasing rules"
  with GCC 4.2.1 on `i386-unknown-freebsd7.0'.
2008-10-10 10:00:21 +02:00
Ludovic Courtès
f23f643881 Fix compilation of the hard copy of the R5RS, tutorial and GOOPS manual.
* doc/tutorial/Makefile.am (TEXINFO_TEX): Remove.

* doc/goops/Makefile.am (TEXINFO_TEX): Remove.

* doc/r5rs/Makefile.am (TEXINFO_TEX): Remove.
2008-10-09 23:24:09 +02:00
Ludovic Courtès
89fc8adea3 Add test case to make sure `read' returns mutable strings.
* test-suite/tests/reader.test ("reading")["returned strings are
  mutable"]: New test, as reported by szgyg <szgyg@ludens.elte.hu>.
2008-10-09 23:24:07 +02:00
Ludovic Courtès
4b600701b9 Revert "Make literal strings (i.e., returned by `read') read-only."
This reverts commit be5c4a82ab.

The rationale is that `read' must return mutable strings, as reported
by szgyg <szgyg@ludens.elte.hu>.
2008-10-09 23:23:27 +02:00
Ludovic Courtès
097158c936 Enclose `regexp.test' in a module.
* test-suite/tests/regexp.test: Add `define-module' clause.
2008-09-25 21:37:21 +02:00
Ludovic Courtès
afb28ce860 Fix handling of the FLAGS argument in `fold-matches'.
* ice-9/regex.scm (fold-matches): If FLAGS is non-null, use
  `(car flags)', not `flags'.

* test-suite/tests/regexp.test ("fold-matches"): New test prefix.

* NEWS: Update.
2008-09-25 21:37:18 +02:00
Ludovic Courtès
be5c4a82ab Make literal strings (i.e., returned by `read') read-only.
* libguile/read.c (scm_read_string): Use `scm_i_make_read_only_string ()' to
  return a read-only string, as mandated by R5RS.  Reported by Bill
  Schottstaedt <bil@ccrma.Stanford.EDU>.

* libguile/strings.c (scm_i_make_read_only_string): New function.
  (scm_i_shared_substring_read_only): Special-case the empty string
  so that the read-only and read-write empty strings are `eq?'.  This
  optimization is relied on by the `substring/shared' `empty string'
  test case in `srfi-13.test'.

* libguile/strings.h (scm_i_make_read_only_string): New declaration.

* test-suite/tests/strings.test ("string-set!")["literal string"]: New test.

* NEWS: Update.
2008-09-23 18:39:18 +02:00
Ludovic Courtès
40de0323e7 Make `symbol->string' return a read-only string.
* libguile/strings.c (scm_i_symbol_substring): Return a read-only string
  since R5RS requires `symbol->string' to return a read-only string.
  Reported by Bill Schottstaedt <bil@ccrma.Stanford.EDU>.

* test-suite/tests/symbols.test: Add `define-module' clause.
  (exception:immutable-string): Adjust to current exception.
  ("symbol->string")["result is an immutable string"]: Use
  `pass-if-exception' instead of `expect-fail-exception'.

* NEWS: Update.
2008-09-23 18:39:10 +02:00
Neil Jerram
0bf4fe19a6 Fix for incorrect (gcd -2) => -2; should give 2.
(reported by Bill Schottstaedt)

* libguile/numbers.c (scm_gcd): When only one arg given, use scm_abs
  to ensure that result is non-negative.

* test-suite/tests/numbers.test ("gcd"): New test, (gcd -2).
2008-09-22 21:18:01 +01:00
Neil Jerram
bed2e15fc9 Make multi-byte reads on unbuffered ports more efficient.
Idea and original patch were by Ludovic Courts, this is Neil Jerram's
reworking of it.

	* libguile/srfi-4.c (scm_uniform_vector_read_x): Use scm_c_read,
	instead of equivalent code here.

	* libguile/ports.c (scm_fill_input): Add assertion that read
	buffer is empty when called.
	(port_and_swap_buffer, swap_buffer): New, for...
	(scm_c_read): Use caller's buffer for reading, to avoid making N
	1-byte low-level read calls, in the case where the port is
	unbuffered (or has a very small buffer).
2008-09-15 18:50:14 +01:00
Ludovic Courtès
4a281c91b4 Add `uniform-vector-read!' benchmark. 2008-09-15 01:33:02 +01:00
Ludovic Courtès
972b5d7045 Include <config.h> in standalone tests.
* test-suite/standalone/Makefile.am (test_cflags): Add `-I$(top_builddir)' so
  that <config.h> can be found.
  (snarfcppopts): Likewise.

* test-suite/standalone/*.c: Include <config.h>.
2008-09-13 20:12:10 +02:00
Ludovic Courtès
7a4e0d105e Include <config.h> in all C files; use #ifdef HAVE_CONFIG_H' rather than #if'. 2008-09-13 15:49:50 +02:00
Ludovic Courtès
8073f24ccd Add `ChangeLog-2008' files to the distribution. 2008-09-12 21:46:32 +02:00
Ludovic Courtès
e9d9445b50 Rename ChangeLog' files to ChangeLog-2008'. 2008-09-12 21:42:26 +02:00
Ludovic Courtès
0db4aa6c4a doc: Correct the default value of `%load-path'.
* doc/ref/api-options.texi (Build Config): Remove "." from the default value
  of `%load-path'.  Reported by David Séverin <david@altosw.be>.
2008-09-12 11:30:04 +02:00
Ludovic Courtès
1778e9f5fb Include <config.h> in `discouraged.c'.
* libguile/discouraged.c: Include <config.h> first so that files that
  rely on `config.h' macros (such as Gnulib-provided headers) work as
  expected.
2008-09-12 09:42:58 +02:00
Ludovic Courtès
365db7e640 Remove `.cvsignore' files. 2008-09-11 21:48:53 +02:00
Ludovic Courtès
b01284227e Use Simon Josefsson's `autobuild.m4'.
* Makefile.am (EXTRA_DIST): Add `m4/autobuild.m4'.
  (ACLOCAL_AMFLAGS): Add `-I m4'.

* configure.in: Invoke `AB_INIT'.

* m4/autobuild.m4: New file.
2008-09-11 21:48:23 +02:00
Ludovic Courtès
4e329a9569 Get rid of Automake's "maintainer mode".
* NEWS: Update.
* configure.in: Remove `AM_MAINTAINER_MODE' invocation.
* doc/Makefile.am, ice-9/Makefile.am: Ignore `MAINTAINER_MODE'
  conditional.
2008-09-09 18:07:03 +02:00
Ludovic Courtès
06b6fb81ea Update NEWS' wrt. mutex-lock' deadlock fix. 2008-09-08 14:36:12 +02:00
Julian Graham
1eb4952693 Resolve a deadlock caused by not checking mutex state after calling `SCM_TICK'.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2008-09-08 14:32:22 +02:00