diff options
author | cvs2svn <admin@example.com> | 2014-02-27 21:04:58 +0000 |
---|---|---|
committer | cvs2svn <admin@example.com> | 2014-02-27 21:04:58 +0000 |
commit | 726818f36b5221c023cd04c4b90bdbc08e94cd96 (patch) | |
tree | cf8221f3aa5bf5a578ddf1ecf5677ad08c04d342 /src/lib/libcrypto/s390xcap.c | |
parent | 3b6d92e82b1421b811bcdec7f7fdfb31eeef18de (diff) | |
download | openbsd-OPENBSD_5_5_BASE.tar.gz openbsd-OPENBSD_5_5_BASE.tar.bz2 openbsd-OPENBSD_5_5_BASE.zip |
This commit was manufactured by cvs2git to create tag 'OPENBSD_5_5_BASE'.OPENBSD_5_5_BASE
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/s390xcap.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/lib/libcrypto/s390xcap.c b/src/lib/libcrypto/s390xcap.c deleted file mode 100644 index f2e94ef47e..0000000000 --- a/src/lib/libcrypto/s390xcap.c +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <stdlib.h> | ||
3 | #include <string.h> | ||
4 | #include <setjmp.h> | ||
5 | #include <signal.h> | ||
6 | |||
7 | extern unsigned long OPENSSL_s390xcap_P[]; | ||
8 | |||
9 | static sigjmp_buf ill_jmp; | ||
10 | static void ill_handler (int sig) { siglongjmp(ill_jmp,sig); } | ||
11 | |||
12 | unsigned long OPENSSL_s390x_facilities(void); | ||
13 | |||
14 | void OPENSSL_cpuid_setup(void) | ||
15 | { | ||
16 | sigset_t oset; | ||
17 | struct sigaction ill_act,oact; | ||
18 | |||
19 | if (OPENSSL_s390xcap_P[0]) return; | ||
20 | |||
21 | OPENSSL_s390xcap_P[0] = 1UL<<(8*sizeof(unsigned long)-1); | ||
22 | |||
23 | memset(&ill_act,0,sizeof(ill_act)); | ||
24 | ill_act.sa_handler = ill_handler; | ||
25 | sigfillset(&ill_act.sa_mask); | ||
26 | sigdelset(&ill_act.sa_mask,SIGILL); | ||
27 | sigdelset(&ill_act.sa_mask,SIGTRAP); | ||
28 | sigprocmask(SIG_SETMASK,&ill_act.sa_mask,&oset); | ||
29 | sigaction (SIGILL,&ill_act,&oact); | ||
30 | |||
31 | /* protection against missing store-facility-list-extended */ | ||
32 | if (sigsetjmp(ill_jmp,1) == 0) | ||
33 | OPENSSL_s390x_facilities(); | ||
34 | |||
35 | sigaction (SIGILL,&oact,NULL); | ||
36 | sigprocmask(SIG_SETMASK,&oset,NULL); | ||
37 | } | ||