Allow disabling fopen in SIMD

This commit is contained in:
Kornel
2021-05-06 18:00:30 +01:00
parent 6c9f0897af
commit c2bc3511d5
5 changed files with 20 additions and 0 deletions

View File

@@ -66,6 +66,10 @@ check_feature(char *buffer, char *feature)
LOCAL(int)
parse_proc_cpuinfo(int bufsize)
{
#ifdef NO_PROC_FOPEN
return 1;
#endif
char *buffer = (char *)malloc(bufsize);
FILE *fd;

View File

@@ -71,6 +71,10 @@ check_cpuinfo(char *buffer, const char *field, char *value)
LOCAL(int)
parse_proc_cpuinfo(int bufsize)
{
#ifdef NO_PROC_FOPEN
return 1;
#endif
char *buffer = (char *)malloc(bufsize);
FILE *fd;

View File

@@ -32,6 +32,10 @@ static THREAD_LOCAL unsigned int simd_support = ~0;
LOCAL(void)
parse_proc_cpuinfo(const char *search_string)
{
#ifdef NO_PROC_FOPEN
return;
#endif
const char *file_name = "/proc/cpuinfo";
char cpuinfo_line[256];
FILE *f = NULL;

View File

@@ -64,6 +64,10 @@ check_feature(char *buffer, char *feature)
LOCAL(int)
parse_proc_cpuinfo(int bufsize)
{
#ifdef NO_PROC_FOPEN
return 1;
#endif
char *buffer = (char *)malloc(bufsize);
FILE *fd;

View File

@@ -79,6 +79,10 @@ check_feature(char *buffer, char *feature)
LOCAL(int)
parse_proc_cpuinfo(int bufsize)
{
#ifdef NO_PROC_FOPEN
return 1;
#endif
char *buffer = (char *)malloc(bufsize);
FILE *fd;