On 4/26/21 3:29 AM, David L. Craig wrote:
configure.ac:55: warning: The macro `AC_PROG_CC_STDC' is obsolete.
I reproduced these warnings; they come from Autoconf 2.71. You can
ignore them, or you can update to the latest coreutils on Savannah,
where I installed some patches (attached) to silence these.
doc/local.mk:19: installing 'build-aux/mdate-sh'
Makefile.am:213: 'doc/local.mk' included from here
doc/local.mk:19: error: required file 'build-aux/texinfo.tex' not found
Makefile.am:213: 'doc/local.mk' included from here
I don't observe this problem. gnulib-tool sets up a symlink that works:
$ ls -l build-aux/texinfo.tex gnulib/build-aux/texinfo.tex
lrwxrwxrwx 1 eggert eggert 31 Apr 26 23:59 build-aux/texinfo.tex ->
../gnulib/build-aux/texinfo.tex
-rw-rw-r-- 1 eggert eggert 379274 Apr 26 23:56 gnulib/build-aux/texinfo.tex
If you still observe a problem with a fresh build from scratch, please
investigate why gnulib-tool isn't setting up that link for you
From 1c97d9e2af40003a8ad872fb7f31d4e616f52532 Mon Sep 17 00:00:00 2001
From: Paul Eggert
Date: Mon, 26 Apr 2021 18:02:16 -0700
Subject: [PATCH 1/3] build: update gnulib submodule to latest
* src/csplit.c (load_buffer):
* src/pinky.c (create_fullname):
Use intprops-based checks rather than xalloc_oversized,
since Gnulib xalloc.h no longer includes xalloc-oversized.h.
---
gnulib | 2 +-
src/csplit.c | 3 +--
src/pinky.c | 6 +++---
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/gnulib b/gnulib
index e54b645fc..354b9691a 16
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit e54b645fc6b8422562327443bda575c65d931fbd
+Subproject commit 354b9691accd00a531358b652689ce7f580fbe54
diff --git a/src/csplit.c b/src/csplit.c
index ee9aa6503..79bd034e3 100644
--- a/src/csplit.c
+++ b/src/csplit.c
@@ -518,9 +518,8 @@ load_buffer (void)
if (lines_found || have_read_eof)
break;
- if (xalloc_oversized (2, b->bytes_alloc))
+ if (INT_MULTIPLY_WRAPV (b->bytes_alloc, 2, &bytes_wanted))
xalloc_die ();
- bytes_wanted = 2 * b->bytes_alloc;
free_buffer (b);
free (b);
}
diff --git a/src/pinky.c b/src/pinky.c
index 23a43f5e4..6fea94923 100644
--- a/src/pinky.c
+++ b/src/pinky.c
@@ -110,9 +110,9 @@ create_fullname (char const *gecos_name, char const *user_name)
if (ampersands != 0)
{
size_t ulen = strlen (user_name);
- size_t product = ampersands * ulen;
- rsize += product - ampersands;
- if (xalloc_oversized (ulen, ampersands) || rsize < product)
+ size_t product;
+ if (INT_MULTIPLY_WRAPV (ulen, ampersands - 1, &product)
+ || INT_ADD_WRAPV (rsize, product, &rsize))
xalloc_die ();
}
--
2.27.0
From 1671951e05096200aeb87ca6729fcccd2901 Mon Sep 17 00:00:00 2001
From: Paul Eggert
Date: Mon, 26 Apr 2021 20:04:19 -0700
Subject: [PATCH 2/3] csplit: size_t overflow check
* src/csplit.c (get_new_buffer): Fix unlikely size_t overflow.
---
src/csplit.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/csplit.c b/src/csplit.c
index 79bd034e3..f188e8894 100644
--- a/src/csplit.c
+++ b/src/csplit.c
@@ -416,7 +416,8 @@ get_new_buffer (size_t min_size)
if (alloc_size < min_size)
{
size_t s = min_size - alloc_size + INCR_SIZE - 1;
- alloc_size += s - s % INCR_SIZE;
+ if (INT_ADD_WRAPV (alloc_size, s - s % INCR_SIZE, &alloc_size))
+xalloc_die ();
}
new_buffer = create_new_buffer (alloc_size);
--
2.27.0
From 96a034f490595258f9069a3fed037ddc65df2c71 Mon Sep 17 00:00:00 2001
From: Paul Eggert
Date: Mon, 26 Apr 2021 23:27:59 -0700
Subject: [PATCH 3/3] maint: port to Autoconf 2.71
* configure.ac: Use AC_PROG_CC, not AC_PROG_CC_STDC.
* gl/modules/smack (configure.ac):
* m4/jm-macros.m4 (coreutils_MACROS):
* m4/xattr.m4 (gl_FUNC_XATTR):
Use AS_HELP_STRING, not AC_HELP_STRING.
* m4/check-decl.m4 (gl_CHECK_DECLS):
Do not require AC_HEADER_TIME; we no longer care about it directly.
* m4/jm-macros.m4 (coreutils_MACROS):
Do not require AC_ISC_POSIX, which became obsolete in 2006.
Use AC_LINK_IFELSE instead of AC_TRY_LINK.
---
configure.ac | 2 +-
gl/modules/smack | 2 +-
m4/check-decl.m4 | 4 +---
m4/jm-macros.m4 | 54 +++-
m4/xattr.m4 | 4 ++--
5 files changed, 35 insertions(+), 31 deletions(-)
diff --git a/configure.ac b/configure.ac
index 7fbecbf8d..02291a4ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,7 +52,7 @@ m4_syscmd([test "${GNULIB_POSIXCHECK+set}" = set])
m4_if(m4_sysval, [0], [], [dnl
gl_ASSERT_NO_GNULIB_POSIXCHECK])
-AC_PROG_CC_STDC
+AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CPP
AC_PROG_GCC_TRADITIONAL
diff --git a/gl/modules/smack b/gl/modules/smack
index a6dcbaa62..1c4a541a6 100644
--- a/gl/modules/smack
+++ b/gl/modules/smack
@@ -10,7 +10,7 @@ configure.ac:
# Check whether libsmack is available
LIB_SMACK=
AC_ARG_ENABLE([libsmack],
- AC_HELP_STRING([--disable-libsmack],