summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* fix free-id=? for module-bound keywordslexical-literalsAndy Wingo2011-04-292-9865/+8183
| | | | | | | | | | * module/ice-9/psyntax.scm (free-id=?): For identifiers that are resolved to the toplevel, check that the variables that they would resolve to are equal, instead of simply checking that the symbolic identifier names are equal. Allows keywords to be bound, renamed, exported, excluded, etc. * module/ice-9/psyntax-pp.scm: Regenerate.
* eval-when matches situations symbolicallyAndy Wingo2011-04-291-10/+11
| | | | | | * module/ice-9/psyntax.scm (chi-when-list): Just match symbolically instead of lexically, so as not to tie the meaning of eval-when to the bindings of eval, load, compile, and expand.
* oop goops commentAndy Wingo2011-04-291-1/+2
| | | | | * module/oop/goops.scm: Add a note about the need to deprecate min-fixnum and max-fixnum.
* psyntax simplificationAndy Wingo2011-04-291-1/+2
| | | | | * module/ice-9/psyntax.scm (id-var-name): Just rely on multiple-values truncation.
* MV truncation in the boot evaluatorAndy Wingo2011-04-291-27/+58
| | | | | | | | | | * libguile/eval.c (truncate_values): New helper. (EVAL1): New macro, does an eval then truncates the values. (eval, prepare_boot_closure_env_for_apply) (prepare_boot_closure_env_for_eval): Use EVAL1 in appropriate places to get multiple-values truncation even here in the boot evaluator. eval.c fixen
* latin1 strings in vm error messagesAndy Wingo2011-04-291-17/+17
| | | | | * libguile/vm-engine.c: Use latin1 strings here for the string literals.
* check for iconveh values at configure-timeAndy Wingo2011-04-284-12/+76
| | | | | | | | | | | | | | | * configure.ac: Check for the iconveh values here, instead of relying on gen-scmconfig to know them. That doesn't work in general because gen-scmconfig runs on the build machine, not the target machine. * libguile/Makefile.am (gen-scmconfig.$(OBJEXT)): Revert rule to the revision before 533d8212. * libguile/gen-scmconfig.h.in (SCM_I_GSC_ICONVEH_ERROR): (SCM_I_GSC_ICONVEH_QUESTION_MARK): (SCM_I_GSC_ICONVEH_ESCAPE_SEQUENCE): * libguile/gen-scmconfig.c: Use configure-time substitutions to set SCM_ICONVEH_ERROR_HANDLER et al.
* -x error message fixAndy Wingo2011-04-281-1/+1
| | | | | * module/ice-9/command-line.scm (compile-shell-switches): Fix error message for -x switch.
* fix double-loading of script in -ds caseAndy Wingo2011-04-281-12/+14
| | | | | * module/ice-9/command-line.scm (compile-shell-switches): In the -ds case, we were erroneously loading the script twice. Fix that.
* fix break exampleAndy Wingo2011-04-281-1/+1
| | | | * doc/ref/api-control.texi (while do): Fix a break example.
* allow while as an expressionAndy Wingo2011-04-283-17/+36
| | | | | | | * module/ice-9/boot-9.scm (while): Specify the return value as #f under normal conditions, #t under (break), and arg... under (break arg...). * test-suite/tests/syntax.test ("while"): Test. * doc/ref/api-control.texi (while do): Document.
* add reset and shiftAndy Wingo2011-04-282-2/+66
| | | | | | | | | | * module/ice-9/control.scm (reset, shift): Add implementations of these operators from Wolfgang J Moeller, derived from implementations by Oleg Kiselyov. (reset*, shift*): Procedural variants. * test-suite/tests/control.test ("shift and reset"): Add tests, originally from Oleg Kiselyov.
* Fix typo in `NEWS'.v2.0.1Ludovic Courtès2011-04-271-1/+1
|
* Bump version number for 2.0.1.Ludovic Courtès2011-04-271-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.
* Update `NEWS'.Ludovic Courtès2011-04-271-3/+7
|
* Keep a 2.0.0-compatible `define-inlinable' macro in (srfi srfi-9).Ludovic Courtès2011-04-271-0/+31
| | | | | | | Partially reverts 165b10ddfaaa8ecc72d45a9be7d29e7537dc2379 and 531c9f1dc51c4801c4d031ee80a31f15285a6b85. * module/srfi/srfi-9.scm (define-inlinable): New macro.
* Document `(ice-9 binary-ports)'.Ludovic Courtès2011-04-272-0/+5
| | | | | | * doc/ref/api-io.texi (R6RS I/O Ports): Mention `(ice-9 binary-ports)'. * NEWS: Update.
* Add tests for UTF-8 ill-formed sequence handling.Ludovic Courtès2011-04-271-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.
* Gracefully handle unterminated UTF-8 sequences instead of hitting an `assert'.Ludovic Courtès2011-04-272-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.
* Add a couple more Unicode I/O tests.Ludovic Courtès2011-04-271-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.
* Rewrite port decoding error tests using a mini DSL.Ludovic Courtès2011-04-271-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'.
* Gracefully handle `setlocale' errors at the REPL.Ludovic Courtès2011-04-271-1/+8
| | | | | * module/ice-9/top-repl.scm (top-repl): Catch exceptions from `setlocale'. Reported by CRLF0710 <crlf0710@gmail.com>.
* Remove the `sizeof (mpz_t)' check.Ludovic Courtès2011-04-261-3/+0
| | | | | * libguile/numbers.c: Remove `sizeof (mpz_t)' check, which wasn't need anymore since `make_bignum' doesn't make any such assumption.
* Use `scm_with_guile' in `test-pthread-create'.Ludovic Courtès2011-04-251-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.)
* Update Gnulib to v0.0-5158-g7d06b32; remove `strcase' and `version-etc-fsf'.Ludovic Courtès2011-04-2564-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>.
* Fix `#ifdef HAVE_CONFIG_H' stanza in some stand-alone tests.Ludovic Courtès2011-04-256-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' (!).
* Compile more file system related procedures when `--disable-posix'.Ludovic Courtès2011-04-251-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.
* Move `{total,current}-processor-count' outside of `posix.c'.Ludovic Courtès2011-04-256-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.
* Make the `sizeof (mpz_t)' check at compile-time.Ludovic Courtès2011-04-252-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)'.
* Add pthread-related tests.Ludovic Courtès2011-04-255-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.
* Make `scm_i_ensure_signal_delivery_thread' call in Guile mode.Ludovic Courtès2011-04-251-4/+4
| | | | | | * libguile/threads.c (on_thread_exit): Move `scm_i_ensure_signal_delivery_thread' call... (do_thread_exit): ... here.
* Make sure binary ports pass `binary-port?' regardless of the locale.Ludovic Courtès2011-04-226-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.
* Turn the libunistring/iconv configure check into a macro.Ludovic Courtès2011-04-222-20/+33
| | | | | | * acinclude.m4 (GUILE_LIBUNISTRING_WITH_ICONV_SUPPORT): New macro. * configure.ac: Use it.
* Fix typo in `configure.ac'.Ludovic Courtès2011-04-221-1/+1
| | | | * configure.ac: Add missing comma in `AC_RUN_IFELSE' invocation.
* Increase the timeout of timing-sensitive thread tests.Ludovic Courtès2011-04-221-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>.
* add test that libunistring was built with iconv supportAndy Wingo2011-04-211-0/+21
| | | | | * configure.ac: Add check that libunistring was built with iconv support. Thanks to Mark Weaver for the debugging and test program.
* Clarify units of string length in decription of scm_from_stringnMark H Weaver2011-04-211-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.
* Clarify the units of returned lengths in string conversion functionsMark H Weaver2011-04-191-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.
* fix pre-GC_set_start_callback compilationAndy Wingo2011-04-151-6/+7
| | | | * libguile/gc.c: Move declaration of run_before_gc_hook up.
* pre-GC_set_start_callback compatibilityAndy Wingo2011-04-153-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.
* weak hash table vacuum on before-gc C hookAndy Wingo2011-04-151-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.
* use gc_start_callback + asyncs for after-gc-hook, instead of finalizersAndy Wingo2011-04-151-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...
* add --fresh-auto-compileAndy Wingo2011-04-156-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.
* Build `filesys.x'.Ludovic Courtès2011-04-151-0/+1
| | | | * libguile/Makefile.am (DOT_X_FILES): Add `filesys.x'.
* Allow compilation with `--disable-posix'.Ludovic Courtès2011-04-159-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'.
* Include <sched.h> in `posix.c'.Ludovic Courtès2011-04-142-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>.
* Add tests for `-Wformat' and gettext.Ludovic Courtès2011-04-141-0/+17
| | | | | * test-suite/tests/tree-il.test ("warnings")["non-literal format string using gettext", "one missing argument, gettext"]: New tests.
* fix analyze.scm literal string warningsAndy Wingo2011-04-141-5/+3
| | | | | * module/language/tree-il/analyze.scm (const-fmt): Return any literal value, not just strings. The string case is checked later.
* fix embarrassing bugs in (ice-9 command-line)Andy Wingo2011-04-141-3/+6
| | | | | * module/ice-9/command-line.scm (compile-shell-switches): Whoops, fix a few cases that forgot to loop back to the beginning.
* guile -v prints LGPLv3+.Andy Wingo2011-04-141-0/+1
| | | | | * module/ice-9/command-line.scm (compile-shell-switches): Though Guile may be distributed under the GPLv3, Guile is actually LGPLv3+.