*** empty log message ***

svn path=/trunk/boinc/; revision=11186
This commit is contained in:
Charlie Fenton 2006-09-25 12:07:40 +00:00
parent 67f12bf765
commit 7f4f304e58
1 changed files with 7 additions and 5 deletions

View File

@ -451,9 +451,14 @@ int HOST_INFO::get_host_info() {
} }
fclose(fp); fclose(fp);
} }
#elif defined(HAVE_SYS_SYSCTL_H) && defined(CTL_VM) && defined(VM_METER) #elif defined(HAVE_VMMETER_H) && defined(HAVE_SYS_SYSCTL_H) && defined(CTL_VM) && defined(VM_METER)
// MacOSX, I think... // MacOSX, I think...
// <http://www.osxfaq.com/man/3/sysctl.ws> // <http://www.osxfaq.com/man/3/sysctl.ws>
#ifndef __APPLE__
// The sysctl(vm.vmmeter) function doesn't work on OS X, so the following
// code fails to get the total swap space. However, procinfo_setup() in
// procinfo_mac.C can easily calculate it, so we fill in the value there.
struct vmtotal vm_info; struct vmtotal vm_info;
mib[0] = CTL_VM; mib[0] = CTL_VM;
@ -462,10 +467,7 @@ int HOST_INFO::get_host_info() {
if (!sysctl(mib, 2, &vm_info, &len, NULL, 0)) { if (!sysctl(mib, 2, &vm_info, &len, NULL, 0)) {
m_swap = 1024. * getpagesize() * (double) vm_info.t_vm; m_swap = 1024. * getpagesize() * (double) vm_info.t_vm;
} }
#endif // __APPLE__
// The sysctl(vm.vmmeter) function doesn't work on OS X, so the following
// code fails to get the total swap space. However, procinfo_setup() in
// procinfo_mac.C can easily calculate it, so we fill in the value there.
#elif defined(_HPUX_SOURCE) #elif defined(_HPUX_SOURCE)
struct pst_vminfo vminfo; struct pst_vminfo vminfo;