diff options
| author | cvs2svn <admin@example.com> | 2012-07-13 17:49:56 +0000 |
|---|---|---|
| committer | cvs2svn <admin@example.com> | 2012-07-13 17:49:56 +0000 |
| commit | ee04221ea8063435416c7e6369e6eae76843aa71 (patch) | |
| tree | 821921a1dd0a5a3cece91121e121cc63c4b68128 /src/lib/libcrypto/s390xcap.c | |
| parent | adf6731f6e1d04718aee00cb93435143046aee9a (diff) | |
| download | openbsd-eric_g2k12.tar.gz openbsd-eric_g2k12.tar.bz2 openbsd-eric_g2k12.zip | |
This commit was manufactured by cvs2git to create tag 'eric_g2k12'.eric_g2k12
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 ffbe0235f9..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) return; | ||
| 20 | |||
| 21 | memset(&ill_act,0,sizeof(ill_act)); | ||
| 22 | ill_act.sa_handler = ill_handler; | ||
| 23 | sigfillset(&ill_act.sa_mask); | ||
| 24 | sigdelset(&ill_act.sa_mask,SIGILL); | ||
| 25 | sigdelset(&ill_act.sa_mask,SIGTRAP); | ||
| 26 | sigprocmask(SIG_SETMASK,&ill_act.sa_mask,&oset); | ||
| 27 | sigaction (SIGILL,&ill_act,&oact); | ||
| 28 | |||
| 29 | /* protection against missing store-facility-list-extended */ | ||
| 30 | if (sigsetjmp(ill_jmp,0) == 0) | ||
| 31 | OPENSSL_s390xcap_P = OPENSSL_s390x_facilities(); | ||
| 32 | else | ||
| 33 | OPENSSL_s390xcap_P = 1UL<<63; | ||
| 34 | |||
| 35 | sigaction (SIGILL,&oact,NULL); | ||
| 36 | sigprocmask(SIG_SETMASK,&oset,NULL); | ||
| 37 | } | ||
