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

11966 commits

Author SHA1 Message Date
Ludovic Courtès
981ff600e8 Fix makefile indentation.
* benchmark-suite/Makefile.am, libguile/Makefile.am, meta/Makefile.am:
  Use TAB instead of 8 spaces...

* .x-sc_makefile_check: New file.
2009-11-24 23:41:08 +01:00
Ludovic Courtès
feef98f203 Properly quote the first argument to `AC_DEFINE{,_UNQUOTED}'.
* acinclude.m4, configure.ac, examples/compat/acinclude.m4: Properly
  quote the first argument for `AC_DEFINE' and `AC_DEFINE_UNQUOTED'.

* .x-sc_m4_quote_check: New file.
2009-11-24 23:38:26 +01:00
Ludovic Courtès
48300bace8 Add `cfg.mk', for use by the top-level GNUmakefile.
* cfg.mk: New file, with 1.9.5 `NEWS' hash.
2009-11-24 23:23:28 +01:00
Ludovic Courtès
c4e843571f "filesystem" -> "file system"
* doc/ref/misc-modules.texi, doc/sources/unix.texi,
  module/ice-9/ftw.scm: Replace "filesystem" by "file system".
2009-11-24 23:16:08 +01:00
Ludovic Courtès
114bc68ac9 Don't rely on `HAVE_' macros in public header "tags.h".
* configure.ac: Check for `intptr_t' and `uintptr_t'.  Substitute
  `SCM_I_GSC_T_INTPTR' and `SCM_I_GSC_T_UINPTR'.

* libguile/__scm.h (SCM_T_UINTPTR_MAX, SCM_T_INTPTR_MIN,
  SCM_T_INTPTR_MAX): New macros.

* libguile/_scm.h (SIZEOF_SCM_T_BITS): New macro.

* libguile/gen-scmconfig.c (main): Produce typedefs for `scm_t_intptr'
  and `scm_t_uintptr'.

* libguile/gen-scmconfig.h.in (SCM_I_GSC_T_INTPTR, SCM_I_GSC_T_UINPTR):
  New macros.

* libguile/tags.h: Don't check for `HAVE_INTTYPES_H' and
  `HAVE_STDINT_H'; don't include <inttypes.h> nor <stdint.h>.
  (scm_t_signed_bits, scm_t_bits): Define unconditionally as aliases for
  `scm_t_intptr' and `scm_t_uintptr', respectively.
  (SCM_T_SIGNED_BITS_MAX, SCM_T_SIGNED_BITS_MIN, SCM_T_BITS_MAX):
  Likewise.
  (SIZEOF_SCM_T_BITS): Remove.
2009-11-24 23:12:03 +01:00
Ludovic Courtès
45f1c66749 Remove unused, non-prefixed macros.
* libguile/__scm.h (BIGNUMS, TICKS): Remove.
2009-11-24 22:25:49 +01:00
Ludovic Courtès
b3eba3b2ff Update to Gnulib v0.0-2923-g6575ab5. 2009-11-24 22:11:28 +01:00
Ludovic Courtès
6b1bc6e56a Really disable thread-local storage on NetBSD 5.0.
* acinclude.m4 (GUILE_THREAD_LOCAL_STORAGE): Adjust to match actual
  NetBSD 5 triplet, `x86_64-unknown-netbsd5.0.' (note the final dot).
2009-11-24 22:07:16 +01:00
Ludovic Courtès
81adf76a26 Fix compilation `--without-threads'.
* configure.ac: For `--without-threads' and `--with-threads=null', set
  `SCM_I_GSC_HAVE_THREAD_STORAGE_CLASS=0'.  This fixes compilation of
  `gen-scmconfig.c' in these cases.
2009-11-24 22:06:08 +01:00
Ludovic Courtès
c3b16a5d8e Use Gnulib's `duplocale' module.
* libguile/i18n.c (scm_make_locale): Simplify global locale handling,
  using duplocale(3) for all kinds of locales.
  (scm_init_i18n): Comment on why we don't just use `LC_GLOBAL_LOCALE'
  for `global_locale_smob'.

* m4/gnulib-cache.m4: Add `duplocale'.
2009-11-23 23:51:02 +01:00
Ludovic Courtès
414e44412c Use Gnulib's `locale' module.
* configure.ac: Remove test for <xlocale.h>.

* libguile/i18n.c: Remove conditional <xlocale.h> inclusion on
  `HAVE_XLOCALE_H'.

* m4/gnulib-cache.m4: Add `locale' module.
2009-11-23 23:51:02 +01:00
Ludovic Courtès
a270e133f3 Correct manual wrt. encoding names.
* doc/ref/api-evaluation.texi (Character Encoding of Source Files):
  Don't suggest `latin1' as a good encoding name since Emacs cannot deal
  with it.

* libguile/read.c (scm_file_encoding): Fix "Emacs" spelling.
2009-11-23 23:51:02 +01:00
Andy Wingo
9a5ee564fa better printing of procedures with keyword arguments
* module/system/vm/program.scm (arguments->lambda-list): Print keyword
  arguments more sensibly.
2009-11-21 19:03:22 +01:00
Andy Wingo
d20eac70f8 fix version-etc for older autoconf
* lib/version-etc.c: Don't reference the undefined PACKAGE if
  PACKAGE_URL is undefined. Probably should go upstream.
2009-11-21 19:03:22 +01:00
Ludovic Courtès
850a4c8f5f autogen.sh: Don't presume /usr/bin/m4.
* autogen.sh: Don't presume /usr/bin/m4.
2009-11-18 15:32:03 +01:00
Ludovic Courtès
91cbeffc87 Work around path name length limitations in `socket.test'.
* test-suite/tests/socket.test (%tmpdir, %curdir): New variables.
  Chdir to %TMPDIR.  Switch back to %CURDIR at the end.
  (temp-file-path): Return a base file name, not an absolute path.
2009-11-18 15:28:56 +01:00
Ludovic Courtès
0c1eb9b68c Remove conflicting definition of $PACKAGE from `GUILE-VERSION'.
This obviates the need for the previous commit,
53da7372be.

* GUILE-VERSION (VERSION, PACKAGE): Remove.  The latter was conflicting
  with Automake's definition, which is "guile", not "GNU Guile".

* Makefile.am (distdir): Remove.

* configure.ac: Hardcode the package name passed to `AC_INIT'.
  (pkgdatadir, pkgincludedir, pkglibdir, pkglibexecdir): Remove.
2009-11-18 14:59:33 +01:00
Ludovic Courtès
53da7372be Fix $(pkgdatadir) & co. so they refer to $(PACKAGE_TARNAME), not $(PACKAGE).
This fixes a regression introduced in
4f02b98d0e ("Use Gnulib's
`version-etc-fsf' for `--version' and `--help' output."), which led
$(pkgdatadir) & co. to contain the string "GNU Guile" instead of
"guile".

* configure.ac (pkgdatadir, pkgincludedir, pkglibdir, pkglibexecdir):
  New variables.
2009-11-18 12:13:45 +01:00
Ludovic Courtès
e17b58c22e Bump version number for 1.9.5.
* GUILE-VERSION (GUILE_MICRO_VERSION): Increment.
2009-11-17 23:42:42 +01:00
Ludovic Courtès
13922e3fa9 Don't use `-Werror' by default.
* configure.ac (GUILE_ERROR_ON_WARNING): Default to "no".

* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.

* NEWS: Update.
2009-11-17 23:42:40 +01:00
Ludovic Courtès
587cd3bfc9 Fix copyright headers.
* module/system/vm/debug.scm, module/system/vm/frame.scm,
  module/system/vm/vm.scm: Switch to LGPLv3+.
2009-11-17 23:42:38 +01:00
Ludovic Courtès
c291b58835 Fix stylistic issues revealed by "make syntax-check".
* libguile/gc-malloc.c (scm_must_free): Remove unnecessary `if' before
  `free ()'.

* libguile/stime.c (scm_localtime, scm_mktime): Likewise.

* libguile/eval.i.c (ceval): Don't cast the result of alloca(3).

* libguile/i18n.c (SCM_STRING_TO_U32_BUF): Likewise.

* test-suite/standalone/test-unwind.c: Likewise.

* libguile/strings.c (scm_i_deprecated_string_chars): Don't end error
  message in period.
2009-11-17 23:42:36 +01:00
Ludovic Courtès
c84bdaf6b4 Add Gnulib maintainer modules.
* m4/gnulib-cache.m4: Add `announce-gen', `gendocs', `gitlog-to-changelog',
  `gnupload', `gnu-web-doc-update', and `maintainer-makefile'.

* .gnuploadrc, .x-sc_GPL_version, .x-sc_avoid_if_before_free,
  .x-sc_error_message_period, .x-sc_cast_of_alloca_return_value,
  .x-sc_cast_of_argument_to_free, .x-sc_error_message_uppercase,
  .x-sc_error_message_warn_fatal: New files.
2009-11-17 23:42:32 +01:00
Ludovic Courtès
4f02b98d0e Use Gnulib's version-etc-fsf' for --version' and `--help' output.
* m4/gnulib-cache.m4: Add `version-etc-fsf'.  Switch to LGPLv3+.

* GUILE-VERSION (PACKAGE): Change to "GNU Guile".

* Makefile.am (distdir): New variable.

* libguile/script.c (scm_shell_usage): Improve formatting.  Use
  `emit_bug_reporting_address ()'.
  (scm_compile_shell_switches): Use `version_etc ()'.
2009-11-17 23:42:30 +01:00
Ludovic Courtès
8bcecbd302 Build the C code with additional GCC warnings.
* configure.ac (POTENTIAL_GCC_CFLAGS): Add
  `-Wdeclaration-after-statement -Wundef -Wswitch-enum'.
2009-11-17 23:42:28 +01:00
Ludovic Courtès
56a3dcd431 Remove references to undefined macros.
The intent is to allow compilation with `-Wundef', which in turn should
make it easier to catch erroneous uses of nonexistent macros.

* libguile/__scm.h: Don't assume `BUILDING_LIBGUILE' is defined.

* libguile/conv-uinteger.i.c (SCM_TO_TYPE_PROTO): Remove unneeded CPP
  conditional on `TYPE_MIN == 0'.

* libguile/fports.c: Check for the definition of `HAVE_CHSIZE' and
  `HAVE_FTRUNCATE', not for their value.

* libguile/ports.c: Likewise.

* libguile/numbers.c (guile_ieee_init): Likewise with `HAVE_DINFINITY'
  and `HAVE_DQNAN'.

* test-suite/standalone/test-conversion.c (ieee_init): Likewise.

* libguile/strings.c: Likewise with `SCM_STRING_LENGTH_HISTOGRAM'.

* libguile/strings.h: Likewise.

* libguile/tags.h: Likewise with `HAVE_INTTYPES_H' and `HAVE_STDINT_H'.

* libguile/threads.c: Likewise with `HAVE_PTHREAD_GET_STACKADDR_NP'.

* libguile/vm-engine.c (VM_NAME): Likewise with `VM_CHECK_IP'.

* libguile/gen-scmconfig.c (main): Use "#ifdef HAVE_", not "#if HAVE_".

* libguile/socket.c (scm_setsockopt): Likewise.
2009-11-17 23:42:22 +01:00
Ludovic Courtès
c32b39b9cb Remove now unneeded `putenv.c'.
* libguile/Makefile.am (EXTRA_libguile_la_SOURCES): Remove `putenv.c'.

* libguile/putenv.c: Remove.
2009-11-17 23:32:54 +01:00
Ludovic Courtès
62aea16669 Remove `qt/'. 2009-11-17 23:32:50 +01:00
Ludovic Courtès
7f991c7d32 Fix C99-style declarations after statements.
* libguile/eval.i.c (ceval): Move declarations before statements.

* libguile/read.c (scm_read_extended_symbol): Likewise.

* libguile/struct.c (scm_make_struct_layout): Likewise.

* libguile/threads.c (fat_mutex_unlock): Likewise.

* libguile/vm-i-system.c (br_if_nargs_ne, br_if_nargs_lt): Likewise.

* libguile/vm.c (make_vm): Likewise.
2009-11-17 23:13:58 +01:00
Ludovic Courtès
6bd210e090 Remove deprecated guardian code.
* libguile/guardians.c (guardian_apply): Remove `#if ENABLE_DEPRECATED'
  section since it was never compiled in, not even in 1.8.
  (scm_init_guardians): Likewise.
2009-11-17 23:13:58 +01:00
Ludovic Courtès
f29ded4b67 Use Gnulib's `warning' module.
* m4/gnulib-cache.m4: Add `warnings'.

* configure.ac: Use `gl_WARN_ADD' to check whether compiler flags are
  supported.

* libguile/Makefile.am (libguile_la_LIBADD): Add $(LTLIBICONV).
  (libguile_la_LDFLAGS): Add $(INET_NTOP_LIB) $(INET_PTON_LIB).
2009-11-17 23:13:58 +01:00
Andy Wingo
e614d37577 fold 1.9.5 NEWS items into the main text
* NEWS: Fold 1.9.5 things into the main text.
2009-11-17 22:04:48 +01:00
Andy Wingo
6cf430473a Update NEWS.
* NEWS: Update for 1.9.5. Still needs these entries to be folded into
  the main section though.
2009-11-17 21:51:56 +01:00
Andy Wingo
ff74e44ecb with a rest arg, allow for keywords anywhere
* libguile/vm-i-system.c (br-if-nargs-gt): Fix variable declaration
  placement.
  (bind-kwargs): Patch mostly by Ludovic: it seems that in the mode in
  which we have rest args, the keywords can appear anywhere. Bummer.
  Change to allow for this.

* module/ice-9/optargs.scm (parse-lambda-case): Same, add a
  permissive-keys clause that handles the case in which there's a rest
  argument.
2009-11-16 22:32:54 +01:00
Ken Raeburn
222831b443 SCM_DEBUG fix: Don't apply SCM_CAR to non-pairs when walking argument
lists in method cache matching.

* libguile/goops.c (scm_mcache_lookup_cmethod): Don't apply SCM_CAR to
  non-pairs when walking argument lists in method cache matching.
  Don't check for CLASSP or symbol in the car slot, since the end of
  the specifier list is a non-pair.  Update comments to reflect new
  structure of method cache entry.
* module/oops/goops/dispatch.scm: Update comments here too.
2009-11-16 14:24:32 -05:00
Ludovic Courtès
d02f313714 Add `iconv_open-solaris.h' to remove dependency on gperf.
* lib/iconv_open-solaris.h: New file.
2009-11-16 14:57:01 +01:00
Ludovic Courtès
1119e49368 Use Gnulib's `alignof' module.
* m4/gnulib-cache.m4: Use `alignof'.

* libguile/objcodes.c (scm_c_make_objcode_slice): Use `alignof_type'.
2009-11-16 09:23:47 +01:00
Ludovic Courtès
3452e6667f Deprecate inet-ntoa' and inet-aton'.
Suggested by Bruno Haible.

* libguile/inet_aton.c: Remove.

* libguile/Makefile.am (EXTRA_libguile_la_SOURCES): Remove
  `inet_aton.c'.

* libguile/deprecated.c (scm_inet_aton, scm_inet_ntoa): New functions.

* libguile/deprecated.h: Update accordingly.

* libguile/socket.c (scm_inet_aton, scm_inet_ntoa): Remove.

* doc/ref/posix.texi (Network Address Conversion): Mark `inet-ntoa' and
  `inet-aton' as deprecated.
2009-11-16 09:23:47 +01:00
Ludovic Courtès
8912421cf3 Use Gnulib's inet_ntop' and inet_pton' modules.
* m4/gnulib-cache.m4: Add `inet_ntop' and `inet_pton'.

* configure.ac: Don't check for `inet_ntop' and `inet_pton'.

* libguile/socket.c (scm_inet_pton, scm_inet_ntop): Compile regardless
  of `HAVE_INET_PTON' and `HAVE_INET_NTOP' respectively.

* libguile/filesys.c: Use <stdlib.h> instead of <canonicalize.h>.
2009-11-16 09:23:46 +01:00
Ludovic Courtès
3fe87cf7af Re-add an indirection in bytevectors.
The intent is to allow for mmap(3) bindings and to actually reuse
user-provided buffers in `scm_c_take_bytevector ()'.

* libguile/bytevectors.h (SCM_BYTEVECTOR_HEADER_SIZE): Increment.
  (SCM_BYTEVECTOR_CONTENTS): Take the pointer from the second word.
  (SCM_BYTEVECTOR_CONTIGUOUS_P): New macro.
  (SCM_BYTEVECTOR_ELEMENT_TYPE): Adjust to live alongside the CONTIGUOUS
  flag.

* libguile/bytevectors.c (SCM_BYTEVECTOR_SET_CONTENTS,
  SCM_BYTEVECTOR_SET_CONTIGUOUS_P): New macros.
  (SCM_BYTEVECTOR_SET_ELEMENT_TYPE): Adjust.
  (SCM_BYTEVECTOR_TYPED_LENGTH): Properly parenthesize.
  (make_bytevector): Adjust to new bytevector header.
  (make_bytevector_from_buffer): Reuse CONTENTS.
  (scm_c_shrink_bytevector): Differentiate between contiguous and
  non-contiguous bytevectors.
2009-11-16 09:23:45 +01:00
Ludovic Courtès
c4daa51910 Remove unused internal bytevector functions.
* libguile/bytevectors.c (scm_i_make_typed_bytevector,
  scm_c_take_typed_bytevector): Remove.

* libguile/bytevectors.h: Adjust accordingly.
2009-11-16 09:23:45 +01:00
Ludovic Courtès
64e3a89c35 Run the GC and retry open-file' when getting EMFILE'.
* libguile/fports.c (scm_open_file): Run the GC and retry when getting
  `EMFILE'.
2009-11-16 09:23:45 +01:00
Ludovic Courtès
4c7b997519 Improve documentation of supported encoding names.
* doc/ref/api-evaluation.texi (Character Encoding of Source Files):
  Mention IANA as the list of supported character encodings.  Thanks to
  Bruno Haible for pointing this out.

* doc/ref/api-io.texi (Ports): Likewise.  Improve documentation of
  `%default-port-encoding'.
2009-11-16 09:23:45 +01:00
Ken Raeburn
b9fd657add Fix off-by-one error in processing Emacs-style coding declaration.
* libguile/read.c (scm_i_scan_for_encoding): Don't copy the first
  character after the coding declaration into the new string.
2009-11-16 01:10:15 -05:00
Andy Wingo
b10d93309b opcodes for bit twiddling (ash, logand, logior, logxor)
* module/language/tree-il/compile-glil.scm:
* module/language/tree-il/primitives.scm:
* libguile/vm-i-scheme.c (ash, logand, logior, logxor): New opcodes.
2009-11-15 21:03:33 +01:00
Andy Wingo
aec4a84ac8 class-of has an opcode
* libguile/vm-i-scheme.c (class-of): New opcode.
* module/language/tree-il/compile-glil.scm:
* module/oop/goops.scm: Compile class-of into an opcode.
2009-11-15 21:03:33 +01:00
Andy Wingo
b4a595a5d6 faster conditionals
* module/language/tree-il/compile-glil.scm (flatten): Compile `if'
  statements with `eq?' and `null?', and their `not?' variants, into
  more specific bytecode.
2009-11-15 21:03:32 +01:00
Andy Wingo
0e249fd359 fix (apply f) -- without the args list
* module/language/tree-il/primitives.scm (apply): Only inline if we
  actually have an argument to apply.
2009-11-15 21:03:32 +01:00
Andy Wingo
1e2a8edb8b Revert "implement #:predicate" and remove predicate from <lambda-case>
Turns out this was not a very useful idea, and semantically tricky to
boot.

This reverts commit 24bf130fd1, and makes
the following additional changes:

* module/ice-9/optargs.scm (parse-lambda-case, let-optional)
  (let-optional*, let-keywords, let-keywords*):
* module/language/tree-il.scm: (<lambda-case>, parse-tree-il)
  (unparse-tree-il, tree-il->scheme, tree-il-fold,
  make-tree-il-folder)
  (post-order!, pre-order!):
* module/language/tree-il/analyze.scm (analyze-lexicals):
* module/language/tree-il/compile-glil.scm (compile-glil):
* module/language/tree-il/inline.scm (inline!): Remove all traces of
  #:predicate from tree-il.

* module/ice-9/psyntax.scm (build-simple-lambda, build-lambda-case)
  (chi-lambda-case): Adapt to tree-il change.
* module/ice-9/psyntax-pp.scm: Regenerated.

* module/language/brainfuck/compile-tree-il.scm (compile-body):
* module/language/ecmascript/compile-tree-il.scm (comp, comp-body):
* test-suite/tests/tree-il.test: Adapt to tree-il change.

* doc/ref/api-procedures.texi (Case-lambda): Remove mention of
  #:predicate.
2009-11-15 21:02:26 +01:00
Andy Wingo
e161c9f85c actually set all 8 hashsets in classes
* libguile/goops.c (prep_hashsets): Actually set all 8 hashsets. Doh...
2009-11-15 20:28:12 +01:00