diff options
author | Kevin Ryde <user42@zip.com.au> | 2001-04-14 23:11:02 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2001-04-14 23:11:02 +0200 |
commit | 9b318b18dfb8bf2e8e64755b8ff49a13f5e600f3 (patch) | |
tree | 26b8b5b4d7412692b6d86a30f88e6dfe88bc9a59 /tune/freq.c | |
parent | 42a302d8c49fc752f386368736bff280eb5c785f (diff) | |
download | gmp-9b318b18dfb8bf2e8e64755b8ff49a13f5e600f3.tar.gz |
* tune/freq.c (speed_cpu_frequency_processor_info): Require
<sys/processor.h> to exist, to differentiate the different
processor_info on Darwin.
Diffstat (limited to 'tune/freq.c')
-rw-r--r-- | tune/freq.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tune/freq.c b/tune/freq.c index 8cc5d5462..fee3f1099 100644 --- a/tune/freq.c +++ b/tune/freq.c @@ -48,6 +48,10 @@ MA 02111-1307, USA. # endif #endif +#if HAVE_SYS_PROCESSOR_H +#include <sys/processor.h> /* for solaris processor_info_t */ +#endif + /* Remove definitions from NetBSD <sys/param.h>, to avoid conflicts with gmp-impl.h. */ #ifdef MIN @@ -319,10 +323,12 @@ speed_cpu_frequency_sunos_sysinfo (void) /* processor_info() for Solaris. "psrinfo" is the command-line interface to - this. "prtconf -vp" gives similar information. */ + this. "prtconf -vp" gives similar information. + + Darwin has a processor_info, but in a different style. It doesn't have + <sys/processor.h> so we can differentiate it on that basis. */ -#if HAVE_PROCESSOR_INFO -#include <sys/processor.h> /* for processor_info_t */ +#if HAVE_PROCESSOR_INFO && HAVE_SYS_PROCESSOR_H int speed_cpu_frequency_processor_info (void) { @@ -460,7 +466,7 @@ const struct { "sysctlbyname() machdep.tsc_freq or machdep.i586_freq" }, #endif -#if HAVE_PROCESSOR_INFO +#if HAVE_PROCESSOR_INFO && HAVE_SYS_PROCESSOR_H { speed_cpu_frequency_processor_info, "processor_info() pi_clock" }, #endif |