diff options
Diffstat (limited to 'net/boinc-client/files/patch-CPUID')
-rw-r--r-- | net/boinc-client/files/patch-CPUID | 44 |
1 files changed, 29 insertions, 15 deletions
diff --git a/net/boinc-client/files/patch-CPUID b/net/boinc-client/files/patch-CPUID index a3a54da26b6e..c97768e4b0c0 100644 --- a/net/boinc-client/files/patch-CPUID +++ b/net/boinc-client/files/patch-CPUID @@ -1,7 +1,7 @@ ---- client/hostinfo_unix.C.orig Tue Jan 23 18:24:42 2007 -+++ client/hostinfo_unix.C Wed Feb 14 23:59:49 2007 -@@ -308,6 +308,50 @@ - +--- client/hostinfo_unix.C.orig 2007-12-28 19:59:40.000000000 +0100 ++++ client/hostinfo_unix.C 2007-12-28 20:36:26.000000000 +0100 +@@ -451,6 +451,50 @@ + } #endif // linux +#ifdef __FreeBSD__ @@ -48,19 +48,33 @@ +#endif +#endif + - // get all relevant host information - // - int HOST_INFO::get_host_info() { -@@ -356,6 +400,12 @@ - strncpy( p_model, "Alpha ", sizeof( p_model)); - strncat( p_model, cpu_type_name, (sizeof( p_model)- strlen( p_model)- 1)); + #ifdef __APPLE__ + static void get_cpu_info_maxosx(HOST_INFO& host) { + int p_model_size = sizeof(host.p_model); +@@ -573,6 +617,12 @@ + #error Need to specify a method to get p_vendor, p_model #endif -+#endif -+#endif -+ + +#if defined(__FreeBSD__) +#if defined(__i386__) || defined(__amd64__) + use_cpuid(*this); - #endif - #endif ++#endif ++#endif ++ + ///////////// p_ncpus ///////////////// + // sysconf not working on OS2 +@@ -639,6 +689,13 @@ + int mem_size; + getsysinfo( GSI_PHYSMEM, (caddr_t) &mem_size, sizeof( mem_size)); + m_nbytes = 1024.* (double)mem_size; ++#elif defined(__FreeBSD__) ++ unsigned int mem_size; ++ mib[0] = CTL_HW; ++ mib[1] = HW_PHYSMEM; ++ len = sizeof(mem_size); ++ sysctl(mib, 2, &mem_size, &len, NULL, 0); ++ m_nbytes = mem_size; + #else + #error Need to specify a method to get memory size + #endif |