# HG changeset patch # User Bruno Haible # Date 1214164448 -7200 # Node ID d7f97416cbe1d4b99f04d4c736a6e2640d6f4f86 # Parent a8938b62a3687f2a818fcb0640e084e7b93a1447 Define SA_RESTART also for mingw. diff -r a8938b62a368 -r d7f97416cbe1 ChangeLog --- a/ChangeLog Sun Jun 22 21:49:39 2008 +0200 +++ b/ChangeLog Sun Jun 22 21:54:08 2008 +0200 @@ -1,5 +1,8 @@ 2008-06-22 Bruno Haible + * lib/signal.in.h (SA_RESTART): New macro. + * lib/sigaction.c: Update comment. + * m4/sigaction.m4 (gl_SIGACTION): Require gl_SIGNAL_H_DEFAULTS. * m4/signalblocking.m4 (gl_PREREQ_SIG_HANDLER_H): New macro. diff -r a8938b62a368 -r d7f97416cbe1 lib/sigaction.c --- a/lib/sigaction.c Sun Jun 22 21:49:39 2008 +0200 +++ b/lib/sigaction.c Sun Jun 22 21:54:08 2008 +0200 @@ -35,11 +35,15 @@ 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. + 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 diff -r a8938b62a368 -r d7f97416cbe1 lib/signal.in.h --- a/lib/signal.in.h Sun Jun 22 21:49:39 2008 +0200 +++ b/lib/signal.in.h Sun Jun 22 21:54:08 2008 +0200 @@ -142,6 +142,7 @@ /* 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);