guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.6-97-ge8772a


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.6-97-ge8772a9
Date: Fri, 23 Nov 2012 23:24:26 +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=e8772a9edef3fed3c592e61bbde618de197f4b53

The branch, stable-2.0 has been updated
       via  e8772a9edef3fed3c592e61bbde618de197f4b53 (commit)
       via  9ee0455738f90086894d602075915d49a5044fb7 (commit)
       via  5cd10307866e6e6c44cb46b366f71d4118fa6aed (commit)
       via  679a35567dbb0a467e99f19d3f513fac28317f26 (commit)
       via  712ca51ffe731d5b0e4dacb4d343426092df2eb0 (commit)
      from  06906f370f77cbab520ff0d3c47449526934a9c8 (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 e8772a9edef3fed3c592e61bbde618de197f4b53
Author: Ludovic Courtès <address@hidden>
Date:   Sat Nov 24 00:22:20 2012 +0100

    Augment `.dir-locals.el'.
    
    * .dir-locals.el: Add more `scheme-indent-function' rules.

commit 9ee0455738f90086894d602075915d49a5044fb7
Author: Ludovic Courtès <address@hidden>
Date:   Sat Nov 24 00:16:14 2012 +0100

    Turn on the `case' warnings in auto-compilation.
    
    * module/ice-9/boot-9.scm (%auto-compilation-options): Add
      `duplicate-case-datum' and `bad-case-datum'.

commit 5cd10307866e6e6c44cb46b366f71d4118fa6aed
Author: Ludovic Courtès <address@hidden>
Date:   Fri Nov 23 23:56:01 2012 +0100

    Add tests for `-Wduplicate-case-datum' and `-Wbad-case-datum'.
    
    * test-suite/tests/tree-il.test (%opts-w-duplicate-case-datum,
      %opts-w-bad-case-datum): New variables.
      ("warnings")["duplicate-case-datum", "bad-case-datum"]: New tests.

commit 679a35567dbb0a467e99f19d3f513fac28317f26
Author: Ludovic Courtès <address@hidden>
Date:   Fri Nov 23 23:41:32 2012 +0100

    doc: Mention the `duplicate-case-datum' and `bad-case-datum' warnings.
    
    * doc/ref/api-evaluation.texi (Compilation): List the
      `duplicate-case-datum' and `bad-case-datum' warnings.

commit 712ca51ffe731d5b0e4dacb4d343426092df2eb0
Author: Ludovic Courtès <address@hidden>
Date:   Fri Nov 23 23:37:29 2012 +0100

    Remove reference to `scm_init_popen' when `fork' is unavailable.
    
    Fixes <http://bugs.gnu.org/12477>.
    Reported by lin ray <address@hidden>.
    
    * configure.ac: Define the `HAVE_FORK' Automake conditional.
    * module/Makefile.am (ICE_9_SOURCES): Add `ice-9/popen.scm' only when
      HAVE_FORK.
    * libguile/posix.c (scm_init_posix): Register `scm_init_popen' only when
      HAVE_FORK.

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

Summary of changes:
 .dir-locals.el                |    5 ++-
 configure.ac                  |    3 ++
 doc/ref/api-evaluation.texi   |    3 +-
 libguile/posix.c              |    7 +++-
 module/Makefile.am            |    8 ++++-
 module/ice-9/boot-9.scm       |    3 +-
 test-suite/tests/tree-il.test |   72 ++++++++++++++++++++++++++++++++++++++++-
 7 files changed, 94 insertions(+), 7 deletions(-)

diff --git a/.dir-locals.el b/.dir-locals.el
index 3640530..ce2af7a 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -5,7 +5,10 @@
  (c-mode          . ((c-file-style . "gnu")))
  (scheme-mode
   . ((indent-tabs-mode . nil)
-     (eval . (put 'pass-if-equal 'scheme-indent-function 2))))
+     (eval . (put 'pass-if 'scheme-indent-function 1))
+     (eval . (put 'pass-if-exception 'scheme-indent-function 2))
+     (eval . (put 'pass-if-equal 'scheme-indent-function 2))
+     (eval . (put 'with-test-prefix 'scheme-indent-function 1))))
  (emacs-lisp-mode . ((indent-tabs-mode . nil)))
  (texinfo-mode    . ((indent-tabs-mode . nil)
                      (fill-column . 72))))
diff --git a/configure.ac b/configure.ac
index 52fff69..36103df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -748,11 +748,14 @@ AC_CHECK_HEADERS([assert.h crt_externs.h])
 #   isblank - available as a GNU extension or in C99
 #   _NSGetEnviron - Darwin specific
 #   strcoll_l, newlocale - GNU extensions (glibc), also available on Darwin
+#   fork - unavailable on Windows
 #   utimensat: posix.1-2008
 #   sched_getaffinity, sched_setaffinity: GNU extensions (glibc)
 #
 AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clog clog10 ctermid fesetround 
ftime ftruncate fchown fchmod getcwd geteuid getsid gettimeofday gmtime_r ioctl 
lstat mkdir mknod nice pipe _pipe poll readdir_r readdir64_r readlink rename 
rmdir select setegid seteuid setlocale setpgid setsid sigaction siginterrupt 
stat64 strftime strptime symlink sync sysconf tcgetpgrp tcsetpgrp times uname 
waitpid strdup system usleep atexit on_exit chown link fcntl ttyname getpwent 
getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp index 
bcopy memcpy rindex truncate unsetenv isblank _NSGetEnviron strcoll strcoll_l 
newlocale utimensat sched_getaffinity sched_setaffinity])
 
+AM_CONDITIONAL([HAVE_FORK], [test "x$ac_cv_func_fork" = "xyes"])
+
 # Reasons for testing:
 #   netdb.h - not in mingw
 #   sys/param.h - not in mingw
diff --git a/doc/ref/api-evaluation.texi b/doc/ref/api-evaluation.texi
index c471f64..37e41e1 100644
--- a/doc/ref/api-evaluation.texi
+++ b/doc/ref/api-evaluation.texi
@@ -661,7 +661,8 @@ name is as for @code{compile-file} (see below).
 Emit warnings of type @var{warning}; use @code{--warn=help} for a list
 of available warnings and their description.  Currently recognized
 warnings include @code{unused-variable}, @code{unused-toplevel},
address@hidden, @code{arity-mismatch}, and @code{format}.
address@hidden, @code{arity-mismatch}, @code{format},
address@hidden, and @code{bad-case-datum}.
 
 @item -f @var{lang}
 @itemx address@hidden
diff --git a/libguile/posix.c b/libguile/posix.c
index 4f8b8ac..ce64256 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -1,5 +1,6 @@
-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2005, 
2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
- * 
+/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+ *   2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 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
  * as published by the Free Software Foundation; either version 3 of
@@ -2375,10 +2376,12 @@ scm_init_posix ()
 #include "libguile/cpp-SIG.c"
 #include "libguile/posix.x"
 
+#ifdef HAVE_FORK
   scm_c_register_extension ("libguile-" SCM_EFFECTIVE_VERSION,
                             "scm_init_popen",
                            (scm_t_extension_init_func) scm_init_popen,
                            NULL);
+#endif /* HAVE_FORK */
 }
 
 /*
diff --git a/module/Makefile.am b/module/Makefile.am
index 44af07f..3d3eae3 100644
--- a/module/Makefile.am
+++ b/module/Makefile.am
@@ -220,7 +220,6 @@ ICE_9_SOURCES = \
   ice-9/optargs.scm \
   ice-9/poe.scm \
   ice-9/poll.scm \
-  ice-9/popen.scm \
   ice-9/posix.scm \
   ice-9/q.scm \
   ice-9/rdelim.scm \
@@ -252,6 +251,13 @@ ICE_9_SOURCES = \
   ice-9/serialize.scm \
   ice-9/local-eval.scm
 
+if HAVE_FORK
+
+# This functionality is missing on systems without `fork'---i.e., Windows.
+ICE_9_SOURCES += ice-9/popen.scm
+
+endif HAVE_FORK
+
 SRFI_SOURCES = \
   srfi/srfi-2.scm \
   srfi/srfi-4.scm \
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index 4b111aa..f097a69 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -3565,7 +3565,8 @@ module '(ice-9 q) '(make-q q-length))}."
 
 (define %auto-compilation-options
   ;; Default `compile-file' option when auto-compiling.
-  '(#:warnings (unbound-variable arity-mismatch format)))
+  '(#:warnings (unbound-variable arity-mismatch format
+                duplicate-case-datum bad-case-datum)))
 
 (define* (load-in-vicinity dir path #:optional reader)
   (define (canonical->suffix canon)
diff --git a/test-suite/tests/tree-il.test b/test-suite/tests/tree-il.test
index 1df72e8..68dfc32 100644
--- a/test-suite/tests/tree-il.test
+++ b/test-suite/tests/tree-il.test
@@ -776,6 +776,12 @@
 (define %opts-w-format
   '(#:warnings (format)))
 
+(define %opts-w-duplicate-case-datum
+  '(#:warnings (duplicate-case-datum)))
+
+(define %opts-w-bad-case-datum
+  '(#:warnings (bad-case-datum)))
+
 
 (with-test-prefix "warnings"
 
@@ -1780,7 +1786,71 @@
                               #:opts %opts-w-format
                               #:to 'assembly)))))
            (and (= (length w) 1)
-                (number? (string-contains (car w) "unsupported format 
option"))))))))
+                (number? (string-contains (car w) "unsupported format 
option")))))))
+
+   (with-test-prefix "duplicate-case-datum"
+
+     (pass-if "quiet"
+       (null? (call-with-warnings
+                (lambda ()
+                  (compile '(case x ((1) 'one) ((2) 'two))
+                           #:opts %opts-w-duplicate-case-datum
+                           #:to 'assembly)))))
+
+     (pass-if "one duplicate"
+       (let ((w (call-with-warnings
+                  (lambda ()
+                    (compile '(case x
+                                ((1) 'one)
+                                ((2) 'two)
+                                ((1) 'one-again))
+                             #:opts %opts-w-duplicate-case-datum
+                             #:to 'assembly)))))
+         (and (= (length w) 1)
+              (number? (string-contains (car w) "duplicate")))))
+
+     (pass-if "one duplicate"
+       (let ((w (call-with-warnings
+                  (lambda ()
+                    (compile '(case x
+                                ((1 2 3) 'a)
+                                ((1)     'one))
+                             #:opts %opts-w-duplicate-case-datum
+                             #:to 'assembly)))))
+         (and (= (length w) 1)
+              (number? (string-contains (car w) "duplicate"))))))
+
+   (with-test-prefix "bad-case-datum"
+
+     (pass-if "quiet"
+       (null? (call-with-warnings
+                (lambda ()
+                  (compile '(case x ((1) 'one) ((2) 'two))
+                           #:opts %opts-w-bad-case-datum
+                           #:to 'assembly)))))
+
+     (pass-if "not eqv?"
+       (let ((w (call-with-warnings
+                  (lambda ()
+                    (compile '(case x
+                                ((1)     'one)
+                                (("bad") 'bad))
+                             #:opts %opts-w-bad-case-datum
+                             #:to 'assembly)))))
+         (and (= (length w) 1)
+              (number? (string-contains (car w)
+                                        "cannot be meaningfully compared")))))
+
+     (pass-if "one clause element not eqv?"
+       (let ((w (call-with-warnings
+                  (lambda ()
+                    (compile '(case x
+                                ((1 (2) 3) 'a))
+                             #:opts %opts-w-duplicate-case-datum
+                             #:to 'assembly)))))
+         (and (= (length w) 1)
+              (number? (string-contains (car w)
+                                        "cannot be meaningfully 
compared")))))))
 
 ;; Local Variables:
 ;; eval: (put 'pass-if-primitives-resolved 'scheme-indent-function 1)


hooks/post-receive
-- 
GNU Guile



reply via email to

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