summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/s390xcap.c
diff options
context:
space:
mode:
authorcvs2svn <admin@example.com>2015-03-08 16:48:49 +0000
committercvs2svn <admin@example.com>2015-03-08 16:48:49 +0000
commitdecf84ba5550c1656a7fdb51b5b81969590c3f03 (patch)
tree44872802e872bdfd60730fa9cf01d9d5751251c1 /src/lib/libcrypto/s390xcap.c
parent7a8f138352aa4eb7b65ac4b1a5fe7630fbee1427 (diff)
downloadopenbsd-libressl-v2.1.5.tar.gz
openbsd-libressl-v2.1.5.tar.bz2
openbsd-libressl-v2.1.5.zip
This commit was manufactured by cvs2git to create branch 'OPENBSD_5_7'.libressl-v2.1.5
Diffstat (limited to 'src/lib/libcrypto/s390xcap.c')
-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}