diff options
author | Kevin Ryde <user42@zip.com.au> | 2003-03-25 23:50:25 +0100 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2003-03-25 23:50:25 +0100 |
commit | 76bce1070b1481e95c30807ba8f153a876312078 (patch) | |
tree | da03453942c3a6cd16c16b2379da037f3e354923 /tune/freq.c | |
parent | 7586105e76e2f52e8a88f9e1e3a55c1e2a2011f2 (diff) | |
download | gmp-76bce1070b1481e95c30807ba8f153a876312078.tar.gz |
* tune/freq.c (freq_irix_hinv): Allow "Processor 0" line from IRIX 6.5.
Diffstat (limited to 'tune/freq.c')
-rw-r--r-- | tune/freq.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tune/freq.c b/tune/freq.c index 8eedd5182..fa4b1da86 100644 --- a/tune/freq.c +++ b/tune/freq.c @@ -1,6 +1,6 @@ /* CPU frequency determination. -Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -379,8 +379,10 @@ freq_sco_etchw (int help) } -/* "hinv -c processor" for IRIX. - The first line printed is for instance "2 195 MHZ IP27 Processors". */ +/* "hinv -c processor" for IRIX. The following outputs have been seen + 2 195 MHZ IP27 Processors + Processor 0: 500 MHZ IP35 + */ static int freq_irix_hinv (int help) { @@ -399,7 +401,8 @@ freq_irix_hinv (int help) { while (fgets (buf, sizeof (buf), fp) != NULL) { - if (sscanf (buf, "%d %lf MHZ", &nproc, &val) == 2) + if (sscanf (buf, "Processor 0: %lf MHZ", &val) == 1 + || sscanf (buf, "%d %lf MHZ", &nproc, &val) == 2) { speed_cycletime = 1e-6 / val; if (speed_option_verbose) |