bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* Results from running autoupdate on gnulib m4 files
@ 2020-09-27 10:28 Gavin Smith
  2020-09-27 14:14 ` Zack Weinberg
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Gavin Smith @ 2020-09-27 10:28 UTC (permalink / raw)
  To: autoconf, bug-gnulib

[-- Attachment #1: Type: text/plain, Size: 1424 bytes --]

Because of the upcoming autoconf 2.70 release gives more warnings, I 
checked the other files in gnulib in the m4 directory with

autoupdate -v *.m4 2>&1 | tee log

Fortunately, there are not too many issues (on top of the other issues I 
already reported).  Here are the relevant excerpts from the output:

-----
gnulib-common.m4:486: warning: AC_PROG_CC_C99 is obsolete; use AC_PROG_CC
gnulib-common.m4:487: warning: AC_PROG_CC_STDC is obsolete; use AC_PROG_CC
autoupdate: 'gnulib-common.m4' is updated

realloc.m4:11: warning: The preprocessor macro `STDC_HEADERS' is obsolete.
  Except in unusual embedded environments, you can safely include all
  ISO C90 headers unconditionally.
autoupdate: 'realloc.m4' is updated

std-gnu11.m4:457: warning: AC_PROG_CC_C89 is obsolete; use AC_PROG_CC
std-gnu11.m4:459: warning: AC_PROG_CC_C99 is obsolete; use AC_PROG_CC
std-gnu11.m4:459: warning: AC_PROG_CC_STDC is obsolete; use AC_PROG_CC
autoupdate: 'std-gnu11.m4' is updated
-----

I went through the changes that autoupdate made and reverted what seemed to be
incorrect changes (e.g. AC_PREREQ version numbers).  The remaining 
changes are almost certainly incorrect but it shows where other problems 
are likely to arise:

* Use of AC_DECL_SYS_SIGLIST in strsignal.m4
* Redefinition of AC_CHECKING in several files to silence AC_CHECK_PROG
* AC_HEADER_STDC in realloc.m4 and malloc.m4

I've attached the diff to this email.


[-- Attachment #2: autoupdate-changes --]
[-- Type: text/plain, Size: 8740 bytes --]

diff --git a/m4/csharpcomp.m4 b/m4/csharpcomp.m4
index 77819d683..dcab1b754 100644
--- a/m4/csharpcomp.m4
+++ b/m4/csharpcomp.m4
@@ -15,12 +15,12 @@ AC_DEFUN([gt_CSHARPCOMP],
   AC_MSG_CHECKING([for C[#] compiler])
   HAVE_CSHARPCOMP=1
   pushdef([AC_MSG_CHECKING],[:])dnl
-  pushdef([AC_CHECKING],[:])dnl
+  pushdef([AS_MESSAGE([checking ...])],[:])dnl
   pushdef([AC_MSG_RESULT],[:])dnl
   AC_CHECK_PROG([HAVE_MCS_IN_PATH], [mcs], [yes])
   AC_CHECK_PROG([HAVE_CSC_IN_PATH], [csc], [yes])
   popdef([AC_MSG_RESULT])dnl
-  popdef([AC_CHECKING])dnl
+  popdef([AS_MESSAGE([checking ...])])dnl
   popdef([AC_MSG_CHECKING])dnl
   for impl in "$CSHARP_CHOICE" mono sscli no; do
     case "$impl" in
diff --git a/m4/csharpexec.m4 b/m4/csharpexec.m4
index 5158a1a58..4269e9232 100644
--- a/m4/csharpexec.m4
+++ b/m4/csharpexec.m4
@@ -21,12 +21,12 @@ AC_DEFUN([gt_CSHARPEXEC],
 ], MONO_PATH_SEPARATOR=';', MONO_PATH_SEPARATOR=':')
   HAVE_CSHARPEXEC=1
   pushdef([AC_MSG_CHECKING],[:])dnl
-  pushdef([AC_CHECKING],[:])dnl
+  pushdef([AS_MESSAGE([checking ...])],[:])dnl
   pushdef([AC_MSG_RESULT],[:])dnl
   AC_CHECK_PROG([HAVE_MONO_IN_PATH], [mono], [yes])
   AC_CHECK_PROG([HAVE_CLIX_IN_PATH], [clix], [yes])
   popdef([AC_MSG_RESULT])dnl
-  popdef([AC_CHECKING])dnl
+  popdef([AS_MESSAGE([checking ...])])dnl
   popdef([AC_MSG_CHECKING])dnl
   for impl in "$CSHARP_CHOICE" mono no; do
     case "$impl" in
diff --git a/m4/exponentd.m4 b/m4/exponentd.m4
index cca879782..457af3f94 100644
--- a/m4/exponentd.m4
+++ b/m4/exponentd.m4
@@ -91,12 +91,14 @@ int main ()
             [
               pushdef([AC_MSG_CHECKING],[:])dnl
               pushdef([AC_MSG_RESULT],[:])dnl
-              pushdef([AC_MSG_RESULT_UNQUOTED],[:])dnl
+              pushdef([_AS_ECHO_UNQUOTED([$as_me:${as_lineno-$LINENO}: result: ],[AS_MESSAGE_LOG_FD])
+_AS_ECHO_UNQUOTED([])],[:])dnl
               AC_C_BIGENDIAN(
                 [gl_cv_cc_double_expbit0="word 0 bit 20"],
                 [gl_cv_cc_double_expbit0="word 1 bit 20"],
                 [gl_cv_cc_double_expbit0="unknown"])
-              popdef([AC_MSG_RESULT_UNQUOTED])dnl
+              popdef([_AS_ECHO_UNQUOTED([$as_me:${as_lineno-$LINENO}: result: ],[AS_MESSAGE_LOG_FD])
+_AS_ECHO_UNQUOTED([])])dnl
               popdef([AC_MSG_RESULT])dnl
               popdef([AC_MSG_CHECKING])dnl
             ])
diff --git a/m4/gethostname.m4 b/m4/gethostname.m4
index 1d05b2a60..1d5c0d450 100644
--- a/m4/gethostname.m4
+++ b/m4/gethostname.m4
@@ -74,7 +74,7 @@ lucky
         dnl mingw.
         gl_cv_decl_HOST_NAME_MAX=256
       else
-        _AC_COMPUTE_INT([MAXHOSTNAMELEN], [gl_cv_decl_HOST_NAME_MAX], [
+        AC_COMPUTE_INT([gl_cv_decl_HOST_NAME_MAX],[MAXHOSTNAMELEN],[
 #include <sys/types.h>
 #if HAVE_SYS_PARAM_H
 # include <sys/param.h>
@@ -85,8 +85,7 @@ lucky
 #if HAVE_NETDB_H
 # include <netdb.h>
 #endif
-],
-          [dnl The system does not define MAXHOSTNAMELEN in any of the common
+],[dnl The system does not define MAXHOSTNAMELEN in any of the common
            dnl headers. Use a safe fallback.
            gl_cv_decl_HOST_NAME_MAX=256
           ])
diff --git a/m4/javacomp.m4 b/m4/javacomp.m4
index b5eea0795..9c8ecc1f4 100644
--- a/m4/javacomp.m4
+++ b/m4/javacomp.m4
@@ -495,13 +495,13 @@ changequote([,])dnl
   fi
   if test -z "$HAVE_JAVACOMP"; then
     pushdef([AC_MSG_CHECKING],[:])dnl
-    pushdef([AC_CHECKING],[:])dnl
+    pushdef([AS_MESSAGE([checking ...])],[:])dnl
     pushdef([AC_MSG_RESULT],[:])dnl
     AC_CHECK_PROG([HAVE_GCJ_IN_PATH], [gcj], [yes])
     AC_CHECK_PROG([HAVE_JAVAC_IN_PATH], [javac], [yes])
     AC_CHECK_PROG([HAVE_JIKES_IN_PATH], [jikes], [yes])
     popdef([AC_MSG_RESULT])dnl
-    popdef([AC_CHECKING])dnl
+    popdef([AS_MESSAGE([checking ...])])dnl
     popdef([AC_MSG_CHECKING])dnl
     if test -z "$HAVE_JAVACOMP" && test -n "$HAVE_GCJ_IN_PATH"; then
       dnl Test for a good gcj version (>= 3.0).
diff --git a/m4/javaexec.m4 b/m4/javaexec.m4
index c69575b85..83ed47455 100644
--- a/m4/javaexec.m4
+++ b/m4/javaexec.m4
@@ -28,14 +28,14 @@ AC_DEFUN([gt_JAVAEXEC],
     CONF_JAVA="$JAVA"
   else
     pushdef([AC_MSG_CHECKING],[:])dnl
-    pushdef([AC_CHECKING],[:])dnl
+    pushdef([AS_MESSAGE([checking ...])],[:])dnl
     pushdef([AC_MSG_RESULT],[:])dnl
     AC_CHECK_PROG([HAVE_GIJ_IN_PATH], [gij], [yes])
     AC_CHECK_PROG([HAVE_JAVA_IN_PATH], [java], [yes])
     AC_CHECK_PROG([HAVE_JRE_IN_PATH], [jre], [yes])
     AC_CHECK_PROG([HAVE_JVIEW_IN_PATH], [jview], [yes])
     popdef([AC_MSG_RESULT])dnl
-    popdef([AC_CHECKING])dnl
+    popdef([AS_MESSAGE([checking ...])])dnl
     popdef([AC_MSG_CHECKING])dnl
     m4_if([$1], , , [
       save_CLASSPATH="$CLASSPATH"
diff --git a/m4/malloc.m4 b/m4/malloc.m4
index c1f8ea32f..7b4faab96 100644
--- a/m4/malloc.m4
+++ b/m4/malloc.m4
@@ -8,7 +8,15 @@ dnl with or without modifications, as long as this notice is preserved.
 # https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
 AC_DEFUN([_AC_FUNC_MALLOC_IF],
 [
-  AC_REQUIRE([AC_HEADER_STDC])dnl
+  AC_REQUIRE([m4_warn([obsolete],
+[The preprocessor macro `STDC_HEADERS' is obsolete.
+  Except in unusual embedded environments, you can safely include all
+  ISO C90 headers unconditionally.])dnl
+# Autoupdate added the next two lines to ensure that your configure
+# script's behavior did not change.  They are probably safe to remove.
+AC_CHECK_INCLUDES_DEFAULT
+AC_PROG_EGREP
+])dnl
   AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
   AC_CHECK_HEADERS([stdlib.h])
   AC_CACHE_CHECK([for GNU libc compatible malloc],
diff --git a/m4/realloc.m4 b/m4/realloc.m4
index 85b8f874f..4fb19d9ff 100644
--- a/m4/realloc.m4
+++ b/m4/realloc.m4
@@ -8,7 +8,15 @@ dnl with or without modifications, as long as this notice is preserved.
 # https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
 AC_DEFUN([_AC_FUNC_REALLOC_IF],
 [
-  AC_REQUIRE([AC_HEADER_STDC])dnl
+  AC_REQUIRE([m4_warn([obsolete],
+[The preprocessor macro `STDC_HEADERS' is obsolete.
+  Except in unusual embedded environments, you can safely include all
+  ISO C90 headers unconditionally.])dnl
+# Autoupdate added the next two lines to ensure that your configure
+# script's behavior did not change.  They are probably safe to remove.
+AC_CHECK_INCLUDES_DEFAULT
+AC_PROG_EGREP
+])dnl
   AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
   AC_CHECK_HEADERS([stdlib.h])
   AC_CACHE_CHECK([for GNU libc compatible realloc],
diff --git a/m4/std-gnu11.m4 b/m4/std-gnu11.m4
index db833d820..a20d5b120 100644
--- a/m4/std-gnu11.m4
+++ b/m4/std-gnu11.m4
@@ -454,26 +454,50 @@ dnl preferably extc11.
 ])# _AC_PROG_CC_C11
 
 
-# AC_PROG_CC_C89
+# m4_warn([obsolete],
+[AC_PROG_CC_C89 is obsolete; use AC_PROG_CC
+])dnl
+AC_REQUIRE(AC_PROG_CC)
 # --------------
-# Do not use AU_ALIAS here and in AC_PROG_CC_C99 and AC_PROG_CC_STDC,
+# Do not use AU_ALIAS here and in m4_warn([obsolete],
+[AC_PROG_CC_C99 is obsolete; use AC_PROG_CC
+])dnl
+AC_REQUIRE(AC_PROG_CC) and m4_warn([obsolete],
+[AC_PROG_CC_STDC is obsolete; use AC_PROG_CC
+])dnl
+AC_REQUIRE(AC_PROG_CC),
 # as that'd be incompatible with how Automake redefines AC_PROG_CC.  See
 # <https://lists.gnu.org/r/autoconf/2012-10/msg00048.html>.
-AU_DEFUN([AC_PROG_CC_C89],
+AU_DEFUN([m4_warn([obsolete],
+[AC_PROG_CC_C89 is obsolete; use AC_PROG_CC
+])dnl
+AC_REQUIRE(AC_PROG_CC)],
   [AC_REQUIRE([AC_PROG_CC])],
   [$0 is obsolete; use AC_PROG_CC]
 )
 
-# AC_PROG_CC_C99
+# m4_warn([obsolete],
+[AC_PROG_CC_C99 is obsolete; use AC_PROG_CC
+])dnl
+AC_REQUIRE(AC_PROG_CC)
 # --------------
-AU_DEFUN([AC_PROG_CC_C99],
+AU_DEFUN([m4_warn([obsolete],
+[AC_PROG_CC_C99 is obsolete; use AC_PROG_CC
+])dnl
+AC_REQUIRE(AC_PROG_CC)],
   [AC_REQUIRE([AC_PROG_CC])],
   [$0 is obsolete; use AC_PROG_CC]
 )
 
-# AC_PROG_CC_STDC
+# m4_warn([obsolete],
+[AC_PROG_CC_STDC is obsolete; use AC_PROG_CC
+])dnl
+AC_REQUIRE(AC_PROG_CC)
 # ---------------
-AU_DEFUN([AC_PROG_CC_STDC],
+AU_DEFUN([m4_warn([obsolete],
+[AC_PROG_CC_STDC is obsolete; use AC_PROG_CC
+])dnl
+AC_REQUIRE(AC_PROG_CC)],
   [AC_REQUIRE([AC_PROG_CC])],
   [$0 is obsolete; use AC_PROG_CC]
 )
diff --git a/m4/strsignal.m4 b/m4/strsignal.m4
index e8451fc78..3b1693040 100644
--- a/m4/strsignal.m4
+++ b/m4/strsignal.m4
@@ -54,6 +54,12 @@ AC_DEFUN([gl_FUNC_STRSIGNAL],
 # Prerequisites of lib/strsignal.c.
 AC_DEFUN([gl_PREREQ_STRSIGNAL], [
   AC_CHECK_HEADERS_ONCE([unistd.h])
-  AC_REQUIRE([AC_DECL_SYS_SIGLIST])
+  AC_REQUIRE([AC_CHECK_DECLS([sys_siglist],[],[],[#include <signal.h>
+/* NetBSD declares sys_siglist in unistd.h.  */
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+])
+])
   AC_CHECK_DECLS([_sys_siglist], [], [], [[#include <signal.h>]])
 ])

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: Results from running autoupdate on gnulib m4 files
  2020-09-27 10:28 Results from running autoupdate on gnulib m4 files Gavin Smith
@ 2020-09-27 14:14 ` Zack Weinberg
  2020-09-27 17:41   ` Paul Eggert
  2020-09-27 22:31 ` Bruno Haible
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Zack Weinberg @ 2020-09-27 14:14 UTC (permalink / raw)
  To: Gavin Smith; +Cc: Autoconf, Gnulib bugs

On Sun, Sep 27, 2020 at 6:29 AM Gavin Smith <gavinsmith0123@gmail.com> wrote:
> Because of the upcoming autoconf 2.70 release gives more warnings, I
> checked the other files in gnulib in the m4 directory with
>
> autoupdate -v *.m4 2>&1 | tee log

Thanks for doing this.  I was getting set up to do it myself, but I
got hung up on an unrelated problem (the version of "gettext" in
Debian is severely outdated and this makes it hard to run the gnulib
test suite).

The diff produced by autoupdate is mostly not usable as is.   In fact,
it looks to me more like a todo list for bugs and missing features in
autoupdate itself :-/  For instance, replacing
`AC_REQUIRE([AC_HEADER_STDC])` with `AC_REQUIRE([m4_warn([obsolete],
...])` is Just Plain Wrong, as is replacing `pushdef([AC_CHECKING],
[:])` with `pushdef([AS_MESSAGE([checking ...])],[:])`.

However, the change to m4/gethostname.m4 looks correct.

> * Redefinition of AC_CHECKING in several files to silence AC_CHECK_PROG

This was discussed previously at
https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00032.html .
It remains my opinion that the correct fix is to convert all of these
to AC_CACHE_CHECK and not try to hide any checks from the person
running configure.

zw


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Results from running autoupdate on gnulib m4 files
  2020-09-27 14:14 ` Zack Weinberg
@ 2020-09-27 17:41   ` Paul Eggert
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Eggert @ 2020-09-27 17:41 UTC (permalink / raw)
  To: Zack Weinberg, Gavin Smith; +Cc: Autoconf, Gnulib bugs

On 9/27/20 7:14 AM, Zack Weinberg wrote:
> It remains my opinion that the correct fix is to convert all of these
> to AC_CACHE_CHECK and not try to hide any checks from the person
> running configure.

Bruno and I had a conversation on bug-gnulib about this recently, and he is of 
the opinion that gl_SILENT is a good way to hide these checks. I'm not so sure. 
Currently Gnulib defines gl_SILENT in m4/gnulib-common.m4 as an experiment, but 
never uses it.

See the thread ending here:

https://lists.gnu.org/r/bug-gnulib/2020-09/msg00093.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Results from running autoupdate on gnulib m4 files
  2020-09-27 10:28 Results from running autoupdate on gnulib m4 files Gavin Smith
  2020-09-27 14:14 ` Zack Weinberg
@ 2020-09-27 22:31 ` Bruno Haible
  2020-09-27 22:53 ` Bruno Haible
  2020-09-27 23:00 ` Bruno Haible
  3 siblings, 0 replies; 6+ messages in thread
From: Bruno Haible @ 2020-09-27 22:31 UTC (permalink / raw)
  To: bug-gnulib; +Cc: Gavin Smith

Gavin Smith wrote:
> * AC_HEADER_STDC in realloc.m4 and malloc.m4

Fixed like this. We're assuming that <stdlib.h> exists, already since
2002-11-22.


2020-09-27  Bruno Haible  <bruno@clisp.org>

	Avoid "warning: The macro `AC_HEADER_STDC' is obsolete".
	Reported by Gavin Smith <gavinsmith0123@gmail.com> in
	<https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00154.html>.
	Based on a patch by Paul Eggert.
	* m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Don't require AC_HEADER_STDC. Don't
	test STDC_HEADERS. Assume <stdlib.h> exists.
	* m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Likewise.

diff --git a/m4/malloc.m4 b/m4/malloc.m4
index c1f8ea3..3823566 100644
--- a/m4/malloc.m4
+++ b/m4/malloc.m4
@@ -1,4 +1,4 @@
-# malloc.m4 serial 20
+# malloc.m4 serial 21
 dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,18 +8,12 @@ dnl with or without modifications, as long as this notice is preserved.
 # https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
 AC_DEFUN([_AC_FUNC_MALLOC_IF],
 [
-  AC_REQUIRE([AC_HEADER_STDC])dnl
   AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
-  AC_CHECK_HEADERS([stdlib.h])
   AC_CACHE_CHECK([for GNU libc compatible malloc],
     [ac_cv_func_malloc_0_nonnull],
     [AC_RUN_IFELSE(
        [AC_LANG_PROGRAM(
-          [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-            # include <stdlib.h>
-            #else
-            char *malloc ();
-            #endif
+          [[#include <stdlib.h>
           ]],
           [[char *p = malloc (0);
             int result = !p;
diff --git a/m4/realloc.m4 b/m4/realloc.m4
index 85b8f87..53967f4 100644
--- a/m4/realloc.m4
+++ b/m4/realloc.m4
@@ -1,4 +1,4 @@
-# realloc.m4 serial 18
+# realloc.m4 serial 19
 dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,18 +8,12 @@ dnl with or without modifications, as long as this notice is preserved.
 # https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
 AC_DEFUN([_AC_FUNC_REALLOC_IF],
 [
-  AC_REQUIRE([AC_HEADER_STDC])dnl
   AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
-  AC_CHECK_HEADERS([stdlib.h])
   AC_CACHE_CHECK([for GNU libc compatible realloc],
     [ac_cv_func_realloc_0_nonnull],
     [AC_RUN_IFELSE(
        [AC_LANG_PROGRAM(
-          [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-            # include <stdlib.h>
-            #else
-            char *realloc ();
-            #endif
+          [[#include <stdlib.h>
           ]],
           [[char *p = realloc (0, 0);
             int result = !p;



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: Results from running autoupdate on gnulib m4 files
  2020-09-27 10:28 Results from running autoupdate on gnulib m4 files Gavin Smith
  2020-09-27 14:14 ` Zack Weinberg
  2020-09-27 22:31 ` Bruno Haible
@ 2020-09-27 22:53 ` Bruno Haible
  2020-09-27 23:00 ` Bruno Haible
  3 siblings, 0 replies; 6+ messages in thread
From: Bruno Haible @ 2020-09-27 22:53 UTC (permalink / raw)
  To: bug-gnulib; +Cc: Gavin Smith

[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]

Gavin Smith wrote:
> * Use of AC_DECL_SYS_SIGLIST in strsignal.m4

These patches fix two of the issues you reported.

For sys_siglist, we can nowadays assume it is declared in <signal.h>.
The autoconf code has a comment
  /* NetBSD declares sys_siglist in unistd.h.  */
but this must apply to NetBSD versions < 3.0. NetBSD >= 3.0 declares sys_siglist
also in <signal.h>.


2020-09-27  Bruno Haible  <bruno@clisp.org>

	Avoid "warning: The macro `AC_DECL_SYS_SIGLIST' is obsolete".
	Reported by Gavin Smith <gavinsmith0123@gmail.com> in
	<https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00154.html>.
	* m4/strsignal.m4 (gl_PREREQ_STRSIGNAL): Check for sys_siglist
	ourselves; don't use AC_DECL_SYS_SIGLIST.

2020-09-27  Bruno Haible  <bruno@clisp.org>

	Avoid "warning: The macro `_AC_COMPUTE_INT' is obsolete".
	Reported by Gavin Smith <gavinsmith0123@gmail.com> in
	<https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00154.html>.
	* m4/gethostname.m4 (gl_PREREQ_HOST_NAME_MAX): Use AC_COMPUTE_INT
	instead of _AC_COMPUTE_INT.


[-- Attachment #2: 0001-Avoid-warning-The-macro-_AC_COMPUTE_INT-is-obsolete.patch --]
[-- Type: text/x-patch, Size: 1959 bytes --]

From 0d955740d5d02c8acfe500c2d8046dea01c555bc Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Mon, 28 Sep 2020 00:39:54 +0200
Subject: [PATCH 1/2] Avoid "warning: The macro `_AC_COMPUTE_INT' is obsolete".

Reported by Gavin Smith <gavinsmith0123@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00154.html>.

* m4/gethostname.m4 (gl_PREREQ_HOST_NAME_MAX): Use AC_COMPUTE_INT
instead of _AC_COMPUTE_INT.
---
 ChangeLog         | 8 ++++++++
 m4/gethostname.m4 | 4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d2f9f15..a17008f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2020-09-27  Bruno Haible  <bruno@clisp.org>
 
+	Avoid "warning: The macro `_AC_COMPUTE_INT' is obsolete".
+	Reported by Gavin Smith <gavinsmith0123@gmail.com> in
+	<https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00154.html>.
+	* m4/gethostname.m4 (gl_PREREQ_HOST_NAME_MAX): Use AC_COMPUTE_INT
+	instead of _AC_COMPUTE_INT.
+
+2020-09-27  Bruno Haible  <bruno@clisp.org>
+
 	Avoid "warning: The macro `AC_HEADER_STDC' is obsolete".
 	Reported by Gavin Smith <gavinsmith0123@gmail.com> in
 	<https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00154.html>.
diff --git a/m4/gethostname.m4 b/m4/gethostname.m4
index 1d05b2a..c1f24e6 100644
--- a/m4/gethostname.m4
+++ b/m4/gethostname.m4
@@ -1,4 +1,4 @@
-# gethostname.m4 serial 14
+# gethostname.m4 serial 15
 dnl Copyright (C) 2002, 2008-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -74,7 +74,7 @@ lucky
         dnl mingw.
         gl_cv_decl_HOST_NAME_MAX=256
       else
-        _AC_COMPUTE_INT([MAXHOSTNAMELEN], [gl_cv_decl_HOST_NAME_MAX], [
+        AC_COMPUTE_INT([gl_cv_decl_HOST_NAME_MAX], [MAXHOSTNAMELEN], [
 #include <sys/types.h>
 #if HAVE_SYS_PARAM_H
 # include <sys/param.h>
-- 
2.7.4


[-- Attachment #3: 0002-Avoid-warning-The-macro-AC_DECL_SYS_SIGLIST-is-obsol.patch --]
[-- Type: text/x-patch, Size: 1988 bytes --]

From 02b29b87878354203b133a86c57e77f9ea9d8bca Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Mon, 28 Sep 2020 00:49:20 +0200
Subject: [PATCH 2/2] Avoid "warning: The macro `AC_DECL_SYS_SIGLIST' is
 obsolete".

Reported by Gavin Smith <gavinsmith0123@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00154.html>.

* m4/strsignal.m4 (gl_PREREQ_STRSIGNAL): Check for sys_siglist
ourselves; don't use AC_DECL_SYS_SIGLIST.
---
 ChangeLog       | 8 ++++++++
 m4/strsignal.m4 | 4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a17008f..f57bdaf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2020-09-27  Bruno Haible  <bruno@clisp.org>
 
+	Avoid "warning: The macro `AC_DECL_SYS_SIGLIST' is obsolete".
+	Reported by Gavin Smith <gavinsmith0123@gmail.com> in
+	<https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00154.html>.
+	* m4/strsignal.m4 (gl_PREREQ_STRSIGNAL): Check for sys_siglist
+	ourselves; don't use AC_DECL_SYS_SIGLIST.
+
+2020-09-27  Bruno Haible  <bruno@clisp.org>
+
 	Avoid "warning: The macro `_AC_COMPUTE_INT' is obsolete".
 	Reported by Gavin Smith <gavinsmith0123@gmail.com> in
 	<https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00154.html>.
diff --git a/m4/strsignal.m4 b/m4/strsignal.m4
index e8451fc..0b7a59b 100644
--- a/m4/strsignal.m4
+++ b/m4/strsignal.m4
@@ -1,4 +1,4 @@
-# strsignal.m4 serial 8
+# strsignal.m4 serial 9
 dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -54,6 +54,6 @@ AC_DEFUN([gl_FUNC_STRSIGNAL],
 # Prerequisites of lib/strsignal.c.
 AC_DEFUN([gl_PREREQ_STRSIGNAL], [
   AC_CHECK_HEADERS_ONCE([unistd.h])
-  AC_REQUIRE([AC_DECL_SYS_SIGLIST])
+  AC_CHECK_DECLS([sys_siglist], [], [], [[#include <signal.h>]])
   AC_CHECK_DECLS([_sys_siglist], [], [], [[#include <signal.h>]])
 ])
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: Results from running autoupdate on gnulib m4 files
  2020-09-27 10:28 Results from running autoupdate on gnulib m4 files Gavin Smith
                   ` (2 preceding siblings ...)
  2020-09-27 22:53 ` Bruno Haible
@ 2020-09-27 23:00 ` Bruno Haible
  3 siblings, 0 replies; 6+ messages in thread
From: Bruno Haible @ 2020-09-27 23:00 UTC (permalink / raw)
  To: bug-gnulib; +Cc: Gavin Smith, autoconf

Gavin Smith wrote:
> * Redefinition of AC_CHECKING in several files to silence AC_CHECK_PROG

The changes to m4/csharpcomp.m4, m4/csharpexec.m4, m4/exponentd.m4,
m4/javacomp.m4, m4/javaexec.m4 are unnecessary, because they don't
cause warnings from 'aclocal' nor from 'autoconf'.

I could replace these pushdef/popdef sequences with gl_SILENT. But
it's not high priority.

Bruno



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-09-27 23:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-27 10:28 Results from running autoupdate on gnulib m4 files Gavin Smith
2020-09-27 14:14 ` Zack Weinberg
2020-09-27 17:41   ` Paul Eggert
2020-09-27 22:31 ` Bruno Haible
2020-09-27 22:53 ` Bruno Haible
2020-09-27 23:00 ` Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).