head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.4 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.2 pkgsrc-2012Q4-base:1.2; locks; strict; comment @# @; 1.2 date 2012.03.10.14.57.32; author ryoon; state dead; branches; next 1.1; 1.1 date 2012.03.10.03.26.05; author ryoon; state Exp; branches; next ; desc @@ 1.2 log @Remove necessary backups of the patches. @ text @$NetBSD: patch-ipc_chromium_src_base_sys__info__posix.cc.orig,v 1.1 2012/03/10 03:26:05 ryoon Exp $ --- mozilla/ipc/chromium/src/base/sys_info_posix.cc.orig 2011-11-04 21:34:00.000000000 +0000 +++ mozilla/ipc/chromium/src/base/sys_info_posix.cc @@@@ -18,6 +18,11 @@@@ #include #endif +#if defined(OS_NETBSD) +#include +#include +#endif + #include "base/logging.h" #include "base/string_util.h" @@@@ -26,7 +31,11 @@@@ namespace base { int SysInfo::NumberOfProcessors() { // It seems that sysconf returns the number of "logical" processors on both // mac and linux. So we get the number of "online logical" processors. +#ifdef _SC_NPROCESSORS_ONLN static long res = sysconf(_SC_NPROCESSORS_ONLN); +#else + static long res = 1; +#endif if (res == -1) { NOTREACHED(); return 1; @@@@ -52,6 +61,20 @@@@ int64 SysInfo::AmountOfPhysicalMemory() } return static_cast(hostinfo.max_mem); +#elif defined(OS_NETBSD) + int mib[2]; + int rc; + int64_t memSize; + size_t len = sizeof(memSize); + + mib[0] = CTL_HW; + mib[1] = HW_PHYSMEM64; + rc = sysctl( mib, 2, &memSize, &len, NULL, 0 ); + if (-1 != rc) { + return memSize; + } + return 0; + #else long pages = sysconf(_SC_PHYS_PAGES); long page_size = sysconf(_SC_PAGE_SIZE); @ 1.1 log @Update to 2.7.2 * Many new features. * Security bugfixes. * See http://www.seamonkey-project.org/releases/seamonkey2.7/ @ text @d1 1 a1 1 $NetBSD: patch-ipc_chromium_src_base_sys__info__posix.cc,v 1.2 2011/11/27 13:09:00 tnn Exp $ @