Merge pull request #2873 from martin-frbg/issue2871
Check for __linux rather than linux in cpuid code and benchmarks
This commit is contained in:
commit
d3c0d6811b
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ int main(int argc, char *argv[]){
|
|||
}
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@ int main(int argc, char *argv[]){
|
|||
}
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ int main(int argc, char *argv[]){
|
|||
loops = atoi(p);
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ int main(int argc, char *argv[]){
|
|||
}
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ int main(int argc, char *argv[]){
|
|||
exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ int main(int argc, char *argv[]){
|
|||
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ int main(int argc, char *argv[]){
|
|||
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ int main(int argc, char *argv[]){
|
|||
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ int main(int argc, char *argv[]){
|
|||
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ int main(int argc, char *argv[]){
|
|||
exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ int main(int argc, char *argv[])
|
|||
exit(1);
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ int main(int argc, char *argv[]){
|
|||
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ int main(int argc, char *argv[]){
|
|||
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ int main(int argc, char *argv[]){
|
|||
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
|
|
@ -159,7 +159,7 @@ int main(int argc, char *argv[]){
|
|||
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ int main(int argc, char *argv[]){
|
|||
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ int main(int argc, char *argv[]){
|
|||
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
|
|
@ -159,7 +159,7 @@ int main(int argc, char *argv[]){
|
|||
uplo,diag,loops);
|
||||
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
srandom(getpid());
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 ;
|
||||
|
|
|
@ -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 ;
|
||||
|
|
|
@ -84,7 +84,7 @@ static char *cpuname[] = {
|
|||
|
||||
int detect(void){
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
FILE *infile;
|
||||
char buffer[512], *p;
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ static char *cpuname[] = {
|
|||
|
||||
int detect(void){
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux
|
||||
FILE *infile;
|
||||
char buffer[512], *p;
|
||||
|
||||
|
|
|
@ -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){
|
||||
|
|
Loading…
Reference in New Issue