Adjust SA_RESTART workaround.

I want to get a bug report if something else than
DJGPP lacks SA_RESTART.
This commit is contained in:
Lasse Collin 2010-06-02 17:46:58 +03:00
parent e243145c84
commit e89d987056
1 changed files with 7 additions and 7 deletions

View File

@ -142,19 +142,19 @@ message_init(void)
*/ */
#ifdef SIGALRM #ifdef SIGALRM
// At least DJGPP lacks SA_RESTART. It's not essential for us (the // DJGPP lacks SA_RESTART, but it shouldn't give EINTR
// rest of the code can handle interrupted system calls), so just // in most places either.
// define it zero. # if defined(__DJGPP__) && !defined(SA_RESTART)
# ifndef SA_RESTART
# define SA_RESTART 0 # define SA_RESTART 0
# endif # endif
// Establish the signal handlers which set a flag to tell us that // Establish the signal handlers which set a flag to tell us that
// progress info should be updated. Since these signals don't // progress info should be updated. Since these signals don't
// require any quick action, we set SA_RESTART. // require any quick action, we set SA_RESTART. That way we don't
// need to block them either in signals_block() to keep stdio
// functions from getting EINTR.
static const int sigs[] = { static const int sigs[] = {
#ifdef SIGALRM
SIGALRM, SIGALRM,
#endif
#ifdef SIGINFO #ifdef SIGINFO
SIGINFO, SIGINFO,
#endif #endif