m4-commit
[Top][All Lists]
Advanced

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

[SCM] GNU M4 source repository branch, master, updated. cvs-readonly-233


From: Eric Blake
Subject: [SCM] GNU M4 source repository branch, master, updated. cvs-readonly-233-g29164ff
Date: Tue, 05 Jan 2010 14:09:45 +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 M4 source repository".

http://git.sv.gnu.org/gitweb/?p=m4.git;a=commitdiff;h=29164ffd1488e4943494d25f79b35836d6b91231

The branch, master has been updated
       via  29164ffd1488e4943494d25f79b35836d6b91231 (commit)
       via  7873c5c3cd64575aec4b69de326aa683309d4ba4 (commit)
      from  f6e75bf0240fbf2b4e7f5dfc7d70de546241bbdd (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 29164ffd1488e4943494d25f79b35836d6b91231
Author: Eric Blake <address@hidden>
Date:   Mon Jan 4 12:02:04 2010 -0700

    Fix testsuite failure on newer glibc.
    
    * tests/testsuite.at (AT_CHECK_M4): Tolerate alternate getopt
    spellings.
    * tests/options.at (deprecated options, unknown option)
    (--debugmode): Adjust expected output accordingly.
    Reported by Ralf Wildenhues.
    
    Signed-off-by: Eric Blake <address@hidden>

commit 7873c5c3cd64575aec4b69de326aa683309d4ba4
Author: Eric Blake <address@hidden>
Date:   Thu Nov 26 12:58:05 2009 -0700

    Update to newer gnulib.
    
    * gnulib: Update.
    * ltdl/m4/gnulib-cache.m4: Import inttypes, setenv, and unsetenv
    modules.
    * modules/m4.c (m4_make_temp): Adjust gen_tempname client.
    * bootstrap (src_modules): Pick up getopt-gnu and its
    dependencies.
    * configure.ac (gl_VERSION_ETC): Support ./configure
    --with-packager.
    (AC_CHECK_FUNCS_ONCE): Rely on gnulib for setenv, unsetenv.
    * ltdl/m4/m4-getopt.m4: Rewrite to match current gnulib.
    * Makefile.am (src/getopt.h): Likewise.
    * modules/stdlib.c (setenv, unsetenv): Rely on gnulib.
    
    Signed-off-by: Eric Blake <address@hidden>

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

Summary of changes:
 ChangeLog               |   27 +++++++++++++++++++++++-
 Makefile.am             |   19 ++++++++++++----
 bootstrap               |   13 ++++++++--
 configure.ac            |    3 +-
 gnulib                  |    2 +-
 ltdl/m4/gnulib-cache.m4 |    5 +++-
 ltdl/m4/m4-getopt.m4    |   53 +++++++---------------------------------------
 modules/m4.c            |    2 +-
 modules/stdlib.c        |   22 +-----------------
 tests/options.at        |    8 +++---
 tests/testsuite.at      |   14 ++++++++++-
 11 files changed, 84 insertions(+), 84 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 21b662c..b747e82 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2010-01-05  Eric Blake  <address@hidden>
+
+       Fix testsuite failure on newer glibc.
+       * tests/testsuite.at (AT_CHECK_M4): Tolerate alternate getopt
+       spellings.
+       * tests/options.at (deprecated options, unknown option)
+       (--debugmode): Adjust expected output accordingly.
+       Reported by Ralf Wildenhues.
+
+2009-11-26  Eric Blake  <address@hidden>
+
+       Update to newer gnulib.
+       * gnulib: Update.
+       * ltdl/m4/gnulib-cache.m4: Import inttypes, setenv, and unsetenv
+       modules.
+       * modules/m4.c (m4_make_temp): Adjust gen_tempname client.
+       * bootstrap (src_modules): Pick up getopt-gnu and its
+       dependencies.
+       * configure.ac (gl_VERSION_ETC): Support ./configure
+       --with-packager.
+       (AC_CHECK_FUNCS_ONCE): Rely on gnulib for setenv, unsetenv.
+       * ltdl/m4/m4-getopt.m4: Rewrite to match current gnulib.
+       * Makefile.am (src/getopt.h): Likewise.
+       * modules/stdlib.c (setenv, unsetenv): Rely on gnulib.
+
 2009-08-24  Eric Blake  <address@hidden>
 
        Pick up gnulib fixes for sub-process execution.
@@ -12036,7 +12061,7 @@
        End:
 
        Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003,
-       2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+       2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
        Copying and distribution of this file, with or without
        modification, are permitted provided the copyright notice
diff --git a/Makefile.am b/Makefile.am
index 6e207a9..fdaab47 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -101,17 +101,26 @@ src_m4_DEPENDENCIES = $(PREOPEN_DEPENDENCIES) m4/libm4.la
 ##                 --- PASTED MANUALLY FROM GNULIB ---                  ##
 ##     To avoid adding unnecessary objects to libm4.la these gnulib     ##
 ##     modules are not imported by gnulib-tool, but added manually.     ##
-##  (from: gnulib-tool --extract-automake-snippet getopt version-etc)   ##
+##     (from: gnulib-tool --extract-automake-snippet getopt-posix)      ##
 ##                                                                      ##
+if GETOPT
 BUILT_SOURCES  += src/$(GETOPT_H)
-EXTRA_DIST     += src/getopt.in.h src/getopt_int.h
+endif
+EXTRA_DIST     += src/getopt.c src/getopt1.c src/getopt.in.h src/getopt_int.h
 
 # We need the following in order to create an <getopt.h> when the
 # system doesn't have one that works with the given compiler.
-all-local: src/$(GETOPT_H)
 src/getopt.h: src/getopt.in.h
-       cp $(srcdir)/src/getopt.in.h address@hidden
-       mv address@hidden $@
+       $(AM_V_GEN)rm -f address@hidden $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
+             -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+             < $(srcdir)/src/getopt.in.h; \
+       } > address@hidden && \
+       mv -f address@hidden $@
 MOSTLYCLEANFILES += src/getopt.h src/getopt.h-t
 ##                                                                      ##
 ##                     --- END OF PASTED GNULIB ---                     ##
diff --git a/bootstrap b/bootstrap
index c243ba3..ee53aa7 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# bootstrap (GNU M4) version 2009-06-15
+# bootstrap (GNU M4) version 2009-11-25
 # Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software
 # Foundation, Inc.
 # License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
@@ -69,7 +69,13 @@ bailout_cb=:
 
 # List dependencies here too; we don't extract them, otherwise dependent
 # modules could end up being imported to src/ *and* gnu/!
-src_modules='getopt version-etc-fsf version-etc xstrtol'
+src_modules='
+getopt-gnu
+getopt-posix
+version-etc-fsf
+version-etc
+xstrtol
+'
 
 dirname="s,/[^/]*$,,"
 basename="s,^.*/,,g"
@@ -380,7 +386,8 @@ $CONFIG_SHELL gnulib/gnulib-tool --update \
 
 func_echo "fetching modules for src directory"
 
-for file in `$CONFIG_SHELL gnulib/gnulib-tool --extract-filelist $src_modules`
+for file in `$CONFIG_SHELL gnulib/gnulib-tool --extract-filelist $src_modules \
+  | sort -u`
 do
 
     dest=`echo $file | $SED "$basename"`
diff --git a/configure.ac b/configure.ac
index d5f186b..32eb9da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -157,6 +157,8 @@ M4_GNU_GETTEXT
 ## --------------- ##
 M4_INIT
 
+gl_VERSION_ETC
+
 # Gnulib doesn't always do things quite the way M4 would like...
 M4_ERROR
 M4_GETOPT
@@ -207,7 +209,6 @@ M4_SYS_STACKOVF
 AC_STRUCT_TM
 AC_FUNC_STRFTIME
 AC_CHECK_FUNCS_ONCE([getcwd gethostname mktime uname])
-AC_CHECK_FUNCS_ONCE([setenv unsetenv putenv clearenv])
 
 
 ## ------------------ ##
diff --git a/gnulib b/gnulib
index 2d8b95d..51983dc 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 2d8b95d62cc4d6524fa6c4dbc3138d88a5839159
+Subproject commit 51983dcb2ce9d20eb1f72d0b877e40fe0de07e87
diff --git a/ltdl/m4/gnulib-cache.m4 b/ltdl/m4/gnulib-cache.m4
index ec907ec..3ea93ba 100644
--- a/ltdl/m4/gnulib-cache.m4
+++ b/ltdl/m4/gnulib-cache.m4
@@ -15,7 +15,7 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --local-dir=local --lib=libgnu 
--source-base=gnu --m4-base=ltdl/m4 --doc-base=doc --tests-base=tests/gnu 
--aux-dir=build-aux --with-tests --libtool --macro-prefix=M4 assert autobuild 
avltree-oset binary-io bitrotate clean-temp cloexec close-stream closein 
config-h configmake dirname error execute exit fdl-1.3 fflush filenamecat 
flexmember fopen fopen-safer freadptr freadseek fseeko gendocs gettext 
git-version-gen gnumakefile gnupload gpl-3.0 intprops memchr2 memcmp2 memmem 
mkstemp obstack obstack-printf-posix pipe progname propername quote regex 
regexprops-generic rename snprintf-posix sprintf-posix stdbool stdlib-safer 
strnlen strtod strtol tempname unlocked-io vasnprintf-posix verify verror 
wait-process xalloc xalloc-die xmemdup0 xprintf-posix xstrndup xvasprintf-posix
+#   gnulib-tool --import --dir=. --local-dir=local --lib=libgnu 
--source-base=gnu --m4-base=ltdl/m4 --doc-base=doc --tests-base=tests/gnu 
--aux-dir=build-aux --with-tests --libtool --macro-prefix=M4 assert autobuild 
avltree-oset binary-io bitrotate clean-temp cloexec close-stream closein 
config-h configmake dirname error execute exit fdl-1.3 fflush filenamecat 
flexmember fopen fopen-safer freadptr freadseek fseeko gendocs gettext 
git-version-gen gnumakefile gnupload gpl-3.0 intprops inttypes memchr2 memcmp2 
memmem mkstemp obstack obstack-printf-posix pipe progname propername quote 
regex regexprops-generic rename setenv snprintf-posix sprintf-posix stdbool 
stdlib-safer strnlen strtod strtol tempname unlocked-io unsetenv 
vasnprintf-posix verify verror wait-process xalloc xalloc-die xmemdup0 
xprintf-posix xstrndup xvasprintf-posix
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([local])
@@ -51,6 +51,7 @@ gl_MODULES([
   gnupload
   gpl-3.0
   intprops
+  inttypes
   memchr2
   memcmp2
   memmem
@@ -64,6 +65,7 @@ gl_MODULES([
   regex
   regexprops-generic
   rename
+  setenv
   snprintf-posix
   sprintf-posix
   stdbool
@@ -73,6 +75,7 @@ gl_MODULES([
   strtol
   tempname
   unlocked-io
+  unsetenv
   vasnprintf-posix
   verify
   verror
diff --git a/ltdl/m4/m4-getopt.m4 b/ltdl/m4/m4-getopt.m4
index a58764e..9c606dd 100644
--- a/ltdl/m4/m4-getopt.m4
+++ b/ltdl/m4/m4-getopt.m4
@@ -2,7 +2,7 @@
 # m4-getopt.m4 -- Use the installed version of getopt.h if available.
 # Written by Gary V. Vaughan <address@hidden>
 #
-# Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc
+# Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc
 #
 # This file is part of GNU M4.
 #
@@ -19,53 +19,16 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# serial 2
+# serial 3
 
 # M4_GETOPT
 # ---------
 # Use the installed version of getopt.h if available.
 AC_DEFUN([M4_GETOPT],
-[GETOPT_H=
-AC_SUBST([GETOPT_H])
-
-AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h], [AC_INCLUDES_DEFAULT])
-
-if test -z "$GETOPT_H"; then
-  AC_CHECK_FUNCS([getopt_long_only], [], [GETOPT_H=getopt.h])
-fi
-
-dnl BSD getopt_log uses an incompatible method to reset option processing,
-dnl and (as of 2004-10-15) mishandles optional option-arguments.
-if test -z "$GETOPT_H"; then
-  AC_CHECK_DECL([optreset], [GETOPT_H=getopt.h], [], [#include <getopt.h>])
-fi
-
-if test -z "$GETOPT_H"; then
-  AC_CACHE_CHECK([for working gnu getopt function], [gl_cv_func_gnu_getopt],
-    [AC_RUN_IFELSE(
-      [AC_LANG_PROGRAM([#include <getopt.h>],
-       [[
-         char *myargv[3];
-         myargv[0] = "conftest";
-         myargv[1] = "-+";
-         myargv[2] = 0;
-         return getopt (2, myargv, "+a") != '?';
-       ]])],
-      [gl_cv_func_gnu_getopt=yes],
-      [gl_cv_func_gnu_getopt=no],
-      [dnl cross compiling - pessimistically gues based on decls
-       dnl Solaris 10 getopt doesn't handle `+' as a leading character in an
-       dnl option string (as of 2005-05-05).
-       AC_CHECK_DECL([getopt_clip],
-        [gl_cv_func_gnu_getopt=no], [gl_cv_func_gnu_getopt=yes],
-        [#include <getopt.h>])])])
-  test X"$gl_cv_func_gnu_getopt" = Xno && GETOPT_H=getopt.h
-fi
-
-if test -n "$GETOPT_H"; then
-  AC_DEFINE([__GETOPT_PREFIX], [[rpl_]],
-    [Define to rpl_ if the getopt replacement function should be used.])
-fi
-
-AM_CONDITIONAL([GETOPT], [test -n "$GETOPT_H"])
+[
+  m4_divert_text([INIT_PREPARE], [M4_replace_getopt=])
+  m4_pushdef([AC_LIBOBJ], [M4_replace_getopt=:])
+  AC_REQUIRE([gl_FUNC_GETOPT_GNU])
+  m4_popdef([AC_LIBOBJ])
+  AM_CONDITIONAL([GETOPT], [test -n "$M4_replace_getopt"])
 ])# M4_GETOPT
diff --git a/modules/m4.c b/modules/m4.c
index 0597fe7..fa75c49 100644
--- a/modules/m4.c
+++ b/modules/m4.c
@@ -742,7 +742,7 @@ m4_make_temp (m4 *context, m4_obstack *obs, const 
m4_call_info *caller,
 
   /* Make the temporary object.  */
   errno = 0;
-  fd = gen_tempname (name, dir ? GT_DIR : GT_FILE);
+  fd = gen_tempname (name, 0, 0, dir ? GT_DIR : GT_FILE);
   if (fd < 0)
     {
       /* This use of _() will need to change if xgettext ever changes
diff --git a/modules/stdlib.c b/modules/stdlib.c
index 3fce71f..65df448 100644
--- a/modules/stdlib.c
+++ b/modules/stdlib.c
@@ -112,24 +112,8 @@ M4BUILTIN_HANDLER (setenv)
                         &overwrite))
       return;
 
-#if HAVE_SETENV
+  /* TODO - error checking.  */
   setenv (M4ARG (1), M4ARG (2), overwrite);
-#else
-#if HAVE_PUTENV
-  if (!overwrite && getenv (M4ARG (1)) != NULL)
-    return;
-
-  assert (obstack_object_size (obs) == 0);
-  obstack_grow (obs, M4ARG (1), M4ARGLEN (1));
-  obstack_1grow (obs, '=');
-  obstack_grow0 (obs, M4ARG (2), M4ARGLEN (2));
-
-  {
-    char *env = (char *) obstack_finish (obs);
-    putenv (env);
-  }
-#endif /* HAVE_PUTENV */
-#endif /* HAVE_SETENV */
 }
 
 /**
@@ -137,10 +121,8 @@ M4BUILTIN_HANDLER (setenv)
  **/
 M4BUILTIN_HANDLER (unsetenv)
 {
-
-#if HAVE_UNSETENV
+  /* TODO - error checking.  */
   unsetenv (M4ARG (1));
-#endif /* HAVE_UNSETENV */
 }
 
 /**
diff --git a/tests/options.at b/tests/options.at
index ad71f20..82185e0 100644
--- a/tests/options.at
+++ b/tests/options.at
@@ -1,5 +1,5 @@
 # Hand crafted tests for GNU M4.                               -*- Autotest -*-
-# Copyright (C) 2001, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Copyright (C) 2001, 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
 # Inc.
 
 # This file is part of GNU M4.
@@ -29,7 +29,7 @@ AT_SETUP([deprecated options])
 dnl -N/--diversions was removed after 1.4.x
 AT_CHECK_M4([--diversions=1], [1], [], [stderr])
 AT_CHECK([$SED 's/Try.*help/Try `m4 --help/' stderr], [0],
-[[m4: unrecognized option `--diversions=1'
+[[m4: bad option
 Try `m4 --help' for more information.
 ]])
 
@@ -258,7 +258,7 @@ AT_SETUP([unknown option])
 
 AT_CHECK_M4([--unknown], [1], [], [stderr])
 AT_CHECK([$SED 's/Try.*help/Try `m4 --help/' stderr], [0],
-[[m4: unrecognized option `--unknown'
+[[m4: bad option
 Try `m4 --help' for more information.
 ]])
 
@@ -474,7 +474,7 @@ m4trace: -1- id 6: divnum
 dnl Test that shorter prefix is ambiguous.
 AT_CHECK_M4([--debu], [1], [], [stderr])
 AT_CHECK([$SED -e 's/Try.*--help/Try `m4 --help/' stderr], [0],
-[[m4: option `--debu' is ambiguous
+[[m4: bad option
 Try `m4 --help' for more information.
 ]])
 
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 7ba56e5..857d9f0 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -1,8 +1,8 @@
 # Process with autom4te to create an -*- Autotest -*- test suite.
 
 # Test suite for GNU M4.
-# Copyright (C) 2001, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
 
 # This file is part of GNU M4.
 #
@@ -71,6 +71,15 @@ fi]])
 #    m4:input.m4:7: cannot open module `no_such': no_such.so: cannot open 
shared object file: No such file or directory
 # or m4:input.m4:7: cannot open module `no_such': can't open the module
 # to m4:input.m4:7: cannot open module `no_such'
+#
+# When encountering command line option errors, the error message is
+# platform-dependent, but contains " option ":
+#    m4: unrecognized option `--diversions=1' # glibc 2.6
+# or m4: unrecognized option '--diversions=1' # glibc 2.11
+# or m4: unknown option -- --diversions       # BSD
+# or m4: option '--debu' is ambiguous         # glibc 2.11
+# or m4: ambiguous option -- --debu           # BSD
+# to m4: bad option
 m4_define([AT_CHECK_M4],
 [AT_CHECK([$M4 m4_ifval([$6], [], [-d ])$1 ]m4_if([$5], [-], [<&-],
                                            [< m4_default([$5], [/dev/null])]),
@@ -80,6 +89,7 @@ m4_case([$4], [], [], [ignore], [],
        /^m4debug: module/s/opening file.*/opening file/
        s/\(cannot open module [^:]*\):.*/\1/
        s/Bad file number/Bad file descriptor/
+       s/^m4:.* option .*/m4: bad option/
     ' stderr >&2]], [0], [], [$4])])
 ])
 


hooks/post-receive
-- 
GNU M4 source repository




reply via email to

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