Merge remote-tracking branch 'origin/stable-2.0'
authorMark H Weaver <mhw@netris.org>
Sun, 31 Mar 2013 02:56:27 +0000 (22:56 -0400)
committerMark H Weaver <mhw@netris.org>
Sun, 31 Mar 2013 02:56:27 +0000 (22:56 -0400)
1  2 
.gitignore
configure.ac
doc/ref/guile-invoke.texi
doc/ref/posix.texi
doc/ref/srfi-modules.texi
libguile/posix.c
m4/gnulib-cache.m4
module/Makefile.am

diff --combined .gitignore
@@@ -66,8 -66,8 +66,8 @@@ guile-procedures.tx
  guile-config/guile-config
  *.go
  TAGS
 -/meta/guile-2.0.pc
 -/meta/guile-2.0-uninstalled.pc
 +/meta/guile-2.2.pc
 +/meta/guile-2.2-uninstalled.pc
  gdb-pre-inst-guile
  cscope.out
  cscope.files
@@@ -152,3 -152,7 +152,7 @@@ INSTAL
  /lib/wctype.h
  /build-aux/ar-lib
  /build-aux/test-driver
+ *.trs
+ /test-suite/standalone/test-smob-mark
+ /test-suite/standalone/test-scm-values
+ /test-suite/standalone/test-scm-to-latin1-string
diff --combined configure.ac
@@@ -29,7 -29,7 +29,7 @@@ Floor, Boston, MA 02110-1301, USA
  AC_PREREQ(2.61)
  
  AC_INIT([GNU Guile],
 -        m4_esyscmd([build-aux/git-version-gen --match v2.0.\* .tarball-version]),
 +        m4_esyscmd([build-aux/git-version-gen --match  v2.\[12\].\* .tarball-version]),
          [bug-guile@gnu.org])
  AC_CONFIG_AUX_DIR([build-aux])
  AC_CONFIG_MACRO_DIR([m4])
@@@ -761,7 -761,8 +761,8 @@@ AC_CHECK_FUNCS([DINFINITY DQNAN cexp ch
    strcoll strcoll_l newlocale utimensat sched_getaffinity             \
    sched_setaffinity sendfile])
  
- AM_CONDITIONAL([HAVE_FORK], [test "x$ac_cv_func_fork" = "xyes"])
+ AM_CONDITIONAL([BUILD_ICE_9_POPEN],
+   [test "x$enable_posix" = "xyes" && test "x$ac_cv_func_fork" = "xyes"])
  
  # Reasons for testing:
  #   netdb.h - not in mingw
@@@ -1241,7 -1242,7 +1242,7 @@@ main (int argc, char **argv
  # Boehm's GC library
  #
  #--------------------------------------------------------------------
 -PKG_CHECK_MODULES([BDW_GC], [bdw-gc])
 +PKG_CHECK_MODULES([BDW_GC], [bdw-gc >= 7.2])
  
  save_LIBS="$LIBS"
  LIBS="$BDW_GC_LIBS $LIBS"
@@@ -1249,11 -1250,10 +1250,11 @@@ CFLAGS="$BDW_GC_CFLAGS $CFLAGS
  
  AC_CHECK_FUNCS([GC_do_blocking GC_call_with_gc_active GC_pthread_exit \
    GC_pthread_cancel GC_allow_register_threads GC_pthread_sigmask      \
 -  GC_set_start_callback GC_get_heap_usage_safe                                \
 -  GC_get_free_space_divisor GC_gcollect_and_unmap GC_get_unmapped_bytes       \
 -  GC_set_finalizer_notifier GC_set_finalize_on_demand                 \
 -  GC_set_all_interior_pointers GC_get_gc_no GC_set_java_finalization])
 +  GC_set_start_callback GC_get_suspend_signal GC_move_disappearing_link       \
 +  GC_get_heap_usage_safe GC_get_free_space_divisor                    \
 +  GC_gcollect_and_unmap GC_get_unmapped_bytes GC_set_finalizer_notifier       \
 +  GC_set_finalize_on_demand GC_set_all_interior_pointers GC_get_gc_no \
 +  GC_set_java_finalization])
  
  # Though the `GC_do_blocking ()' symbol is present in GC 7.1, it is not
  # declared, and has a different type (returning void instead of
@@@ -1302,24 -1302,6 +1303,6 @@@ if test $scm_cv_struct_linger = yes; th
             getsockopt and setsockopt system calls.])
  fi
  
- # On mingw, struct timespec is in <pthread.h>.
- #
- AC_MSG_CHECKING(for struct timespec)
- AC_CACHE_VAL(scm_cv_struct_timespec,
-       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include <time.h>
- #if HAVE_PTHREAD_H
- #include <pthread.h>
- #endif]], [[struct timespec t;  t.tv_nsec = 100]])],
-           [scm_cv_struct_timespec="yes"],
-           [scm_cv_struct_timespec="no"]))
- AC_MSG_RESULT($scm_cv_struct_timespec)
- if test $scm_cv_struct_timespec = yes; then
-   AC_DEFINE([HAVE_STRUCT_TIMESPEC], 1,
-     [Define this if your system defines struct timespec via either <time.h> or <pthread.h>.])
- fi
  #--------------------------------------------------------------------
  #
  # Flags for thread support
@@@ -1654,8 -1636,8 +1637,8 @@@ AC_CONFIG_FILES(
    module/Makefile
  ])
  
 -AC_CONFIG_FILES([meta/guile-2.0.pc])
 -AC_CONFIG_FILES([meta/guile-2.0-uninstalled.pc])
 +AC_CONFIG_FILES([meta/guile-2.2.pc])
 +AC_CONFIG_FILES([meta/guile-2.2-uninstalled.pc])
  
  GUILE_CONFIG_SCRIPT([check-guile])
  GUILE_CONFIG_SCRIPT([benchmark-guile])
@@@ -71,6 -71,9 +71,9 @@@ before any directories in the @env{GUIL
  variable.  Paths added here are @emph{not} in effect during execution of
  the user's @file{.guile} file.
  
+ @item -C @var{directory}
+ Like @option{-L}, but adjusts the load path for @emph{compiled} files.
  @item -x @var{extension}
  Add @var{extension} to the front of Guile's load extension list
  (@pxref{Load Paths, @code{%load-extensions}}).  The specified extensions
@@@ -303,7 -306,9 +306,7 @@@ explicitly enable it by setting the var
  
  Usually, installing the current locale is the right thing to do.  It
  allows Guile to correctly parse and print strings with non-ASCII
 -characters.  However, for compatibility with previous Guile 2.0
 -releases, this option is off by default.  The next stable release series
 -of Guile (the 2.2 series) will install locales by default.
 +characters.  Therefore, this option is on by default.
  
  @item GUILE_STACK_SIZE
  @vindex GUILE_STACK_SIZE
diff --combined doc/ref/posix.texi
@@@ -1823,11 -1823,10 +1823,11 @@@ the integer process ID of the child
  Note that it is unsafe to fork a process that has multiple threads
  running, as only the thread that calls @code{primitive-fork} will
  persist in the child.  Any resources that other threads held, such as
 -locked mutexes or open file descriptors, are lost.  Indeed, @acronym{POSIX}
 -specifies that only async-signal-safe procedures are safe to call after
 -a multithreaded fork, which is a very limited set.  Guile issues a
 -warning if it detects a fork from a multi-threaded program.
 +locked mutexes or open file descriptors, are lost.  Indeed,
 +@acronym{POSIX} specifies that only async-signal-safe procedures are
 +safe to call after a multithreaded fork, which is a very limited set.
 +Guile issues a warning if it detects a fork from a multi-threaded
 +program.
  
  If you are going to @code{exec} soon after forking, the procedures in
  @code{(ice-9 popen)} may be useful to you, as they fork and exec within
@@@ -2189,7 -2188,8 +2189,8 @@@ controlling terminal.  The return valu
  
  The following procedures are similar to the @code{popen} and
  @code{pclose} system routines.  The code is in a separate ``popen''
- module:
+ module@footnote{This module is only available on systems where the
+ @code{fork} feature is provided (@pxref{Common Feature Symbols}).}:
  
  @lisp
  (use-modules (ice-9 popen))
@@@ -177,8 -177,8 +177,8 @@@ how to load it with the Guile mechanism
  @cindex @code{guile-2} SRFI-0 feature
  @cindex portability between 2.0 and older versions
  Likewise, testing the @code{guile-2} feature allows code to be portable
 -between Guile 2.0 and previous versions of Guile.  For instance, it
 -makes it possible to write code that accounts for Guile 2.0's compiler,
 +between Guile 2.@var{x} and previous versions of Guile.  For instance, it
 +makes it possible to write code that accounts for Guile 2.@var{x}'s compiler,
  yet be correctly interpreted on 1.8 and earlier versions:
  
  @example
@@@ -3844,7 -3844,7 +3844,7 @@@ again.  SRFI-41 can be made available w
  
  SRFI-41 Streams are based on two mutually-recursive abstract data types:
  An object of the @code{stream} abstract data type is a promise that,
- when forced, is either @var{stream-null} or is an object of type
+ when forced, is either @code{stream-null} or is an object of type
  @code{stream-pair}.  An object of the @code{stream-pair} abstract data
  type contains a @code{stream-car} and a @code{stream-cdr}, which must be
  a @code{stream}.  The essential feature of streams is the systematic
@@@ -3862,14 -3862,14 +3862,14 @@@ stream, and is only forced on demand
  @subsubsection SRFI-41 Stream Primitives
  
  This library provides eight operators: constructors for
- @var{stream-null} and @code{stream-pair}s, type predicates for streams
+ @code{stream-null} and @code{stream-pair}s, type predicates for streams
  and the two kinds of streams, accessors for both fields of a
  @code{stream-pair}, and a lambda that creates procedures that return
  streams.
  
  @defvr {Scheme Variable} stream-null
  A promise that, when forced, is a single object, distinguishable from
- all other objects, that represents the null stream.  @var{stream-null}
+ all other objects, that represents the null stream.  @code{stream-null}
  is immutable and unique.
  @end defvr
  
@@@ -4003,7 -4003,7 +4003,7 @@@ Returns a newly-allocated stream contai
  Returns a newly-allocated stream containing in its elements the
  characters on the port.  If @var{port} is not given it defaults to the
  current input port.  The returned stream has finite length and is
- terminated by @var{stream-null}.
+ terminated by @code{stream-null}.
  
  It looks like one use of @code{port->stream} would be this:
  
diff --combined libguile/posix.c
@@@ -1225,7 -1225,6 +1225,7 @@@ SCM_DEFINE (scm_fork, "primitive-fork"
  #define FUNC_NAME s_scm_fork
  {
    int pid;
 +  scm_i_finalizer_pre_fork ();
    if (scm_ilength (scm_all_threads ()) != 1)
      /* Other threads may be holding on to resources that Guile needs --
         it is not safe to permit one thread to fork while others are
@@@ -2337,6 -2336,7 +2337,7 @@@ scm_init_posix (
  #include "libguile/posix.x"
  
  #ifdef HAVE_FORK
+   scm_add_feature ("fork");
    scm_c_register_extension ("libguile-" SCM_EFFECTIVE_VERSION,
                              "scm_init_popen",
                            (scm_t_extension_init_func) scm_init_popen,
diff --combined m4/gnulib-cache.m4
@@@ -27,7 -27,7 +27,7 @@@
  
  
  # Specification in the form of a command-line invocation:
- #   gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl=3 --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files accept alignof alloca-opt announce-gen autobuild bind byteswap canonicalize-lgpl ceil clock-time close connect dirfd duplocale environ extensions flock floor fpieee frexp fstat full-read full-write func gendocs getaddrinfo getlogin getpeername getsockname getsockopt git-version-gen gitlog-to-changelog gnu-web-doc-update gnupload havelib iconv_open-utf inet_ntop inet_pton isinf isnan ldexp lib-symbol-versions lib-symbol-visibility libunistring listen localcharset locale log1p maintainer-makefile malloc-gnu malloca nl_langinfo nproc open pipe-posix pipe2 poll putenv recv recvfrom regex rename select send sendto setenv setsockopt shutdown socket stat-time stdlib strftime striconveh string sys_stat times trunc verify vsnprintf warnings wchar
+ #   gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl=3 --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files accept alignof alloca-opt announce-gen autobuild bind byteswap canonicalize-lgpl ceil clock-time close connect dirfd duplocale environ extensions flock floor fpieee frexp fstat full-read full-write func gendocs getaddrinfo getlogin getpeername getsockname getsockopt git-version-gen gitlog-to-changelog gnu-web-doc-update gnupload havelib iconv_open-utf inet_ntop inet_pton isinf isnan ldexp lib-symbol-versions lib-symbol-visibility libunistring listen localcharset locale log1p maintainer-makefile malloc-gnu malloca nl_langinfo nproc open pipe-posix pipe2 poll putenv recv recvfrom regex rename select send sendto setenv setsockopt shutdown socket stat-time stdlib strftime striconveh string sys_stat time times trunc verify vsnprintf warnings wchar
  
  # Specification in the form of a few gnulib-tool.m4 macro invocations:
  gl_LOCAL_DIR([gnulib-local])
@@@ -72,7 -72,6 +72,7 @@@ gl_MODULES(
    inet_pton
    isinf
    isnan
 +  largefile
    ldexp
    lib-symbol-versions
    lib-symbol-visibility
    striconveh
    string
    sys_stat
+   time
    times
    trunc
    verify
diff --combined module/Makefile.am
@@@ -80,14 -80,15 +80,14 @@@ ETAGS_ARGS +=                                      
    ice-9/ChangeLog-2008
  
  ice-9/psyntax-pp.scm.gen:
 -      GUILE_INSTALL_LOCALE=1 GUILE_AUTO_COMPILE=0 \
 -      $(top_builddir_absolute)/meta/guile -s $(srcdir)/ice-9/compile-psyntax.scm \
 +      $(top_builddir_absolute)/meta/guile --no-auto-compile -s $(srcdir)/ice-9/compile-psyntax.scm \
                $(srcdir)/ice-9/psyntax.scm $(srcdir)/ice-9/psyntax-pp.scm
  
  .PHONY: ice-9/psyntax-pp.scm.gen
  
  # Keep this rule in sync with that in `am/guilec'.
  ice-9/psyntax-pp.go: ice-9/psyntax.scm ice-9/psyntax-pp.scm
 -      $(AM_V_GUILEC)GUILE_INSTALL_LOCALE=1 GUILE_AUTO_COMPILE=0       \
 +      $(AM_V_GUILEC)GUILE_AUTO_COMPILE=0                              \
        $(top_builddir)/meta/uninstalled-env                            \
        guild compile --target="$(host)" $(GUILE_WARNINGS)              \
          -L "$(abs_srcdir)" -L "$(abs_builddir)"                       \
@@@ -124,8 -125,7 +124,8 @@@ BYTECODE_LANG_SOURCES =                            
    language/bytecode/spec.scm
  
  OBJCODE_LANG_SOURCES =                                \
 -  language/objcode/spec.scm
 +  language/objcode/spec.scm                   \
 +  language/objcode/elf.scm
  
  VALUE_LANG_SOURCES =                          \
    language/value/spec.scm
@@@ -141,7 -141,6 +141,7 @@@ ECMASCRIPT_LANG_SOURCES =                  
    language/ecmascript/spec.scm
  
  ELISP_LANG_SOURCES =                          \
 +  language/elisp/falias.scm                   \
    language/elisp/lexer.scm                    \
    language/elisp/parser.scm                   \
    language/elisp/bindings.scm                 \
    language/elisp/runtime.scm                  \
    language/elisp/runtime/function-slot.scm    \
    language/elisp/runtime/value-slot.scm               \
 -  language/elisp/runtime/macros.scm           \
 -  language/elisp/runtime/subrs.scm            \
    language/elisp/spec.scm
  
  BRAINFUCK_LANG_SOURCES =                      \
    language/brainfuck/spec.scm
  
  SCRIPTS_SOURCES =                             \
-   scripts/autofrisk.scm                               \
    scripts/compile.scm                         \
    scripts/disassemble.scm                     \
    scripts/display-commentary.scm              \
    scripts/use2dot.scm                         \
    scripts/snarf-check-and-output-texi.scm     \
    scripts/summarize-guile-TODO.scm            \
-   scripts/scan-api.scm                                \
    scripts/api-diff.scm                                \
    scripts/read-rfc822.scm                     \
    scripts/snarf-guile-m4-docs.scm
@@@ -190,6 -189,7 +188,6 @@@ SYSTEM_BASE_SOURCES =                              
    system/base/ck.scm
  
  ICE_9_SOURCES = \
 -  ice-9/r4rs.scm \
    ice-9/r5rs.scm \
    ice-9/deprecated.scm \
    ice-9/and-let-star.scm \
    ice-9/null.scm \
    ice-9/occam-channel.scm \
    ice-9/optargs.scm \
 +  ice-9/peg/simplify-tree.scm \
 +  ice-9/peg/codegen.scm \
 +  ice-9/peg/cache.scm \
 +  ice-9/peg/using-parsers.scm \
 +  ice-9/peg/string-peg.scm \
 +  ice-9/peg.scm \
    ice-9/poe.scm \
    ice-9/poll.scm \
    ice-9/posix.scm \
    ice-9/serialize.scm \
    ice-9/local-eval.scm
  
- if HAVE_FORK
+ if BUILD_ICE_9_POPEN
  
  # This functionality is missing on systems without `fork'---i.e., Windows.
  ICE_9_SOURCES += ice-9/popen.scm
  
- endif HAVE_FORK
+ # These modules rely on (ice-9 popen).
+ SCRIPTS_SOURCES +=                            \
+   scripts/autofrisk.scm                               \
+   scripts/scan-api.scm
+ endif BUILD_ICE_9_POPEN
  
  SRFI_SOURCES = \
    srfi/srfi-2.scm \
@@@ -344,7 -343,6 +347,7 @@@ OOP_SOURCES = 
  SYSTEM_SOURCES =                              \
    system/vm/inspect.scm                               \
    system/vm/coverage.scm                      \
 +  system/vm/elf.scm                           \
    system/vm/frame.scm                         \
    system/vm/instruction.scm                   \
    system/vm/objcode.scm                               \
@@@ -392,9 -390,6 +395,9 @@@ WEB_SOURCES =                                      
  
  EXTRA_DIST += oop/ChangeLog-2008
  
 +ELISP_SOURCES =                                       \
 +    language/elisp/boot.el
 +
  NOCOMP_SOURCES =                              \
    ice-9/match.upstream.scm                    \
    ice-9/psyntax.scm                           \