summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/s390xcap.c
diff options
context:
space:
mode:
authorcvs2svn <admin@example.com>2016-07-23 19:31:36 +0000
committercvs2svn <admin@example.com>2016-07-23 19:31:36 +0000
commit86c49b31af735796dfde37aa29473a30d36367db (patch)
treee9a354a92a348338fe2b361e2eda703cae23cfab /src/lib/libcrypto/s390xcap.c
parent19d5fe348e8926bac4521c5807aa64c45b8f7a41 (diff)
downloadopenbsd-OPENBSD_6_0_BASE.tar.gz
openbsd-OPENBSD_6_0_BASE.tar.bz2
openbsd-OPENBSD_6_0_BASE.zip
This commit was manufactured by cvs2git to create tag 'OPENBSD_6_0_BASE'.OPENBSD_6_0_BASE
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/s390xcap.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/lib/libcrypto/s390xcap.c b/src/lib/libcrypto/s390xcap.c
deleted file mode 100644
index 6fc60f27f2..0000000000
--- a/src/lib/libcrypto/s390xcap.c
+++ /dev/null
@@ -1,43 +0,0 @@
1/* $OpenBSD: s390xcap.c,v 1.3 2014/06/12 15:49:27 deraadt Exp $ */
2#include <stdio.h>
3#include <stdlib.h>
4#include <string.h>
5#include <setjmp.h>
6#include <signal.h>
7
8extern unsigned long OPENSSL_s390xcap_P[];
9
10static sigjmp_buf ill_jmp;
11static void ill_handler (int sig)
12{
13 siglongjmp(ill_jmp, sig);
14}
15
16unsigned long OPENSSL_s390x_facilities(void);
17
18void
19OPENSSL_cpuid_setup(void)
20{
21 sigset_t oset;
22 struct sigaction ill_act, oact;
23
24 if (OPENSSL_s390xcap_P[0])
25 return;
26
27 OPENSSL_s390xcap_P[0] = 1UL << (8*sizeof(unsigned long) - 1);
28
29 memset(&ill_act, 0, sizeof(ill_act));
30 ill_act.sa_handler = ill_handler;
31 sigfillset(&ill_act.sa_mask);
32 sigdelset(&ill_act.sa_mask, SIGILL);
33 sigdelset(&ill_act.sa_mask, SIGTRAP);
34 sigprocmask(SIG_SETMASK, &ill_act.sa_mask, &oset);
35 sigaction (SIGILL, &ill_act, &oact);
36
37 /* protection against missing store-facility-list-extended */
38 if (sigsetjmp(ill_jmp, 1) == 0)
39 OPENSSL_s390x_facilities();
40
41 sigaction (SIGILL, &oact, NULL);
42 sigprocmask(SIG_SETMASK, &oset, NULL);
43}