guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. v2.1.0-338-gc33ecf9


From: Mark H Weaver
Subject: [Guile-commits] GNU Guile branch, master, updated. v2.1.0-338-gc33ecf9
Date: Fri, 29 Mar 2013 02:44:40 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=c33ecf96a41979be0af1d56a7e12ad7c1196f12b

The branch, master has been updated
       via  c33ecf96a41979be0af1d56a7e12ad7c1196f12b (commit)
       via  4702deb424633ad02c495c01d950b973c0ead8ea (commit)
       via  465ff50245e0f5deb26612ac7401b51c415deeb0 (commit)
       via  2a7d614cc0bc902895cdb873590e8a24cf680368 (commit)
       via  8d6e3dd83a09f35a18774baa696ba443aa379cbb (commit)
       via  07b390d5827da2f46f57e4650167920fb792ebc9 (commit)
       via  06589f5c229c3ce4dd2cb627c90ef4372dd0a571 (commit)
       via  4a0821a8d5cfff50fef8c119a0d76355b6126009 (commit)
       via  10d278fde5dcd8033fe1209657aa58ce792b9b83 (commit)
      from  26d148066f9cb20e395a7dc4fefdf2e2ef0b2fb0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c33ecf96a41979be0af1d56a7e12ad7c1196f12b
Merge: 26d1480 4702deb
Author: Mark H Weaver <address@hidden>
Date:   Thu Mar 28 22:24:00 2013 -0400

    Merge remote-tracking branch 'origin/stable-2.0'

-----------------------------------------------------------------------

Summary of changes:
 NEWS                                               |   11 +++-
 README                                             |    2 +-
 configure.ac                                       |    8 +++
 doc/ref/api-evaluation.texi                        |   47 ++++++++++++++++++
 doc/ref/srfi-modules.texi                          |   12 ++--
 libguile/generalized-arrays.c                      |    2 +-
 libguile/numbers.c                                 |   31 ++++++++++++-
 .../standalone/test-pthread-create-secondary.c     |   19 +++++---
 test-suite/tests/ports.test                        |   50 ++++++++++---------
 9 files changed, 139 insertions(+), 43 deletions(-)

diff --git a/NEWS b/NEWS
index 80b06fd..92dc19f 100644
--- a/NEWS
+++ b/NEWS
@@ -49,9 +49,9 @@ removed on those plaforms (basically only MinGW).
 
 ** Gnulib update.
 
-Guile's copy of Gnulib was updated to XXX.  The following modules were
-imported from Gnulib: select, times, pipe-posix, fstat, getlogin, and
-poll.
+Guile's copy of Gnulib was updated to v0.0-7865-ga828bb2.  The following
+modules were imported from Gnulib: select, times, pipe-posix, fstat,
+getlogin, and poll.
 
 ** New optimizations.
 
@@ -93,6 +93,11 @@ more information.
 
 ** Update predefined character sets to Unicode 6.2.
 
+** GMP 4.2 or later required
+
+Guile used to require GMP at least version 4.1 (released in May 2002),
+and now requires at least version 4.2 (released in March 2006).
+
 * Manual updates
 
 ** Better SXML documentation.
diff --git a/README b/README
index 31fdb80..480ef66 100644
--- a/README
+++ b/README
@@ -62,7 +62,7 @@ Required External Packages 
================================================
 
 Guile requires the following external packages:
 
-  - GNU MP, at least version 4.1
+  - GNU MP, at least version 4.2
 
     GNU MP is used for bignum arithmetic.  It is available from
     http://gmplib.org/ .
diff --git a/configure.ac b/configure.ac
index 85e3170..e25635b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -872,6 +872,14 @@ if test "x$HAVE_LIBGMP" != "xyes"; then
   AC_MSG_ERROR([GNU MP 4.1 or greater not found, see README])
 fi
 
+dnl `mpz_inits' and `mpz_clears' appeared in GMP 5.0.0.
+save_CPPFLAGS="$CPPFLAGS"
+if test "x$LIBGMP_PREFIX" != "x"; then
+   CPPFLAGS="-I$LIBGMP_PREFIX $CPPFLAGS"
+fi
+AC_CHECK_DECLS([mpz_inits], [], [], [[#include <gmp.h>]])
+CPPFLAGS="$save_CPPFLAGS"
+
 dnl GNU libunistring is checked for by Gnulib's `libunistring' module.
 if test "x$LTLIBUNISTRING" = "x"; then
   AC_MSG_ERROR([GNU libunistring is required, please install it.])
diff --git a/doc/ref/api-evaluation.texi b/doc/ref/api-evaluation.texi
index c4e77a9..7afbcfa 100644
--- a/doc/ref/api-evaluation.texi
+++ b/doc/ref/api-evaluation.texi
@@ -22,6 +22,7 @@ loading, evaluating, and compiling Scheme code at run time.
 * Delayed Evaluation::          Postponing evaluation until it is needed.
 * Local Evaluation::            Evaluation in a local lexical environment.
 * Local Inclusion::             Compile-time inclusion of one file in another.
+* REPL Servers::                Serving a REPL over a socket.
 @end menu
 
 
@@ -1220,6 +1221,52 @@ the source files for a package (as you should!).  It 
makes it possible
 to evaluate an installed file from source, instead of relying on the
 @code{.go} file being up to date.
 
address@hidden REPL Servers
address@hidden REPL Servers
+
address@hidden REPL server
+
+The procedures in this section are provided by
address@hidden
+(use-modules (system repl server))
address@hidden lisp
+
+When an application is written in Guile, it is often convenient to
+allow the user to be able to interact with it by evaluating Scheme
+expressions in a REPL.
+
+The procedures of this module allow you to spawn a @dfn{REPL server},
+which permits interaction over a local or TCP connection.  Guile itself
+uses them internally to implement the @option{--listen} switch,
address@hidden Options}.
+
address@hidden {Scheme Procedure} make-tcp-server-socket [#:host=#f] @
+                          [#:addr] [#:port=37146]
+Return a stream socket bound to a given address @var{addr} and port
+number @var{port}. If the @var{host} is given, and @var{addr} is not,
+then the @var{host} string is converted to an address.  If neither is
+given, we use the loopback address.
address@hidden deffn
+
address@hidden {Scheme Procedure} make-unix-domain-server-socket 
[#:path="/tmp/guile-socket"]
+Return a UNIX domain socket, bound to a given @var{path}.
address@hidden deffn
+
address@hidden {Scheme Procedure} run-server [server-socket]
address@hidden {Scheme Procedure} spawn-server [server-socket]
+Create and run a REPL, making it available over the given
address@hidden  If @var{server-socket} is not provided, it
+defaults to the socket created by calling @code{make-tcp-server-socket}
+with no arguments.
+
address@hidden runs the server in the current thread, whereas
address@hidden runs the server in a new thread.
address@hidden deffn
+
address@hidden {Scheme Procedure} stop-server-and-clients!
+Closes the connection on all running server sockets.
address@hidden deffn
+
 @c Local Variables:
 @c TeX-master: "guile.texi"
 @c End:
diff --git a/doc/ref/srfi-modules.texi b/doc/ref/srfi-modules.texi
index 8bf7c41..365341d 100644
--- a/doc/ref/srfi-modules.texi
+++ b/doc/ref/srfi-modules.texi
@@ -3844,7 +3844,7 @@ again.  SRFI-41 can be made available with:
 
 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 @code{stream-null} or is an object of type
+when forced, is either @var{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,16 +3862,16 @@ stream, and is only forced on demand.
 @subsubsection SRFI-41 Stream Primitives
 
 This library provides eight operators: constructors for
address@hidden and @code{stream-pair}s, type predicates for streams
address@hidden 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.
 
address@hidden {Scheme Variable} stream-null
address@hidden {Scheme Variable} stream-null
 A promise that, when forced, is a single object, distinguishable from
-all other objects, that represents the null stream.  @code{stream-null}
+all other objects, that represents the null stream.  @var{stream-null}
 is immutable and unique.
address@hidden deffn
address@hidden defvr
 
 @deffn {Scheme Syntax} stream-cons object-expr stream-expr
 Creates a newly-allocated stream containing a promise that, when forced,
@@ -4003,7 +4003,7 @@ Returns a newly-allocated stream containing the elements 
from
 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 @code{stream-null}.
+terminated by @var{stream-null}.
 
 It looks like one use of @code{port->stream} would be this:
 
diff --git a/libguile/generalized-arrays.c b/libguile/generalized-arrays.c
index 9382e81..59925a0 100644
--- a/libguile/generalized-arrays.c
+++ b/libguile/generalized-arrays.c
@@ -135,7 +135,7 @@ SCM_DEFINE (scm_array_length, "array-length", 1, 0, 0,
            (SCM array),
            "Return the length of an array: its first dimension.\n"
             "It is an error to ask for the length of an array of rank 0.")
-#define FUNC_NAME s_scm_array_rank
+#define FUNC_NAME s_scm_array_length
 {
   return scm_from_size_t (scm_c_array_length (array));
 }
diff --git a/libguile/numbers.c b/libguile/numbers.c
index 29d2669..d941133 100644
--- a/libguile/numbers.c
+++ b/libguile/numbers.c
@@ -1,4 +1,6 @@
-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005, 2006, 
2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+ *   2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
+ *   2013 Free Software Foundation, Inc.
  *
  * Portions Copyright 1990, 1991, 1992, 1993 by AT&T Bell Laboratories
  * and Bellcore.  See scm_divide.
@@ -56,6 +58,8 @@
 #include <complex.h>
 #endif
 
+#include <stdarg.h>
+
 #include "libguile/_scm.h"
 #include "libguile/feature.h"
 #include "libguile/ports.h"
@@ -96,6 +100,31 @@ typedef scm_t_signed_bits scm_t_inum;
 #define DOUBLE_IS_POSITIVE_INFINITY(x) (isinf(x) && ((x) > 0))
 #define DOUBLE_IS_NEGATIVE_INFINITY(x) (isinf(x) && ((x) < 0))
 
+
+#if ! HAVE_DECL_MPZ_INITS
+
+/* GMP < 5.0.0 lacks `mpz_inits' and `mpz_clears'.  Provide them.  */
+
+#define VARARG_MPZ_ITERATOR(func)              \
+  static void                                  \
+  func ## s (mpz_t x, ...)                     \
+  {                                            \
+    va_list  ap;                               \
+                                               \
+    va_start (ap, x);                          \
+    while (x != NULL)                          \
+      {                                                \
+       func (x);                               \
+       x = va_arg (ap, mpz_ptr);               \
+      }                                                \
+    va_end (ap);                               \
+  }
+
+VARARG_MPZ_ITERATOR (mpz_init)
+VARARG_MPZ_ITERATOR (mpz_clear)
+
+#endif
+
 
 
 /*
diff --git a/test-suite/standalone/test-pthread-create-secondary.c 
b/test-suite/standalone/test-pthread-create-secondary.c
index e145fa5..14ea240 100644
--- a/test-suite/standalone/test-pthread-create-secondary.c
+++ b/test-suite/standalone/test-pthread-create-secondary.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2011, 2013 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -30,15 +30,20 @@
 #include <gc/gc.h>
 
 
-/* Up to GC 7.2alpha5, calling `GC_INIT' from a secondary thread would
+/* Currently, calling `GC_INIT' from a secondary thread is only
+   supported on some systems, notably Linux-based systems (and not on
+   FreeBSD, for instance.)
+
+   Up to GC 7.2alpha5, calling `GC_INIT' from a secondary thread would
    lead to a segfault.  This was fixed in BDW-GC on 2011-04-16 by Ivan
    Maidanski.  See <http://thread.gmane.org/gmane.lisp.guile.bugs/5340>
    for details.  */
 
-#if (GC_VERSION_MAJOR > 7)                                     \
-  || ((GC_VERSION_MAJOR == 7) && (GC_VERSION_MINOR > 2))       \
-  || ((GC_VERSION_MAJOR == 7) && (GC_VERSION_MINOR == 2)       \
-      && (GC_ALPHA_VERSION > 5))
+#if defined __linux__                                          \
+  && (GC_VERSION_MAJOR > 7                                     \
+      || (GC_VERSION_MAJOR == 7 && GC_VERSION_MINOR > 2)       \
+      || (GC_VERSION_MAJOR == 7 && GC_VERSION_MINOR == 2       \
+         && GC_ALPHA_VERSION > 5))
 
 static void *
 do_something (void *arg)
@@ -73,7 +78,7 @@ main (int argc, char *argv[])
 }
 
 
-#else /* GC < 7.2 */
+#else /* Linux && GC < 7.2alpha5 */
 
 int
 main (int argc, char *argv[])
diff --git a/test-suite/tests/ports.test b/test-suite/tests/ports.test
index 3729930..886ab24 100644
--- a/test-suite/tests/ports.test
+++ b/test-suite/tests/ports.test
@@ -2,7 +2,7 @@
 ;;;; Jim Blandy <address@hidden> --- May 1999
 ;;;;
 ;;;;   Copyright (C) 1999, 2001, 2004, 2006, 2007, 2009, 2010,
-;;;;      2011, 2012 Free Software Foundation, Inc.
+;;;;      2011, 2012, 2013 Free Software Foundation, Inc.
 ;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -1162,33 +1162,35 @@
 
 (with-test-prefix "%file-port-name-canonicalization"
 
-  (pass-if "absolute file name & empty %load-path entry"
+  (pass-if-equal "absolute file name & empty %load-path entry" "/dev/null"
     ;; In Guile 2.0.5 and earlier, this would return "dev/null" instead
     ;; of "/dev/null".  See
     ;; <http://lists.gnu.org/archive/html/guile-devel/2012-05/msg00059.html>
     ;; for a discussion.
-    (equal? "/dev/null"
-            (with-load-path (cons "" (delete "/" %load-path))
-              (with-fluids ((%file-port-name-canonicalization 'relative))
-                (port-filename (open-input-file "/dev/null"))))))
-
-  (pass-if "relative canonicalization with /"
-    (equal? "dev/null"
-            (with-load-path (cons "/" %load-path)
-              (with-fluids ((%file-port-name-canonicalization 'relative))
-                (port-filename (open-input-file "/dev/null"))))))
-
-  (pass-if "relative canonicalization from ice-9"
-    (equal? "ice-9/q.scm"
-            (with-fluids ((%file-port-name-canonicalization 'relative))
-              (port-filename
-               (open-input-file (%search-load-path "ice-9/q.scm"))))))
-
-  (pass-if "absolute canonicalization from ice-9"
-    (equal? (string-append (assoc-ref %guile-build-info 'top_srcdir)
-                           "/module/ice-9/q.scm")
-            (with-fluids ((%file-port-name-canonicalization 'absolute))
-              (port-filename (open-input-file (%search-load-path 
"ice-9/q.scm")))))))
+    (with-load-path (cons "" (delete "/" %load-path))
+      (with-fluids ((%file-port-name-canonicalization 'relative))
+        (port-filename (open-input-file "/dev/null")))))
+
+  (pass-if-equal "relative canonicalization with /" "dev/null"
+    (with-load-path (cons "/" %load-path)
+      (with-fluids ((%file-port-name-canonicalization 'relative))
+        (port-filename (open-input-file "/dev/null")))))
+
+  (pass-if-equal "relative canonicalization from ice-9" "ice-9/q.scm"
+    ;; If an entry in %LOAD-PATH is not canonical, then
+    ;; `scm_i_relativize_path' is unable to do its job.
+    (if (equal? (map canonicalize-path %load-path) %load-path)
+        (with-fluids ((%file-port-name-canonicalization 'relative))
+          (port-filename
+           (open-input-file (%search-load-path "ice-9/q.scm"))))
+        (throw 'unresolved)))
+
+  (pass-if-equal "absolute canonicalization from ice-9"
+      (canonicalize-path
+       (string-append (assoc-ref %guile-build-info 'top_srcdir)
+                      "/module/ice-9/q.scm"))
+    (with-fluids ((%file-port-name-canonicalization 'absolute))
+      (port-filename (open-input-file (%search-load-path "ice-9/q.scm"))))))
 
 (delete-file (test-file))
 


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]