From owner-freebsd-gecko@FreeBSD.ORG Sun Aug 12 15:25:11 2012 Return-Path: Delivered-To: freebsd-gecko@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CC054106566C for ; Sun, 12 Aug 2012 15:25:11 +0000 (UTC) (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: from trillian.chruetertee.ch (trillian.chruetertee.ch [217.150.245.56]) by mx1.freebsd.org (Postfix) with ESMTP id 3D0608FC15 for ; Sun, 12 Aug 2012 15:25:10 +0000 (UTC) Received: from trillian.chruetertee.ch (trillian [217.150.245.56]) by trillian.chruetertee.ch (8.14.4/8.14.3) with ESMTP id q7CFP9TV044922 for ; Sun, 12 Aug 2012 15:25:09 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: (from www@localhost) by trillian.chruetertee.ch (8.14.4/8.14.3/Submit) id q7CFP4NQ044174 for freebsd-gecko@freebsd.org; Sun, 12 Aug 2012 15:25:04 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Date: Sun, 12 Aug 2012 15:25:04 GMT Message-Id: <201208121525.q7CFP4NQ044174@trillian.chruetertee.ch> X-Authentication-Warning: trillian.chruetertee.ch: www set sender to svn-freebsd-gecko@chruetertee.ch using -f From: svn-freebsd-gecko@chruetertee.ch To: freebsd-gecko@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [SVN-Commit] r927 - branches/experimental/devel/nspr/files X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-gecko@freebsd.org List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Aug 2012 15:25:11 -0000 Author: jbeich Date: Sun Aug 12 15:25:04 2012 New Revision: 927 Log: rename physmem patch and reuse already present code Added: branches/experimental/devel/nspr/files/patch-bug782124 Deleted: branches/experimental/devel/nspr/files/patch-.._pr_src_misc_prsystem.c Deleted: branches/experimental/devel/nspr/files/patch-.._pr_src_misc_prsystem.c ============================================================================== --- branches/experimental/devel/nspr/files/patch-.._pr_src_misc_prsystem.c Sun Aug 12 15:25:04 2012 (r926) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,22 +0,0 @@ ---- ../pr/src/misc/prsystem.c.orig Fri May 6 20:35:58 2005 -+++ ../pr/src/misc/prsystem.c Sun Dec 4 22:09:51 2005 -@@ -352,6 +352,19 @@ PR_IMPLEMENT(PRUint64) PR_GetPhysicalMem - odm_terminate(); - } - -+#elif defined(__FreeBSD__) -+ -+ int mib[2]; -+ unsigned long physmem; -+ size_t len; -+ -+ mib[0] = CTL_HW; -+ mib[1] = HW_PHYSMEM; -+ len = sizeof(physmem); -+ if(sysctl(mib, 2, &physmem, &len, NULL, 0) == 0 -+ && len == sizeof(physmem)) -+ bytes = physmem; -+ - #else - - PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0); Added: branches/experimental/devel/nspr/files/patch-bug782124 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/experimental/devel/nspr/files/patch-bug782124 Sun Aug 12 15:25:04 2012 (r927) @@ -0,0 +1,37 @@ +--- ../pr/src/misc/prsystem.c~ ++++ ../pr/src/misc/prsystem.c +@@ -24,7 +24,7 @@ + + /* BSD-derived systems use sysctl() to get the number of processors */ + #if defined(BSDI) || defined(FREEBSD) || defined(NETBSD) \ +- || defined(OPENBSD) || defined(DARWIN) ++ || defined(OPENBSD) || defined(DRAGONFLY) || defined(DARWIN) + #define _PR_HAVE_SYSCTL + #include + #include +@@ -292,15 +292,23 @@ PR_IMPLEMENT(PRUint64) PR_GetPhysicalMemorySize(void) + if (pageSize >= 0 && pageCount >= 0) + bytes = (PRUint64) pageSize * pageCount; + +-#elif defined(NETBSD) || defined(OPENBSD) +- ++#elif defined(NETBSD) || defined(OPENBSD) \ ++ || defined(FREEBSD) || defined(DRAGONFLY) + int mib[2]; + int rc; ++#if defined(NETBSD) || defined(OPENBSD) + uint64_t memSize; ++#else ++ unsigned long memSize; ++#endif + size_t len = sizeof(memSize); + + mib[0] = CTL_HW; ++#if defined(NETBSD) || defined(OPENBSD) + mib[1] = HW_PHYSMEM64; ++#else ++ mib[1] = HW_PHYSMEM; ++#endif + rc = sysctl(mib, 2, &memSize, &len, NULL, 0); + if (-1 != rc) { + bytes = memSize;