bug-gnulib
[Top][All Lists]
Advanced

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

Re: [bug-gnulib] Re: new module 'sigprocmask'


From: Bruno Haible
Subject: Re: [bug-gnulib] Re: new module 'sigprocmask'
Date: Tue, 17 Oct 2006 14:42:14 +0200
User-agent: KMail/1.9.1

Eric Blake wrote:
> The mingw <sys/types.h> system header contains this snippet:
> 
> #ifndef _SIGSET_T_
> #define       _SIGSET_T_
> typedef int   _sigset_t;
> 
> #ifndef       _NO_OLDNAMES
> typedef _sigset_t     sigset_t;
> #endif
> #endif        /* Not _SIGSET_T_ */
> 
> It looks like you need to add a configure-time test whether sigset_t is 
> available, before redeclaring it to unsigned int yourself.

Yes. I added this.

2006-10-16  Bruno Haible  <address@hidden>

        * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
        * lib/sigprocmask.h: Include <sys/types.h>.
        (sigset_t): Use the system's definition if present.

diff -r -c3 --exclude=CVS gnulib-20061012/lib/sigprocmask.h 
gnulib-20061012-modified/lib/sigprocmask.h
*** gnulib-20061012/lib/sigprocmask.h   2006-10-13 03:53:03.000000000 +0200
--- gnulib-20061012-modified/lib/sigprocmask.h  2006-10-17 01:32:14.000000000 
+0200
***************
*** 20,25 ****
--- 20,28 ----
  
  #if ! HAVE_POSIX_SIGNALBLOCKING
  
+ /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
+ # include <sys/types.h>
+ 
  # include "verify.h"
  
  /* Maximum signal number + 1.  */
***************
*** 31,37 ****
--- 34,42 ----
  verify (NSIG <= 32);
  
  /* A set or mask of signals.  */
+ # if !HAVE_SIGSET_T
  typedef unsigned int sigset_t;
+ # endif
  
  /* Test whether a given signal is contained in a signal set.  */
  extern int sigismember (const sigset_t *set, int sig);
diff -r -c3 --exclude=CVS gnulib-20061012/m4/signalblocking.m4 
gnulib-20061012-modified/m4/signalblocking.m4
*** gnulib-20061012/m4/signalblocking.m4        2006-10-14 13:33:04.000000000 
+0200
--- gnulib-20061012-modified/m4/signalblocking.m4       2006-10-17 
01:31:27.000000000 +0200
***************
*** 1,4 ****
! # signalblocking.m4 serial 2 (gettext-0.15.1)
  dnl Copyright (C) 2001-2002, 2006 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 ----
! # signalblocking.m4 serial 3 (gettext-0.15.1)
  dnl Copyright (C) 2001-2002, 2006 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
***************
*** 25,31 ****
    fi
  ])
  
! # Prerequisites of lib/sigprocmask.c.
  AC_DEFUN([gl_PREREQ_SIGPROCMASK], [
    AC_CHECK_FUNCS_ONCE(raise)
  ])
--- 25,40 ----
    fi
  ])
  
! # Prerequisites of lib/sigprocmask.h and lib/sigprocmask.c.
  AC_DEFUN([gl_PREREQ_SIGPROCMASK], [
+   AC_CHECK_TYPES([sigset_t],
+     [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no],
+     [#include <signal.h>
+ /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
+ #include <sys/types.h>])
+   if test $gl_cv_type_sigset_t = yes; then
+     AC_DEFUN([HAVE_SIGSET_T],
+       [Define to 1 if you lack the sigprocmask function but have the sigset_t 
type.])
+   fi
    AC_CHECK_FUNCS_ONCE(raise)
  ])




reply via email to

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