aboutsummaryrefslogtreecommitdiffstats
path: root/g10/signal.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/signal.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/g10/signal.c b/g10/signal.c
index c491329b4..d89b548b1 100644
--- a/g10/signal.c
+++ b/g10/signal.c
@@ -45,7 +45,7 @@ signal_name( int signum )
return sys_siglist[signum];
#else
static char buf[20];
- sprintf( "signal %d", signum );
+ sprintf(buf, "signal %d", signum );
return buf;
#endif
}
@@ -70,7 +70,7 @@ got_usr_signal( int sig )
caught_sigusr1 = 1;
}
-
+#ifndef __MINGW32__
static void
do_sigaction( int sig, struct sigaction *nact )
{
@@ -80,10 +80,12 @@ do_sigaction( int sig, struct sigaction *nact )
if( oact.sa_handler != SIG_IGN )
sigaction( sig, nact, NULL);
}
+#endif
void
init_signals()
{
+ #ifndef __MINGW32__
struct sigaction nact;
nact.sa_handler = got_fatal_signal;
@@ -97,12 +99,14 @@ init_signals()
do_sigaction( SIGSEGV, &nact );
nact.sa_handler = got_usr_signal;
sigaction( SIGUSR1, &nact, NULL );
+ #endif
}
void
pause_on_sigusr( int which )
{
+ #ifndef __MINGW32__
sigset_t mask, oldmask;
assert( which == 1 );
@@ -114,5 +118,6 @@ pause_on_sigusr( int which )
sigsuspend( &oldmask );
caught_sigusr1 = 0;
sigprocmask( SIG_UNBLOCK, &mask, NULL );
+ #endif
}