* 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.
* 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.
* 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.
* 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'.
* 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.
* 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.
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.
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.
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.
* 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.
* 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.
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.
* 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>.
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.
* 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'.
* module/language/tree-il/compile-glil.scm (flatten): Compile `if'
statements with `eq?' and `null?', and their `not?' variants, into
more specific bytecode.
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.