summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-04-27Fix typo in `NEWS'.v2.0.1Ludovic Courtès1-1/+1
2011-04-27Bump version number for 2.0.1.Ludovic Courtès1-3/+3
* GUILE-VERSION (GUILE_MICRO_VERSION): Increment. (LIBGUILE_INTERFACE_CURRENT): Increment to account for new C functions such as `scm_c_public_ref' and `scm_from_latin1_keyword'. (LIBGUILE_INTERFACE_AGE): Increment.
2011-04-27Update `NEWS'.Ludovic Courtès1-3/+7
2011-04-27Keep a 2.0.0-compatible `define-inlinable' macro in (srfi srfi-9).Ludovic Courtès1-0/+31
Partially reverts 165b10ddfaaa8ecc72d45a9be7d29e7537dc2379 and 531c9f1dc51c4801c4d031ee80a31f15285a6b85. * module/srfi/srfi-9.scm (define-inlinable): New macro.
2011-04-27Document `(ice-9 binary-ports)'.Ludovic Courtès2-0/+5
* doc/ref/api-io.texi (R6RS I/O Ports): Mention `(ice-9 binary-ports)'. * NEWS: Update.
2011-04-27Add tests for UTF-8 ill-formed sequence handling.Ludovic Courtès1-0/+27
* test-suite/tests/ports.test ("string ports"): Add for `test-decoding-error' tests for ill-formed UTF-8 sequences. Thanks to Mark H Weaver <mhw@netris.org> for pointing this out.
2011-04-27Gracefully handle unterminated UTF-8 sequences instead of hitting an `assert'.Ludovic Courtès2-5/+23
* libguile/ports.c (get_codepoint): Return EILSEQ when OUTPUT_SIZE == 0. * test-suite/tests/ports.test ("string ports"): Add 2 tests for unterminated sequences.
2011-04-27Add a couple more Unicode I/O tests.Ludovic Courtès1-1/+11
* test-suite/tests/ports.test ("string ports")["%default-port-encoding is honored"]: Make sure `(port-encoding p)' is as expected. ["peek-char [utf-16]"]: New test.
2011-04-27Rewrite port decoding error tests using a mini DSL.Ludovic Courtès1-74/+77
* test-suite/tests/ports.test ("string ports")[test-decoding-error]: New macro. ["read-char, wrong encoding, error", "read-char, wrong encoding, escape", "read-char, wrong encoding, substitute", "peek-char, wrong encoding, error"]: Rewrite using `test-decoding-error'.
2011-04-27Gracefully handle `setlocale' errors at the REPL.Ludovic Courtès1-1/+8
* module/ice-9/top-repl.scm (top-repl): Catch exceptions from `setlocale'. Reported by CRLF0710 <crlf0710@gmail.com>.
2011-04-26Remove the `sizeof (mpz_t)' check.Ludovic Courtès1-3/+0
* libguile/numbers.c: Remove `sizeof (mpz_t)' check, which wasn't need anymore since `make_bignum' doesn't make any such assumption.
2011-04-25Use `scm_with_guile' in `test-pthread-create'.Ludovic Courtès1-5/+11
* 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.)
2011-04-25Update Gnulib to v0.0-5158-g7d06b32; remove `strcase' and `version-etc-fsf'.Ludovic Courtès64-1251/+1361
* m4/gnulib-cache.m4: Remove `strcase' and `version-etc-fsf'. * configure.ac (POTENTIAL_GCC_CFLAGS): Remove `-Wundef'. * libguile/script.c: Don't include <version-etc.h>.
2011-04-25Fix `#ifdef HAVE_CONFIG_H' stanza in some stand-alone tests.Ludovic Courtès6-6/+6
* test-suite/standalone/test-asmobs-lib.c, test-suite/standalone/test-extensions-lib.c, test-suite/standalone/test-ffi-lib.c, test-suite/standalone/test-list.c, test-suite/standalone/test-num2integral.c, test-suite/standalone/test-with-guile-module.c: Change `#ifndef HAVE_CONFIG_H' to `#ifdef HAVE_CONFIG_H' (!).
2011-04-25Compile more file system related procedures when `--disable-posix'.Ludovic Courtès1-202/+200
* libguile/filesys.c (scm_tc16_dir, scm_directory_stream_p, scm_opendir, scm_readdir, scm_rewinddir, scm_closedir, scm_dir_print, scm_dir_free, scm_lstat): Compile unconditionally.
2011-04-25Move `{total,current}-processor-count' outside of `posix.c'.Ludovic Courtès6-47/+53
* libguile/posix.c (scm_total_processor_count, scm_current_processor_count): Move to... * libguile/threads.c: ... here. * libguile/posix.h (scm_total_processor_count, scm_current_processor_count): Move declarations to... * libguile/threads.h: ... here. * test-suite/tests/posix.test ("nproc"): Move tests to... * test-suite/tests/threads.test: ... here.
2011-04-25Make the `sizeof (mpz_t)' check at compile-time.Ludovic Courtès2-7/+5
* libguile/init.c (scm_i_init_guile): Remove the `sizeof (mpz_t)' run-time check. * libguile/numbers.c: Add a compile-time check for `sizeof (mpz_t)'.
2011-04-25Add pthread-related tests.Ludovic Courtès5-0/+228
* test-suite/standalone/Makefile.am (test_scm_spawn_thread_CFLAGS, test_scm_spawn_thread_LDADD, test_pthread_create_CFLAGS, test_pthread_create_LDADD, test_pthread_create_secondary_CFLAGS, test_pthread_create_secondary_LDADD): New variables. (check_PROGRAMS)[BUILD_PTHREAD_SUPPORT]: Add `test-scm-spawn-thread', `test-pthread_create', `test-pthread_create-secondary'. (TESTS)[BUILD_PTHREAD_SUPPORT]: Likewise. * test-suite/standalone/test-scm-spawn-thread.c, test-suite/standalone/test-pthread-create.c, test-suite/standalone/test-pthread-create-secondary.c: New files.
2011-04-25Make `scm_i_ensure_signal_delivery_thread' call in Guile mode.Ludovic Courtès1-4/+4
* libguile/threads.c (on_thread_exit): Move `scm_i_ensure_signal_delivery_thread' call... (do_thread_exit): ... here.
2011-04-22Make sure binary ports pass `binary-port?' regardless of the locale.Ludovic Courtès6-20/+71
* libguile/r6rs-ports.c (make_bip, make_cbip, make_bop, make_cbop): Set `c_port->encoding' to NULL. * test-suite/tests/r6rs-ports.test ("7.2.7 Input Ports")["bytevector-input-port is binary"]: New test. ("7.2.7 Input Ports")["make-custom-binary-input-port"]: Make sure PORT passes `binary-port?' and `input-port?'. ("8.2.10 Output ports")["bytevector-output-port is binary"]: New test. ["make-custom-binary-output"]: Rename to... ["make-custom-binary-output-port"]: ... this. * test-suite/tests/ports.test ("string ports")["read-char, wrong encoding, error", "read-char, wrong encoding, escape", "read-char, wrong encoding, substitute", "peek-char, wrong encoding, error"]: Use `set-port-encoding!' instead of `%default-port-encoding' to set the encoding of bytevector input ports. * test-suite/tests/rdelim.test ("read-line")["decoding error", "decoding error, substitute"]: Likewise. * doc/ref/api-io.texi (R6RS Port Manipulation): Document `binary-port?' and `textual-port?'. * doc/ref/r6rs.texi (R6RS Incompatibilities): Mention the soft distinction between textual and binary ports.
2011-04-22Turn the libunistring/iconv configure check into a macro.Ludovic Courtès2-20/+33
* acinclude.m4 (GUILE_LIBUNISTRING_WITH_ICONV_SUPPORT): New macro. * configure.ac: Use it.
2011-04-22Fix typo in `configure.ac'.Ludovic Courtès1-1/+1
* configure.ac: Add missing comma in `AC_RUN_IFELSE' invocation.
2011-04-22Increase the timeout of timing-sensitive thread tests.Ludovic Courtès1-4/+4
* test-suite/tests/threads.test ("timed locking succeeds if mutex unlocked within timeout", "timed unlocking returns #t if condition signaled", "timed joining succeeds if thread exits within timeout"): Increase the timeout. Reported by Dale P. Smith <dsmich@roadrunner.com>.
2011-04-21add test that libunistring was built with iconv supportAndy Wingo1-0/+21
* configure.ac: Add check that libunistring was built with iconv support. Thanks to Mark Weaver for the debugging and test program.
2011-04-21Clarify units of string length in decription of scm_from_stringnMark H Weaver1-1/+1
* doc/ref/api-data.texi (Conversion to/from C): In description of scm_from_stringn, clarify that the length is specified in bytes.
2011-04-19Clarify the units of returned lengths in string conversion functionsMark H Weaver1-6/+9
* doc/ref/api-data.texi (Conversion to/from C): In descriptions of scm_to_stringn and scm_to_{latin1,utf8,utf32}, clarify that the returned length is in units of bytes or code points, not characters. Also change NULL to @code{NULL} in a few places.
2011-04-15fix pre-GC_set_start_callback compilationAndy Wingo1-6/+7
* libguile/gc.c: Move declaration of run_before_gc_hook up.
2011-04-15pre-GC_set_start_callback compatibilityAndy Wingo3-9/+38
* configure.ac: Add a check for GC_set_start_callback. * libguile/gc.c (scm_i_gc): If we don't have GC_set_start_callback, run the before-gc hook manually here. (scm_init_gc): Otherwise set it as a start callback. * libguile/hashtab.c (weak_gc_callback, weak_gc_hook) (weak_gc_finalizer, scm_c_register_weak_gc_callback): Fix to work either way, with or without GC_set_start_callback.
2011-04-15weak hash table vacuum on before-gc C hookAndy Wingo1-14/+13
* libguile/hashtab.c (weak_gc_callback) (scm_c_register_weak_gc_callback): Change implementation to use the before-gc C hook instead of the after-gc finalizers.
2011-04-15use gc_start_callback + asyncs for after-gc-hook, instead of finalizersAndy Wingo1-32/+36
* libguile/gc.c (run_before_gc_c_hook, scm_storage_prehistory) (after_gc_async_thunk, queue_after_gc_hook, scm_init_gc): Instead of playing our finalizer trick, connect to the GC start callback, and use it to queue an async after-gc-hook. Seems to fix the after-gc-hook on non-threaded builds. Though this does re-enable the before-gc C hook, we don't wire up the Scheme hook because we're in the alloc lock; and indeed, a before-GC scheme hook isn't a great idea...
2011-04-15add --fresh-auto-compileAndy Wingo6-4/+53
* doc/ref/api-evaluation.texi (Compilation): Add discussion of --fresh-auto-compile. * doc/ref/scheme-scripts.texi (Invoking Guile): Add --fresh-auto-compile option. * NEWS: Add entry. * libguile/load.c: Define %fresh-auto-compile. (scm_primitive_load_path): Use it here. (scm_init_load_should_auto_compile): Init from GUILE_AUTO_COMPILE env var, with a value of "fresh". * module/ice-9/boot-9.scm (load-in-vicinity): Auto-compilation cache is stale if %fresh-auto-compile is true. * module/ice-9/command-line.scm (compile-shell-switches): Parse out --fresh-auto-compile.
2011-04-15Build `filesys.x'.Ludovic Courtès1-0/+1
* libguile/Makefile.am (DOT_X_FILES): Add `filesys.x'.
2011-04-15Allow compilation with `--disable-posix'.Ludovic Courtès9-315/+358
Reported by Dmitry Dzhus <dima@dzhus.org>. * configure.ac: Remove `AC_LIBOBJ([filesys])'. Document `--disable-posix' as omitting non-essential POSIX interfaces. * libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES): Add `filesys.c'. (DOT_DOC_FILES): Add `filesys.doc'. (EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES): Remove `filesys.c'. * libguile/posix.c (scm_mkstemp, scm_access): Move to `filesys.c'. (scm_init_posix): Move `R_OK' etc. to `filesys.c'. * libguile/filesys.c (scm_chown, scm_chmod, scm_umask, scm_open_fdes, scm_open, scm_close, scm_close_fdes, scm_link, scm_tc16_dir, scm_directory_stream_p, scm_opendir, scm_readdir, scm_rewinddir, scm_closedir, scm_dir_print, scm_dir_free, scm_chdir, scm_getcwd, set_element, fill_select_type, get_element, retrieve_select_type, scm_select, scm_fcntl, scm_fsync, scm_symlink, scm_readlink, scm_lstat, scm_copy_file): Conditionalize on HAVE_POSIX. (scm_mkstemp, scm_access): New functions. (scm_init_filesys): Conditionalize `scm_tc16_dir', `O_RDONLY', etc. on HAVE_POSIX. Define `R_OK', `W_OK', etc. * libguile/fports.c (fport_print): Use `scm_ttyname' only when HAVE_POSIX. * libguile/i18n.c (lock_locale_mutex, unlock_locale_mutex): New functions. Update users of `scm_i_locale_mutex' to use them. * libguile/init.c (scm_i_init_guile): Always call `scm_init_filesys'. * meta/guile-tools.in (main): Use `setlocale' only when it is defined. * module/ice-9/boot-9.scm: Always load `ice-9/posix'.
2011-04-14Include <sched.h> in `posix.c'.Ludovic Courtès2-1/+6
* configure.ac: Check for <sched.h>. * libguile/posix.c [HAVE_SCHED_H]: Include <sched.h>, for `sched_setaffinity' & co. Reported by Marco Maggi <marco.maggi-ipsu@poste.it>.
2011-04-14Add tests for `-Wformat' and gettext.Ludovic Courtès1-0/+17
* test-suite/tests/tree-il.test ("warnings")["non-literal format string using gettext", "one missing argument, gettext"]: New tests.
2011-04-14fix analyze.scm literal string warningsAndy Wingo1-5/+3
* module/language/tree-il/analyze.scm (const-fmt): Return any literal value, not just strings. The string case is checked later.
2011-04-14fix embarrassing bugs in (ice-9 command-line)Andy Wingo1-3/+6
* module/ice-9/command-line.scm (compile-shell-switches): Whoops, fix a few cases that forgot to loop back to the beginning.
2011-04-14guile -v prints LGPLv3+.Andy Wingo1-0/+1
* module/ice-9/command-line.scm (compile-shell-switches): Though Guile may be distributed under the GPLv3, Guile is actually LGPLv3+.
2011-04-14script.c calls out to (ice-9 command-line)Andy Wingo1-449/+16
* libguile/script.c (scm_shell_usage): Call (ice-9 command-line)'s shell-usage. (scm_compile_shell_switches): Likewise, call (ice-9 command-line)'s compile-shell-switches.
2011-04-14add packager info to %build-infoAndy Wingo1-0/+15
* libguile/load.c (init_build_info): Add packager, packager-version, and packager-bug-reports to %build-info, if they are available.
2011-04-14add (ice-9 command-line)Andy Wingo2-0/+417
* module/ice-9/command-line.scm: New module for parsing Guile's command line, ported from script.c. Includes local eval-string implementation to make `guile -c 1' faster, by not having to load the compiler. * module/Makefile.am: Add to build.
2011-04-14don't warn about non-literal fmt strings for e.g. (_ "foo")Andy Wingo1-2/+26
* module/language/tree-il/analyze.scm (const-fmt, format-analysis): Allow format strings to be gettexted, using the conventional _ name.
2011-04-13update NEWSAndy Wingo1-289/+139
* NEWS: Update for 2.0.1.
2011-04-13(rnrs arithmetic fixnums) fixnum? export a procedure againAndy Wingo2-7/+338
* module/rnrs/arithmetic/fixnums.scm (fixnum?): Restore this export to be a procedure, not syntax. (inline-fixnum?): This is what fixnum? was. Use it internally.
2011-04-13revert 4a2ac0623c3dabb2c8b9d38c27b837dcb2c7fe4eAndy Wingo1-4/+0
* module/ice-9/popen.scm (open-pipe*): No need to pump the pipes guardian here, now that hooks are working again.
2011-04-13--disable-threads fixAndy Wingo1-2/+6
* libguile/threads.c (do_thread_exit_trampoline, on_thread_exit): (scm_i_init_thread_for_guile): Only register and unregister threads with bdw-gc when we are building with threads support. Thanks to Marijn for the report.
2011-04-11Fix fencepost error in bip_seekIan Price2-1/+10
* libguile/r6rs-ports.c (bip_seek): Fix to allow seeking to end of port. * test-suite/tests/r6rs-ports.test ("bytevector input port can seek to very end"): Add tests.
2011-04-11fix assert to return true value.Ian Price2-1/+9
* module/rnrs/base.scm (assert): returns value instead of void. * test-suite/tests/r6rs-base.test ("assert"): add test cases.
2011-04-11Added optional second arg to R6RS log functionIan Price2-0/+25
* module/rnrs/base.scm (log): now takes a base argument, using the change of base formula for logs. * test-suite/tests/r6rs-base.test ("log (2nd arg)"): Add test cases.
2011-04-11fix reader.test for --disable-deprecatedAndy Wingo1-2/+3
* test-suite/tests/reader.test: Fix deprecated tests; begin-deprecated was splicing in expression context before, which is a no-no.