Merge pull request #2873 from martin-frbg/issue2871

Check for __linux rather than linux in cpuid code and benchmarks
This commit is contained in:
Martin Kroeker 2020-10-01 06:38:22 +02:00 committed by GitHub
commit d3c0d6811b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
56 changed files with 63 additions and 61 deletions

View File

@ -146,7 +146,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -145,7 +145,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -152,7 +152,7 @@ int main(int argc, char *argv[]){
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -152,7 +152,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -151,7 +151,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -154,7 +154,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -145,7 +145,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -214,7 +214,7 @@ int main(int argc, char *argv[]){
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -197,7 +197,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -163,7 +163,7 @@ int main(int argc, char *argv[]){
loops = atoi(p);
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -181,7 +181,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -165,7 +165,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -165,7 +165,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -188,7 +188,7 @@ int main(int argc, char *argv[]){
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -158,7 +158,7 @@ int main(int argc, char *argv[]){
exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -151,7 +151,7 @@ int main(int argc, char *argv[]){
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -152,7 +152,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -149,7 +149,7 @@ int main(int argc, char *argv[]){
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -151,7 +151,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -150,7 +150,7 @@ int main(int argc, char *argv[]){
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -149,7 +149,7 @@ int main(int argc, char *argv[]){
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -155,7 +155,7 @@ int main(int argc, char *argv[]){
exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -145,7 +145,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -145,7 +145,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -139,7 +139,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -139,7 +139,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -174,7 +174,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -139,7 +139,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -139,7 +139,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -145,7 +145,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -156,7 +156,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -168,7 +168,7 @@ int main(int argc, char *argv[])
exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -150,7 +150,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -163,7 +163,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -149,7 +149,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -153,7 +153,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -151,7 +151,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -162,7 +162,7 @@ int main(int argc, char *argv[]){
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -162,7 +162,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -144,7 +144,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -150,7 +150,7 @@ int main(int argc, char *argv[]){
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -162,7 +162,7 @@ int main(int argc, char *argv[]){
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -159,7 +159,7 @@ int main(int argc, char *argv[]){
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -132,7 +132,7 @@ int main(int argc, char *argv[])
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -132,7 +132,7 @@ int main(int argc, char *argv[])
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -162,7 +162,7 @@ int main(int argc, char *argv[]){
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -132,7 +132,7 @@ int main(int argc, char *argv[])
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -172,7 +172,7 @@ int main(int argc, char *argv[]){
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -159,7 +159,7 @@ int main(int argc, char *argv[]){
uplo,diag,loops);
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -146,7 +146,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -145,7 +145,7 @@ int main(int argc, char *argv[]){
fprintf(stderr,"Out of Memory!!\n");exit(1);
}
#ifdef linux
#ifdef __linux
srandom(getpid());
#endif

View File

@ -54,7 +54,7 @@ static char *cpuname_lower[] = {
int get_feature(char *search)
{
#ifdef linux
#ifdef __linux
FILE *infile;
char buffer[2048], *p,*t;
p = (char *) NULL ;
@ -90,7 +90,7 @@ int get_feature(char *search)
int detect(void)
{
#ifdef linux
#ifdef __linux
FILE *infile;
char buffer[512], *p;
@ -289,7 +289,7 @@ void get_libname(void)
void get_features(void)
{
#ifdef linux
#ifdef __linux
FILE *infile;
char buffer[2048], *p,*t;
p = (char *) NULL ;

View File

@ -90,7 +90,7 @@ static char *cpuname_lower[] = {
int get_feature(char *search)
{
#ifdef linux
#ifdef __linux
FILE *infile;
char buffer[2048], *p,*t;
p = (char *) NULL ;
@ -126,7 +126,7 @@ int get_feature(char *search)
int detect(void)
{
#ifdef linux
#ifdef __linux
FILE *infile;
char buffer[512], *p, *cpu_part = NULL, *cpu_implementer = NULL;
@ -242,7 +242,7 @@ void get_cpucount(void)
{
int n=0;
#ifdef linux
#ifdef __linux
FILE *infile;
char buffer[2048], *p,*t;
p = (char *) NULL ;
@ -441,7 +441,7 @@ void get_libname(void)
void get_features(void)
{
#ifdef linux
#ifdef __linux
FILE *infile;
char buffer[2048], *p,*t;
p = (char *) NULL ;

View File

@ -84,7 +84,7 @@ static char *cpuname[] = {
int detect(void){
#ifdef linux
#ifdef __linux
FILE *infile;
char buffer[512], *p;

View File

@ -90,7 +90,7 @@ static char *cpuname[] = {
int detect(void){
#ifdef linux
#ifdef __linux
FILE *infile;
char buffer[512], *p;

View File

@ -104,7 +104,7 @@ char *corename[] = {
int detect(void){
#ifdef linux
#ifdef __linux
FILE *infile;
char buffer[512], *p;
@ -214,6 +214,8 @@ switch ( id >> 16 ) {
return CPUTYPE_UNKNOWN;
}
#endif
return CPUTYPE_UNKNOWN;
}
void get_architecture(void){