forked from enlightenment/efl
parent
3b28a8ee6f
commit
a84ea1ccee
|
@ -6,9 +6,13 @@
|
||||||
|
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
static sigjmp_buf detect_buf;
|
static sigjmp_buf detect_buf;
|
||||||
|
#endif
|
||||||
|
|
||||||
static int cpu_feature_mask = 0;
|
static int cpu_feature_mask = 0;
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
static void evas_common_cpu_catch_ill(int sig);
|
static void evas_common_cpu_catch_ill(int sig);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -16,6 +20,7 @@ evas_common_cpu_catch_ill(int sig)
|
||||||
{
|
{
|
||||||
siglongjmp(detect_buf, 1);
|
siglongjmp(detect_buf, 1);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ( \
|
#if ( \
|
||||||
defined __i386__ || \
|
defined __i386__ || \
|
||||||
|
@ -76,6 +81,7 @@ evas_common_cpu_vis_test(void)
|
||||||
int
|
int
|
||||||
evas_common_cpu_feature_test(void (*feature)(void))
|
evas_common_cpu_feature_test(void (*feature)(void))
|
||||||
{
|
{
|
||||||
|
#ifndef WIN32
|
||||||
int enabled = 1;
|
int enabled = 1;
|
||||||
struct sigaction act, oact;
|
struct sigaction act, oact;
|
||||||
|
|
||||||
|
@ -91,6 +97,9 @@ evas_common_cpu_feature_test(void (*feature)(void))
|
||||||
feature();
|
feature();
|
||||||
sigaction(SIGILL, &oact, NULL);
|
sigaction(SIGILL, &oact, NULL);
|
||||||
return enabled;
|
return enabled;
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue