port several recent patches to master

Eric Blake <[email protected]>
Newsgroups gmane.comp.gnu.m4.patches
Message-ID <[email protected]>
I've been piling up several patches on the branches but not yet ported to
master; this resolves that.

-- 
Don't work too hard, make some time for fun as well!

Eric Blake             [email protected]

_______________________________________________
M4-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/m4-patches
m4.patch439 (text/plain, 16 KB)
From 652c73271aa3feeb9ca1524ba2af8bd48929b931 Mon Sep 17 00:00:00 2001
From: Eric Blake <[email protected]>
Date: Mon, 14 Dec 2009 14:11:22 -0700
Subject: [PATCH 1/2] Update to latest gnulib.

* gnulib: Update.
* ltdl/m4/gnulib-cache.m4: Import xoset.
* m4/output.c (includes): Ensure that gnulib oset usage will
call xalloc_die on memory failure.
* Makefile.am (src/getopt.h): Update snippet from gnulib.
(LINK_WARNING_H, ARG_NONNULL_H): New macros.

Signed-off-by: Eric Blake <[email protected]>
(cherry picked from commit 43b9828d5bfe5c9be902ad86053e59f3a5ab2dd4)
---
 ChangeLog               |    8 ++++++++
 Makefile.am             |   10 +++++++---
 gnulib                  |    2 +-
 ltdl/m4/gnulib-cache.m4 |    5 +++--
 m4/output.c             |    3 ++-
 5 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b747e82..95ce8de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2010-01-05  Eric Blake  <[email protected]>

+	Update to latest gnulib.
+	* gnulib: Update.
+	* ltdl/m4/gnulib-cache.m4: Import xoset.
+	* m4/output.c (includes): Ensure that gnulib oset usage will
+	call xalloc_die on memory failure.
+	* Makefile.am (src/getopt.h): Update snippet from gnulib.
+	(LINK_WARNING_H, ARG_NONNULL_H): New macros.
+
 	Fix testsuite failure on newer glibc.
 	* tests/testsuite.at (AT_CHECK_M4): Tolerate alternate getopt
 	spellings.
diff --git a/Makefile.am b/Makefile.am
index fdaab47..c4af0c4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
 ## Makefile.am - template for generating Makefile via Automake
 ##
-## Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-## Free Software Foundation, Inc.
+## Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+## 2010 Free Software Foundation, Inc.
 ##
 ## This file is part of GNU M4.
 ##
@@ -108,9 +108,12 @@ BUILT_SOURCES  += src/$(GETOPT_H)
 endif
 EXTRA_DIST     += src/getopt.c src/getopt1.c src/getopt.in.h src/getopt_int.h

+LINK_WARNING_H = $(srcdir)/$(config_aux_dir)/link-warning.h
+ARG_NONNULL_H = $(srcdir)/$(config_aux_dir)/arg-nonnull.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.
-src/getopt.h: src/getopt.in.h
+src/getopt.h: src/getopt.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
 	$(AM_V_GEN)rm -f $@-t $@ && \
 	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
 	  sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
@@ -118,6 +121,7 @@ src/getopt.h: src/getopt.in.h
 	      -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)' \
+	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
 	      < $(srcdir)/src/getopt.in.h; \
 	} > $@-t && \
 	mv -f $@-t $@
diff --git a/gnulib b/gnulib
index 51983dc..0e0f8f1 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 51983dcb2ce9d20eb1f72d0b877e40fe0de07e87
+Subproject commit 0e0f8f12ec241c0f1c1f21f960bb5cf908a0fa3c
diff --git a/ltdl/m4/gnulib-cache.m4 b/ltdl/m4/gnulib-cache.m4
index 3ea93ba..eb2ce98 100644
--- a/ltdl/m4/gnulib-cache.m4
+++ b/ltdl/m4/gnulib-cache.m4
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2009 Free Software Foundation, Inc.
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
 #
 # This file is free software, distributed under the terms of the GNU
 # General Public License.  As a special exception to the GNU General
@@ -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 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
+#   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 xoset xprintf-posix xstrndup xvasprintf-posix

 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([local])
@@ -83,6 +83,7 @@ gl_MODULES([
   xalloc
   xalloc-die
   xmemdup0
+  xoset
   xprintf-posix
   xstrndup
   xvasprintf-posix
diff --git a/m4/output.c b/m4/output.c
index b2f6530..0535d93 100644
--- a/m4/output.c
+++ b/m4/output.c
@@ -1,6 +1,6 @@
 /* GNU m4 -- A simple macro processor
    Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1998, 2002, 2004,
-   2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+   2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.

    This file is part of GNU M4.

@@ -26,6 +26,7 @@
 #include "clean-temp.h"
 #include "exitfail.h"
 #include "gl_avltree_oset.h"
+#include "gl_xoset.h"
 #include "intprops.h"
 #include "quotearg.h"
 #include "xvasprintf.h"
-- 
1.6.4.2


From dc9d4612150ed7f515739af6d8dc777744c528e1 Mon Sep 17 00:00:00 2001
From: Eric Blake <[email protected]>
Date: Mon, 28 Dec 2009 14:09:35 -0700
Subject: [PATCH 2/2] Use gnulib maintainer-makefile module.

* ltdl/m4/gnulib-cache.m4: Import maintainer-makefile module.
* cfg.mk (local-checks-to-skip): Drop changelog-check; add
sc_cast_of_x_alloc_return_value.
(gnu_ftp_host-alpha, gnu_ftp_host-beta, gnu_ftp_host-major)
(gnu_rel_host): Delete; provided by maint.mk.
(old_NEWS_hash): New macro.
* .prev-version: New file.
* .x-sc_require_config_h: Likewise.
* .x-sc_require_config_h_first: Likewise.
* Makefile.am (syntax_check_exceptions, EXTRA_DIST): Ship new
files.
* maint.mk: Remove from version control; use gnulib instead.
* .gitignore: Update.

Signed-off-by: Eric Blake <[email protected]>
(cherry picked from commit 260383467b3ae57f2cb3c6821718b99fdf278c4b)
---
 .gitignore                   |    1 +
 .prev-version                |    1 +
 .x-sc_require_config_h       |    2 +
 .x-sc_require_config_h_first |    2 +
 ChangeLog                    |   15 +++++++++++
 Makefile.am                  |    9 +++++-
 cfg.mk                       |   27 ++++---------------
 ltdl/m4/gnulib-cache.m4      |    3 +-
 maint.mk                     |   56 ------------------------------------------
 9 files changed, 36 insertions(+), 80 deletions(-)
 create mode 100644 .prev-version
 create mode 100644 .x-sc_require_config_h
 create mode 100644 .x-sc_require_config_h_first
 delete mode 100644 maint.mk

diff --git a/.gitignore b/.gitignore
index d65437e..326c4fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -104,6 +104,7 @@ libtool
 /m4/obstack.h
 /m4/pathconf.h
 /m4/system.h
+/maint.mk
 Makefile
 Makefile.in
 Makefile.inc
diff --git a/.prev-version b/.prev-version
new file mode 100644
index 0000000..acd81d7
--- /dev/null
+++ b/.prev-version
@@ -0,0 +1 @@
+1.4.13
diff --git a/.x-sc_require_config_h b/.x-sc_require_config_h
new file mode 100644
index 0000000..053cd3f
--- /dev/null
+++ b/.x-sc_require_config_h
@@ -0,0 +1,2 @@
+modules/evalparse.c
+modules/format.c
diff --git a/.x-sc_require_config_h_first b/.x-sc_require_config_h_first
new file mode 100644
index 0000000..053cd3f
--- /dev/null
+++ b/.x-sc_require_config_h_first
@@ -0,0 +1,2 @@
+modules/evalparse.c
+modules/format.c
diff --git a/ChangeLog b/ChangeLog
index 95ce8de..bece78b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
 2010-01-05  Eric Blake  <[email protected]>

+	Use gnulib maintainer-makefile module.
+	* ltdl/m4/gnulib-cache.m4: Import maintainer-makefile module.
+	* cfg.mk (local-checks-to-skip): Drop changelog-check; add
+	sc_cast_of_x_alloc_return_value.
+	(gnu_ftp_host-alpha, gnu_ftp_host-beta, gnu_ftp_host-major)
+	(gnu_rel_host): Delete; provided by maint.mk.
+	(old_NEWS_hash): New macro.
+	* .prev-version: New file.
+	* .x-sc_require_config_h: Likewise.
+	* .x-sc_require_config_h_first: Likewise.
+	* Makefile.am (syntax_check_exceptions, EXTRA_DIST): Ship new
+	files.
+	* maint.mk: Remove from version control; use gnulib instead.
+	* .gitignore: Update.
+
 	Update to latest gnulib.
 	* gnulib: Update.
 	* ltdl/m4/gnulib-cache.m4: Import xoset.
diff --git a/Makefile.am b/Makefile.am
index c4af0c4..05fd0bc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -52,10 +52,15 @@ include ltdl/Makefile.inc

 # Additional configuration.  Version management comes from suggestions
 # given in build-aux/git-version-gen.
+syntax_check_exceptions = \
+	.x-sc_require_config_h \
+	.x-sc_require_config_h_first
+
 AM_CPPFLAGS    += -Ignu -I$(srcdir)/gnu \
 		  -Im4 -I$(srcdir)/m4
-EXTRA_DIST     += bootstrap cfg.mk maint.mk .version \
-		  $(config_macro_dir)/gnulib-cache.m4
+EXTRA_DIST     += bootstrap cfg.mk maint.mk .version .prev-version \
+		  $(config_macro_dir)/gnulib-cache.m4 \
+		  $(syntax_check_exceptions)
 BUILT_SOURCES  += .version
 .version:
 	echo $(VERSION) > $@-t && mv $@-t $@
diff --git a/cfg.mk b/cfg.mk
index 2aac5ac..fe48db5 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -1,5 +1,5 @@
 # Customize maint.mk.                           -*- makefile -*-
-# Copyright (C) 2003-2009 Free Software Foundation, Inc.
+# Copyright (C) 2003-2010 Free Software Foundation, Inc.

 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,27 +14,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.

-# Use alpha.gnu.org for alpha and beta releases.
-# Use ftp.gnu.org for major releases.
-gnu_ftp_host-alpha = alpha.gnu.org
-gnu_ftp_host-beta = alpha.gnu.org
-gnu_ftp_host-major = ftp.gnu.org
-gnu_rel_host = $(gnu_ftp_host-$(RELEASE_TYPE))
-
 # Used in maint.mk's web-manual rule
 manual_title = GNU macro processor

-url_dir_list = ftp://$(gnu_rel_host)/gnu/m4
-
-# The GnuPG ID of the key used to sign the tarballs.
-gpg_key_ID = F4850180
-
-# Tests not to run as part of "make distcheck".
-# Exclude changelog-check here so that there's less churn in ChangeLog
-# files -- otherwise, you'd need to have the upcoming version number
-# at the top of the file for each `make distcheck' run.
-local-checks-to-skip = changelog-check
+# Tests not to run as part of "make syntax-check".
+# M4 intentionally uses a coding style that compiles under C++.
+local-checks-to-skip = sc_cast_of_x_alloc_return_value

-# The local directory containing the checked-out copy of gnulib used in this
-# release.  Used solely to get gnulib's SHA1 for the "announcement" target.
-gnulib_dir = $(srcdir)/gnulib
+# Hash of NEWS contents, to ensure we don't add entries to wrong section.
+old_NEWS_hash = b63892a79436f9f3cd05e10c3c4657ef
diff --git a/ltdl/m4/gnulib-cache.m4 b/ltdl/m4/gnulib-cache.m4
index eb2ce98..06a8fb8 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 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 xoset 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 maintainer-makefile 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 xoset xprintf-posix xstrndup xvasprintf-posix

 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([local])
@@ -52,6 +52,7 @@ gl_MODULES([
   gpl-3.0
   intprops
   inttypes
+  maintainer-makefile
   memchr2
   memcmp2
   memmem
diff --git a/maint.mk b/maint.mk
deleted file mode 100644
index 88089c3..0000000
--- a/maint.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-## maint.mk - maintainer rules for managing m4 distributions
-##
-## Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-## Free Software Foundation, Inc.
-##
-## This file is part of GNU M4.
-##
-## GNU M4 is free software: you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation, either version 3 of the License, or
-## (at your option) any later version.
-##
-## GNU M4 is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-##                                                                      ##
-##                   --- RULES FOR THE MAINTAINER ---                   ##
-##                                                                      ##
-
-## TODO - fix this file now that m4 is maintained in git, not CVS.
-
-CVS	= cvs # set it to `:' to avoid CVS operations at dist time
-
-# Tag before making distribution.  Also, don't make a distribution if
-# checks fail.  Also, make sure the NEWS file is up-to-date.
-cvs-dist: distcheck # maintainer-check
-	@if sed '1,2d;3q' $(srcdir)/NEWS | grep -e "$(VERSION)" > dev/null; \
-	  echo "NEWS not updated; not releasing" 1>&2; \
-	  exit 1;
-	fi
-	cd $(srcdir) && \
-	  $(CVS) -q tag `echo "Release-$(VERSION)" | sed 's/\./-/g'`
-	$(MAKE) dist
-
-cvs-diff:
-	thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \
-	if test -z "$$OLDVERSION"; then \
-	  prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
-	else prevno="$$OLDVERSION"; fi; \
-	prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \
-	cvs -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \
-	    > $(PACKAGE)-$$prevno-$(VERSION).diff
-
-.PHONY: web-manual
-web-manual:
-	@cd '$(srcdir)/doc'; \
-	  $(SHELL) ../$(config_aux_dir)/gendocs.sh \
-	    -o '$(abs_builddir)/doc/manual' \
-	    --email $(PACKAGE_BUGREPORT) $(PACKAGE) \
-	    "$(PACKAGE_NAME) - $(manual_title)"
-	@echo " *** Upload the doc/manual directory to web-cvs."
-- 
1.6.4.2
m4.patch440 (text/plain, 72 KB) - not displayed
signature.asc (application/pgp-signature, 320 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktMeE0ACgkQ84KuGfSFAYD+oACfd84biqZrBdSvSSGlt/KbYmjv
YoMAoLfQX6R8QYHhG608Wb09jRWnznGS
=9MXj
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.