Rather than trying to cherry-pick all gnulib changes on branch-1.4,
this just updates to the latest (see commit 2f445aef) then fixes ALL
of the fallout, as learned by referencing a number of other commits.
Done this way since it is otherwise impossible to build this branch,
in an effort to revive it. With this in place, it should be easier to
do more targetted forward ports of other commits.
* gnulib: Update to latest.
* m4/gnulib-cache.m4: Regenerate. Change pipe to spawn-pipe.
* .gitignore: Cater to changes in build-aux.
* doc/m4.texinfo: Rename to doc/m4.texi, and re-encode in UTF-8.
(@setcontentsaftertitlepage): Drop.
* doc/Makefile.am (info_TEXINFOS): Track rename.
* checks/Makefile.in (stamp-checks): Likewise.
* configure.ac (AC_PREREQ, AM_INIT_AUTOMAKE): Bump to newer baseline.
(AC_TYPE_SIGNAL): Drop deprecated macro.
* src/builtin.c (m4_syscmd, m4_esyscmd): Track execute changes.and
create_pipe_in changes.
* src/m4.h (includes): Drop obsolete "verror.h".
* src/output.c (m4_tmpfile, m4_tmpopen): Track fopen_temp changes.
* src/symtab.c (lookup_symbol): Track hash_delete changes.
---
It will be easier to cherry-pick other patches if the branch at least
builds. This is a sledgehammer update, but appears to work for me.
I'll give it a bit more testing before pushing.
.gitignore | 15 ++++-
checks/Makefile.in | 4 +-
configure.ac | 8 +--
doc/Makefile.am | 2 +-
doc/{m4.texinfo => m4.texi} | 26 ++++-----
gnulib | 2 +-
m4/gnulib-cache.m4 | 108 +++++++++++++++++++++++++++++++++---
src/builtin.c | 6 +-
src/m4.h | 1 -
src/output.c | 4 +-
src/symtab.c | 4 +-
11 files changed, 137 insertions(+), 43 deletions(-)
rename doc/{m4.texinfo => m4.texi} (99%)
diff --git a/.gitignore b/.gitignore
index 2a97a86c..0a01a749 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,12 +9,21 @@
*.tar.gz
*.tar.lzma
*.tar.xz
+\#*
+.#*
.deps
/.tarball-version
/.version
/aclocal.m4
/autom4te.cache
-/build-aux/.gitignore
+/build-aux/*
+!/build-aux/compile
+!/build-aux/config.guess
+!/build-aux/config.sub
+!/build-aux/depcomp
+!/build-aux/install-sh
+!/build-aux/mdate-sh
+!/build-aux/texinfo.tex
/checks/[0-9][0-9].*
/checks/[0-9][0-9][0-9].*
/checks/stamp-checks
@@ -39,7 +48,6 @@
/doc/stamp-vti
/doc/version.texi
/gendocs.sh
-/GNUmakefile
/gnupload
/install-sh
/lib/*
@@ -48,7 +56,6 @@
/m4-*
/m4/.gitignore
/m4/gnulib-comp.m4
-/maint.mk
Makefile.in
Makefile
/missing
@@ -58,3 +65,5 @@ Makefile
/stamp-h.in
/tests/*
!/tests/Makefile.am
+/GNUmakefile
+/maint.mk
diff --git a/checks/Makefile.in b/checks/Makefile.in
index 965099d4..b968d193 100644
--- a/checks/Makefile.in
+++ b/checks/Makefile.in
@@ -42,9 +42,9 @@ DISTFILES = $(srcdir)/get-them $(srcdir)/check-them
$(srcdir)/stamp-checks
all: $(srcdir)/stamp-checks
-$(srcdir)/stamp-checks: $(srcdir)/get-them $(srcdir)/../doc/m4.texinfo
+$(srcdir)/stamp-checks: $(srcdir)/get-them $(srcdir)/../doc/m4.texi
rm -f $(CHECKS)
- cd $(srcdir) && AWK=$(AWK) ./get-them ../doc/m4.texinfo
+ cd $(srcdir) && AWK=$(AWK) ./get-them ../doc/m4.texi
touch $(srcdir)/stamp-checks
install:
diff --git a/configure.ac b/configure.ac
index a7dcd25b..6c559832 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,13 +17,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-AC_PREREQ([2.62])
+AC_PREREQ([2.64])
AC_INIT([GNU M4], m4_esyscmd([build-aux/git-version-gen .tarball-version]),
[[email protected]])
AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE([1.11.1 dist-bzip2 dist-xz color-tests parallel-tests
-silent-rules gnu])
+AM_INIT_AUTOMAKE([1.11.6 dist-bzip2 dist-xz color-tests parallel-tests
+silent-rules subdir-objects gnu])
m4_pattern_forbid([^M4_[A-Z]])
@@ -51,8 +51,6 @@ AC_CHECK_MEMBERS([stack_t.ss_sp], [], [],
#endif
]])
-AC_TYPE_SIGNAL
-
AC_CHECK_FUNCS_ONCE([sigaction sigaltstack sigstack sigvec strerror])
AC_ARG_ENABLE([gcc-warnings],
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 7eaa5a9c..8edd0f38 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -20,7 +20,7 @@
##
## This file written by Eric Blake <[email protected]>
-info_TEXINFOS = m4.texinfo
+info_TEXINFOS = m4.texi
m4_TEXINFOS = fdl-1.3.texi gpl-3.0.texi
man_MANS = $(srcdir)/m4.1
EXTRA_DIST = $(man_MANS) gendocs_template
diff --git a/doc/m4.texinfo b/doc/m4.texi
similarity index 99%
rename from doc/m4.texinfo
rename to doc/m4.texi
index 91b8e007..cfe0e9a2 100644
--- a/doc/m4.texinfo
+++ b/doc/m4.texi
@@ -4,10 +4,8 @@
@setfilename m4.info
@include version.texi
@settitle GNU M4 @value{VERSION} macro processor
+@documentencoding UTF-8
@setchapternewpage odd
-@ifnothtml
-@setcontentsaftertitlepage
-@end ifnothtml
@finalout
@c @tabchar{}
@@ -4720,11 +4718,11 @@ Changequote
@example
define(`a', `b')
@result{}
-«a»
-@result{}«b»
-changequote(`«', `»')
+«a»
+@result{}«b»
+changequote(`«', `»')
@result{}
-«a»
+«a»
@result{}a
@end example
@end ignore
@@ -4999,12 +4997,12 @@ Changecom
@example
define(`a', `b')
@result{}
-«a»
-@result{}«b»
-changecom(`«', `»')
+«a»
+@result{}«b»
+changecom(`«', `»')
@result{}
-«a»
-@result{}«a»
+«a»
+@result{}«a»
@end example
@end ignore
If no single character is appropriate, @var{start} and @var{end} can be
@@ -6622,7 +6620,7 @@ Translit
@comment rendering right in both info and dvi.
@example
-translit(`«abc~', `~-»')
+translit(`«abc~', `~-»')
@result{}abc
@end example
@@ -9614,7 +9612,7 @@ Concept index
@bye
@c Local Variables:
-@c coding: iso-8859-1
+@c coding: utf-8
@c fill-column: 72
@c ispell-local-dictionary: "american"
@c indent-tabs-mode: nil
diff --git a/gnulib b/gnulib
index 3e38c274..3773db65 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 3e38c274dbac15d2288577a4b9da6e2f4a83ab5b
+Subproject commit 3773db653242ab7165cd300295c27405e4f9cc79
diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4
index 86c0dc98..3808e9ed 100644
--- a/m4/gnulib-cache.m4
+++ b/m4/gnulib-cache.m4
@@ -1,21 +1,110 @@
-# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+# Copyright (C) 2002-2025 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
-# Public License, this file may be distributed as part of a program
-# that contains a configuration script generated by Autoconf, under
+# This file 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.
+#
+# This file 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 file. If not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License,
+# this file may be distributed as part of a program that
+# contains a configuration script generated by Autoconf, under
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
#
# This file represents the specification of how gnulib-tool is used.
# It acts as a cache: It is written and read by gnulib-tool.
-# In projects using CVS, this file is meant to be stored in CVS,
-# like the configure.ac and various Makefile.am files.
+# In projects that use version control, this file is meant to be put under
+# version control, like the configure.ac and various Makefile.am files.
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --local-dir=local --lib=libm4
--source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests
--aux-dir=build-aux --with-tests --with-c++-tests --makefile-name=gnulib.mk
--no-libtool --macro-prefix=M4 announce-gen assert autobuild avltree-oset
binary-io bitrotate clean-temp cloexec close-stream closein config-h dirname
error execute fdl-1.3 fflush filenamecat flexmember fopen fopen-safer freadptr
freadseek fseeko gendocs getopt-gnu git-version-gen gnu-web-doc-update
gnumakefile gnupload gpl-3.0 hash ignore-value intprops maintainer-makefile
manywarnings memchr2 memcmp2 memmem mkstemp obstack obstack-printf-posix pipe
progname quote regex rename snprintf-posix stdbool stdint stdlib-safer strtod
strtol unlocked-io update-copyright vasnprintf-posix verror version-etc
version-etc-fsf wait-process xalloc xmemdup0 xoset xprintf xvasprintf-posix
+# gnulib-tool --import \
+# --local-dir=local \
+# --lib=libm4 \
+# --source-base=lib \
+# --m4-base=m4 \
+# --doc-base=doc \
+# --tests-base=tests \
+# --aux-dir=build-aux \
+# --with-tests \
+# --with-c++-tests \
+# --makefile-name=gnulib.mk \
+# --no-conditional-dependencies \
+# --no-libtool \
+# --macro-prefix=M4 \
+# announce-gen \
+# assert \
+# autobuild \
+# avltree-oset \
+# binary-io \
+# bitrotate \
+# clean-temp \
+# cloexec \
+# close-stream \
+# closein \
+# config-h \
+# dirname \
+# error \
+# execute \
+# fdl-1.3 \
+# fflush \
+# filenamecat \
+# flexmember \
+# fopen \
+# fopen-safer \
+# freadptr \
+# freadseek \
+# fseeko \
+# gendocs \
+# getopt-gnu \
+# git-version-gen \
+# gnu-web-doc-update \
+# gnumakefile \
+# gnupload \
+# gpl-3.0 \
+# hash \
+# ignore-value \
+# intprops \
+# maintainer-makefile \
+# manywarnings \
+# memchr2 \
+# memcmp2 \
+# memmem \
+# mkstemp \
+# obstack \
+# obstack-printf-posix \
+# progname \
+# quote \
+# regex \
+# rename \
+# snprintf-posix \
+# spawn-pipe \
+# stdbool \
+# stdint \
+# stdlib-safer \
+# strtod \
+# strtol \
+# unlocked-io \
+# update-copyright \
+# vasnprintf-posix \
+# verror \
+# version-etc \
+# version-etc-fsf \
+# wait-process \
+# xalloc \
+# xmemdup0 \
+# xoset \
+# xprintf \
+# xvasprintf-posix
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([local])
@@ -61,12 +150,12 @@ gl_MODULES([
mkstemp
obstack
obstack-printf-posix
- pipe
progname
quote
regex
rename
snprintf-posix
+ spawn-pipe
stdbool
stdint
stdlib-safer
@@ -97,3 +186,4 @@ gl_LIB([libm4])
gl_MAKEFILE_NAME([gnulib.mk])
gl_MACRO_PREFIX([M4])
gl_PO_DOMAIN([])
+gl_WITNESS_C_MACRO([])
diff --git a/src/builtin.c b/src/builtin.c
index bc0cde21..9e074b77 100644
--- a/src/builtin.c
+++ b/src/builtin.c
@@ -27,8 +27,8 @@
#include "execute.h"
#include "memchr2.h"
#include "memcmp2.h"
-#include "pipe.h"
#include "regex.h"
+#include "spawn-pipe.h"
#include "wait-process.h"
/* Initialization of builtin and predefined macros. The table
@@ -1082,7 +1082,7 @@ m4_syscmd (struct obstack *obs M4_GNUC_UNUSED, int argc,
macro_arguments *argv)
prog_args[2] = cmd;
caller = quotearg_style_mem (locale_quoting_style, me->name, me->name_len);
errno = 0;
- status = execute (caller, SYSCMD_SHELL, (char **) prog_args, false,
+ status = execute (caller, SYSCMD_SHELL, prog_args, NULL, NULL, false,
false, false, false, true, false, &sig_status);
if (sig_status)
{
@@ -1133,7 +1133,7 @@ m4_esyscmd (struct obstack *obs, int argc,
macro_arguments *argv)
prog_args[2] = cmd;
caller = quotearg_style_mem (locale_quoting_style, me->name, me->name_len);
errno = 0;
- child = create_pipe_in (caller, SYSCMD_SHELL, (char **) prog_args,
+ child = create_pipe_in (caller, SYSCMD_SHELL, prog_args, NULL, NULL,
NULL, false, true, false, &fd);
if (child == -1)
{
diff --git a/src/m4.h b/src/m4.h
index d333c244..c771eaa0 100644
--- a/src/m4.h
+++ b/src/m4.h
@@ -52,7 +52,6 @@
#include "stdlib--.h"
#include "unistd--.h"
#include "vasnprintf.h"
-#include "verror.h"
#include "xalloc.h"
#include "xmemdup0.h"
#include "xprintf.h"
diff --git a/src/output.c b/src/output.c
index c7bc38ca..d3b69ca5 100644
--- a/src/output.c
+++ b/src/output.c
@@ -225,7 +225,7 @@ m4_tmpfile (int divnum)
}
name = m4_tmpname (divnum);
register_temp_file (output_temp_dir, name);
- file = fopen_temp (name, O_BINARY ? "wb+" : "w+");
+ file = fopen_temp (name, O_BINARY ? "wb+" : "w+", false);
if (file == NULL)
{
unregister_temp_file (output_temp_dir, name);
@@ -266,7 +266,7 @@ m4_tmpopen (int divnum, bool reread)
}
name = m4_tmpname (divnum);
/* We need update mode, to avoid truncation. */
- file = fopen_temp (name, O_BINARY ? "rb+" : "r+");
+ file = fopen_temp (name, O_BINARY ? "rb+" : "r+", false);
if (file == NULL)
m4_error (EXIT_FAILURE, errno, NULL,
_("cannot create temporary file for diversion"));
diff --git a/src/symtab.c b/src/symtab.c
index f7807077..ea4640e8 100644
--- a/src/symtab.c
+++ b/src/symtab.c
@@ -257,7 +257,7 @@ lookup_symbol (const char *name, size_t len, symbol_lookup
mode)
if (old == entry)
{
- old = (symbol *) hash_delete (symtab, entry);
+ old = (symbol *) hash_remove (symtab, entry);
assert (entry == old);
sym->stack = sym;
entry = (symbol *) hash_insert (symtab, sym);
@@ -347,7 +347,7 @@ lookup_symbol (const char *name, size_t len, symbol_lookup
mode)
old->stack = NULL;
free_symbol (old);
}
- sym = (symbol *) hash_delete (symtab, entry);
+ sym = (symbol *) hash_remove (symtab, entry);
assert (sym == entry);
sym->stack = NULL;
free_symbol (sym);
--
2.49.0
_______________________________________________
M4-patches mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/m4-patches