ppccap.c (302408) | ppccap.c (325335) |
---|---|
1#include <stdio.h> 2#include <stdlib.h> 3#include <string.h> 4#include <setjmp.h> 5#include <signal.h> 6#include <unistd.h> 7#if defined(__linux) || defined(_AIX) 8# include <sys/utsname.h> 9#endif | 1#include <stdio.h> 2#include <stdlib.h> 3#include <string.h> 4#include <setjmp.h> 5#include <signal.h> 6#include <unistd.h> 7#if defined(__linux) || defined(_AIX) 8# include <sys/utsname.h> 9#endif |
10#if defined(__APPLE__) && defined(__MACH__) 11# include <sys/types.h> 12# include <sys/sysctl.h> 13#endif |
|
10#include <openssl/crypto.h> 11#include <openssl/bn.h> 12 13#include "ppc_arch.h" 14 15unsigned int OPENSSL_ppccap_P = 0; 16 17static sigset_t all_masked; --- 100 unchanged lines hidden (view full) --- 118 if (sysconf(_SC_AIX_KERNEL_BITMODE) != 64) 119 return; 120# endif 121 if (uname(&uts) != 0 || atoi(uts.version) < 6) 122 return; 123 } 124#endif 125 | 14#include <openssl/crypto.h> 15#include <openssl/bn.h> 16 17#include "ppc_arch.h" 18 19unsigned int OPENSSL_ppccap_P = 0; 20 21static sigset_t all_masked; --- 100 unchanged lines hidden (view full) --- 122 if (sysconf(_SC_AIX_KERNEL_BITMODE) != 64) 123 return; 124# endif 125 if (uname(&uts) != 0 || atoi(uts.version) < 6) 126 return; 127 } 128#endif 129 |
130#if defined(__APPLE__) && defined(__MACH__) 131 { 132 int val; 133 size_t len = sizeof(val); 134 135 if (sysctlbyname("hw.optional.64bitops", &val, &len, NULL, 0) == 0) { 136 if (val) 137 OPENSSL_ppccap_P |= PPC_FPU64; 138 } 139 140 len = sizeof(val); 141 if (sysctlbyname("hw.optional.altivec", &val, &len, NULL, 0) == 0) { 142 if (val) 143 OPENSSL_ppccap_P |= PPC_ALTIVEC; 144 } 145 146 return; 147 } 148#endif 149 |
|
126 memset(&ill_act, 0, sizeof(ill_act)); 127 ill_act.sa_handler = ill_handler; 128 ill_act.sa_mask = all_masked; 129 130 sigprocmask(SIG_SETMASK, &ill_act.sa_mask, &oset); 131 sigaction(SIGILL, &ill_act, &ill_oact); 132 133 if (sizeof(size_t) == 4) { --- 26 unchanged lines hidden --- | 150 memset(&ill_act, 0, sizeof(ill_act)); 151 ill_act.sa_handler = ill_handler; 152 ill_act.sa_mask = all_masked; 153 154 sigprocmask(SIG_SETMASK, &ill_act.sa_mask, &oset); 155 sigaction(SIGILL, &ill_act, &ill_oact); 156 157 if (sizeof(size_t) == 4) { --- 26 unchanged lines hidden --- |