diff options
| author | djm <> | 2012-10-13 21:23:50 +0000 |
|---|---|---|
| committer | djm <> | 2012-10-13 21:23:50 +0000 |
| commit | d56dbc3c72494d4b68c03f5bcc3ae1f9df7b17df (patch) | |
| tree | 10ebe51c3542099b0ab8325d8f322372375dc3b4 /src/lib/libcrypto/s390xcap.c | |
| parent | bc685bd401e5657f7fb51b4e1a62a7a5c5ea4098 (diff) | |
| parent | 228cae30b117c2493f69ad3c195341cd6ec8d430 (diff) | |
| download | openbsd-d56dbc3c72494d4b68c03f5bcc3ae1f9df7b17df.tar.gz openbsd-d56dbc3c72494d4b68c03f5bcc3ae1f9df7b17df.tar.bz2 openbsd-d56dbc3c72494d4b68c03f5bcc3ae1f9df7b17df.zip | |
This commit was generated by cvs2git to track changes on a CVS vendor
branch.
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/s390xcap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/s390xcap.c b/src/lib/libcrypto/s390xcap.c index ffbe0235f9..f2e94ef47e 100644 --- a/src/lib/libcrypto/s390xcap.c +++ b/src/lib/libcrypto/s390xcap.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | #include <setjmp.h> | 4 | #include <setjmp.h> |
| 5 | #include <signal.h> | 5 | #include <signal.h> |
| 6 | 6 | ||
| 7 | extern unsigned long OPENSSL_s390xcap_P; | 7 | extern unsigned long OPENSSL_s390xcap_P[]; |
| 8 | 8 | ||
| 9 | static sigjmp_buf ill_jmp; | 9 | static sigjmp_buf ill_jmp; |
| 10 | static void ill_handler (int sig) { siglongjmp(ill_jmp,sig); } | 10 | static void ill_handler (int sig) { siglongjmp(ill_jmp,sig); } |
| @@ -16,7 +16,9 @@ void OPENSSL_cpuid_setup(void) | |||
| 16 | sigset_t oset; | 16 | sigset_t oset; |
| 17 | struct sigaction ill_act,oact; | 17 | struct sigaction ill_act,oact; |
| 18 | 18 | ||
| 19 | if (OPENSSL_s390xcap_P) return; | 19 | if (OPENSSL_s390xcap_P[0]) return; |
| 20 | |||
| 21 | OPENSSL_s390xcap_P[0] = 1UL<<(8*sizeof(unsigned long)-1); | ||
| 20 | 22 | ||
| 21 | memset(&ill_act,0,sizeof(ill_act)); | 23 | memset(&ill_act,0,sizeof(ill_act)); |
| 22 | ill_act.sa_handler = ill_handler; | 24 | ill_act.sa_handler = ill_handler; |
| @@ -27,10 +29,8 @@ void OPENSSL_cpuid_setup(void) | |||
| 27 | sigaction (SIGILL,&ill_act,&oact); | 29 | sigaction (SIGILL,&ill_act,&oact); |
| 28 | 30 | ||
| 29 | /* protection against missing store-facility-list-extended */ | 31 | /* protection against missing store-facility-list-extended */ |
| 30 | if (sigsetjmp(ill_jmp,0) == 0) | 32 | if (sigsetjmp(ill_jmp,1) == 0) |
| 31 | OPENSSL_s390xcap_P = OPENSSL_s390x_facilities(); | 33 | OPENSSL_s390x_facilities(); |
| 32 | else | ||
| 33 | OPENSSL_s390xcap_P = 1UL<<63; | ||
| 34 | 34 | ||
| 35 | sigaction (SIGILL,&oact,NULL); | 35 | sigaction (SIGILL,&oact,NULL); |
| 36 | sigprocmask(SIG_SETMASK,&oset,NULL); | 36 | sigprocmask(SIG_SETMASK,&oset,NULL); |
