diff options
author | Andy Polyakov <appro@openssl.org> | 2005-09-20 20:30:15 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2005-09-20 20:30:15 +0000 |
commit | 6d00101e9dae3b2a5a95d50d99b90f233d7f998b (patch) | |
tree | 6a05e027a4cadf82784ced42be49eac03840ce08 | |
parent | 7a06050cd356001ec80a9202f50de6eb4e09f6e7 (diff) |
Latest MSVCR80 doesn't tolerate unsupported signal numbers, throwing
fatal exceptions.
-rw-r--r-- | crypto/ui/ui_openssl.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/crypto/ui/ui_openssl.c b/crypto/ui/ui_openssl.c index 7c80f5feb2..f186a714dc 100644 --- a/crypto/ui/ui_openssl.c +++ b/crypto/ui/ui_openssl.c @@ -586,6 +586,14 @@ static void pushsig(void) sa.sa_handler=recsig; #endif +#ifdef OPENSSL_SYS_WIN32 + savsig[SIGABRT]=signal(SIGABRT,recsig); + savsig[SIGFPE]=signal(SIGFPE,recsig); + savsig[SIGILL]=signal(SIGILL,recsig); + savsig[SIGINT]=signal(SIGINT,recsig); + savsig[SIGSEGV]=signal(SIGSEGV,recsig); + savsig[SIGTERM]=signal(SIGTERM,recsig); +#else for (i=1; i<NX509_SIG; i++) { #ifdef SIGUSR1 @@ -606,6 +614,7 @@ static void pushsig(void) savsig[i]=signal(i,recsig); #endif } +#endif #ifdef SIGWINCH signal(SIGWINCH,SIG_DFL); @@ -616,6 +625,14 @@ static void popsig(void) { int i; +#ifdef OPENSSL_SYS_WIN32 + signal(SIGABRT,savsig[SIGABRT]); + signal(SIGFPE,savsig[SIGFPE]); + signal(SIGILL,savsig[SIGILL]); + signal(SIGINT,savsig[SIGINT]); + signal(SIGSEGV,savsig[SIGSEGV]); + signal(SIGTERM,savsig[SIGTERM]); +#else for (i=1; i<NX509_SIG; i++) { #ifdef SIGUSR1 @@ -632,6 +649,7 @@ static void popsig(void) signal(i,savsig[i]); #endif } +#endif } static void recsig(int i) |