In a comment you say that the mingw replacement for sigaction does not
implement SA_RESTART. We can do better, since the msvcrt library never sets
errno = EINTR anyway: Define SA_RESTART and ignore it.
2008-06-22 Bruno Haible <[EMAIL PROTECTED]>
* lib/signal.in.h (SA_RESTART): New macro.
* lib/sigaction.c: Update comment.
*** lib/signal.in.h.orig 2008-06-22 21:50:37.000000000 +0200
--- lib/signal.in.h 2008-06-22 21:50:26.000000000 +0200
***************
*** 142,147 ****
--- 142,148 ----
/* Unsupported flags are not present. */
# define SA_RESETHAND 1
# define SA_NODEFER 2
+ # define SA_RESTART 4
extern int sigaction (int, const struct sigaction *restrict,
struct sigaction *restrict);
*** lib/sigaction.c.orig 2008-06-22 21:50:37.000000000 +0200
--- lib/sigaction.c 2008-06-22 21:50:26.000000000 +0200
***************
*** 35,45 ****
the situation by reading static storage in a signal handler, which
POSIX warns is not generically async-signal-safe. Oh well.
! Additionally, SIGCHLD is not defined, so we don't implement
! SA_NOCLDSTOP or SA_NOCLDWAIT; sigaltstack() is not present, so we
! don't implement SA_ONSTACK; and siginterrupt() is not present, so
! we don't implement SA_RESTART. Supporting SA_SIGINFO is impossible
! to do portably.
POSIX states that an application should not mix signal() and
sigaction(). We support the use of signal() within the gnulib
--- 35,49 ----
the situation by reading static storage in a signal handler, which
POSIX warns is not generically async-signal-safe. Oh well.
! Additionally:
! - We don't implement SA_NOCLDSTOP or SA_NOCLDWAIT, because SIGCHLD
! is not defined.
! - We don't implement SA_ONSTACK, because sigaltstack() is not present.
! - We ignore SA_RESTART, because blocking Win32 calls are not interrupted
! anyway when an asynchronous signal occurs, and the MSVCRT runtime
! never sets errno to EINTR.
! - We don't implement SA_SIGINFO because it is impossible to do so
! portably.
POSIX states that an application should not mix signal() and
sigaction(). We support the use of signal() within the gnulib