]> Savannah Git Hosting - gnulib.git/commitdiff
signalblocking: simplify and remove gl_SILENT
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 18 Sep 2020 02:16:07 +0000 (19:16 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 18 Sep 2020 02:19:15 +0000 (19:19 -0700)
gl_SILENT was problematic because if a trap was sprung, stderr
generated during the trap was lost.  Avoid the problem by
removing the need for gl_SILENT.
* m4/gnulib-common.m4 (GL_TMP_FD, gl_SILENT): Remove.
* m4/signalblocking.m4 (gl_SIGNALBLOCKING):
Simplify, avoiding the need for gl_SILENT while preserving the
ability of the user to override the value of the cache variable,
now ac_cv_func_sigprocmask.

ChangeLog
m4/gnulib-common.m4
m4/signalblocking.m4

index a489d5fa7fbd1a945b2189b3b9d05562c6e5b5f4..dc585078caf1a0b8d63e1e85dd509450221a44d2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2020-09-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       signalblocking: simplify and remove gl_SILENT
+       gl_SILENT was problematic because if a trap was sprung, stderr
+       generated during the trap was lost.  Avoid the problem by
+       removing the need for gl_SILENT.
+       * m4/gnulib-common.m4 (GL_TMP_FD, gl_SILENT): Remove.
+       * m4/signalblocking.m4 (gl_SIGNALBLOCKING):
+       Simplify, avoiding the need for gl_SILENT while preserving the
+       ability of the user to override the value of the cache variable,
+       now ac_cv_func_sigprocmask.
+
 2020-09-17  Bruno Haible  <bruno@clisp.org>
 
        sigprocmask: Fix configuration failure on Solaris 10 (regr. 2020-07-25).
index c94425cbee77c5ade751739c6393301dbdf05f0f..c9f8ca6db67df52dd72a46383287039ba4a81a5f 100644 (file)
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 58
+# gnulib-common.m4 serial 59
 dnl Copyright (C) 2007-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,
@@ -630,20 +630,6 @@ AC_DEFUN([gl_BIGENDIAN],
   AC_C_BIGENDIAN
 ])
 
-# A temporary file descriptor.
-# Must be less than 10, because dash 0.5.8 does not support redirections
-# with multi-digit file descriptors.
-m4_define([GL_TMP_FD], 9)
-
-# gl_SILENT(command)
-# executes command, but without the normal configure output.
-AC_DEFUN([gl_SILENT],
-[
-  exec GL_TMP_FD>&AS_MESSAGE_FD AS_MESSAGE_FD>/dev/null
-  $1
-  exec AS_MESSAGE_FD>&GL_TMP_FD GL_TMP_FD>&-
-])
-
 # gl_CACHE_VAL_SILENT(cache-id, command-to-set-it)
 # is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not
 # output a spurious "(cached)" mark in the midst of other configure output.
index cc0ca86bcbea658d285a9886a4cc9be995bc6c1c..b7cff8ddcee74819d24da7d40b111ae0742da685 100644 (file)
@@ -1,4 +1,4 @@
-# signalblocking.m4 serial 16
+# signalblocking.m4 serial 17
 dnl Copyright (C) 2001-2002, 2006-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,
@@ -13,20 +13,9 @@ AC_DEFUN([gl_SIGNALBLOCKING],
 [
   AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
   AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T])
-  AC_CACHE_CHECK([for sigprocmask],
-    [gl_cv_func_sigprocmask_v16],
-    [if test $gl_cv_type_sigset_t = yes; then
-       gl_SILENT([
-         AC_CHECK_FUNC([sigprocmask],
-           [gl_cv_func_sigprocmask_v16=yes],
-           [gl_cv_func_sigprocmask_v16=no])
-       ])
-     else
-       gl_cv_func_sigprocmask_v16=no
-     fi
-    ])
-  if test $gl_cv_func_sigprocmask_v16 != yes; then
-    HAVE_POSIX_SIGNALBLOCKING=0
+  HAVE_POSIX_SIGNALBLOCKING=0
+  if test "$gl_cv_type_sigset_t" = yes; then
+    AC_CHECK_FUNC([sigprocmask], [HAVE_POSIX_SIGNALBLOCKING=1])
   fi
 ])