bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sa_sigaction


From: Bruno Haible
Subject: Re: sa_sigaction
Date: Mon, 22 Sep 2008 00:49:53 +0200
User-agent: KMail/1.5.4

Eric Blake wrote on 2008-08-17:
> > One AC_SUBST line is redundant (already done in gl_SIGNAL_H_DEFAULTS). May I
> > remove it?
> 
> For that matter, the HAVE_SIGACTION and HAVE_SIGINFO_T macros also look
> redundant in that file.  Yes, go ahead and commit a cleanup.

The placement of the HAVE_STRUCT_SIGACTION_SA_SIGACTION also was not consistent
with the code structure in lib/. I'm committing this:


2008-09-21  Bruno Haible  <address@hidden>

        * m4/sigaction.m4 (gl_SIGACTION): Remove unnecessary AC_SUBST. Check
        whether 'struct sigaction' has sa_sigaction here...
        (gl_PREREQ_SIG_HANDLER_H): ... not here.
        (gl_PREREQ_SIGACTION): Remove unnecessary AC_SUBST.

--- m4/sigaction.m4.orig        2008-09-22 00:44:16.000000000 +0200
+++ m4/sigaction.m4     2008-09-22 00:42:23.000000000 +0200
@@ -1,4 +1,4 @@
-# sigaction.m4 serial 4
+# sigaction.m4 serial 5
 dnl Copyright (C) 2008 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,10 +8,16 @@
 AC_DEFUN([gl_SIGACTION],
 [
   AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
-  AC_REPLACE_FUNCS([sigaction])
-  if test $ac_cv_func_sigaction = no ; then
+  AC_CHECK_FUNCS_ONCE([sigaction])
+  if test $ac_cv_func_sigaction = yes; then
+    AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], , ,
+                     [[#include <signal.h>]])
+    if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
+      HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
+    fi
+  else
     HAVE_SIGACTION=0
-    AC_SUBST([HAVE_SIGACTION])
+    AC_LIBOBJ([sigaction])
     gl_PREREQ_SIGACTION
   fi
 ])
@@ -29,7 +35,6 @@
   ]])
   if test $ac_cv_type_siginfo_t = no; then
     HAVE_SIGINFO_T=0
-    AC_SUBST([HAVE_SIGINFO_T])
   fi
 ])
 
@@ -37,10 +42,4 @@
 AC_DEFUN([gl_PREREQ_SIG_HANDLER_H],
 [
   AC_REQUIRE([AC_C_INLINE])
-  AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], , ,
-                   [[#include <signal.h>]])
-  if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
-    HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
-    AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
-  fi
 ])





reply via email to

[Prev in Thread] Current Thread [Next in Thread]