Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: mozilla/nsprpub/pr/src/md/prosdep.c

Issue 12089033: Update to NSPR 4.9.5 Beta 2, part 2: actual changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mozilla/nsprpub/pr/src/linking/prlink.c ('k') | mozilla/nsprpub/pr/src/md/unix/darwin.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public 2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 5
6 #include "prbit.h" 6 #include "prbit.h"
7 #include "prsystem.h" 7 #include "prsystem.h"
8 8
9 #ifdef XP_UNIX 9 #ifdef XP_UNIX
10 #include <unistd.h> 10 #include <unistd.h>
11 #endif 11 #endif
12 #ifdef SUNOS4
13 #include "md/sunos4.h"
14 #endif
15 #ifdef _WIN32 12 #ifdef _WIN32
16 #include <windows.h> 13 #include <windows.h>
17 #endif 14 #endif
18 #ifdef XP_BEOS 15 #ifdef XP_BEOS
19 #include <OS.h> 16 #include <OS.h>
20 #endif 17 #endif
21 18
22 PRInt32 _pr_pageShift; 19 PRInt32 _pr_pageShift;
23 PRInt32 _pr_pageSize; 20 PRInt32 _pr_pageSize;
24 21
25 /* 22 /*
26 ** Get system page size 23 ** Get system page size
27 */ 24 */
28 static void GetPageSize(void) 25 static void GetPageSize(void)
29 { 26 {
30 PRInt32 pageSize; 27 PRInt32 pageSize;
31 28
32 /* Get page size */ 29 /* Get page size */
33 #ifdef XP_UNIX 30 #ifdef XP_UNIX
34 #if defined SUNOS4 || defined BSDI || defined AIX \ 31 #if defined BSDI || defined AIX \
35 || defined LINUX || defined __GNU__ || defined __GLIBC__ \ 32 || defined LINUX || defined __GNU__ || defined __GLIBC__ \
36 || defined FREEBSD || defined NETBSD || defined OPENBSD \ 33 || defined FREEBSD || defined NETBSD || defined OPENBSD \
37 || defined DARWIN || defined NEXTSTEP || defined SYMBIAN 34 || defined DARWIN || defined SYMBIAN
38 _pr_pageSize = getpagesize(); 35 _pr_pageSize = getpagesize();
39 #elif defined(HPUX) 36 #elif defined(HPUX)
40 /* I have no idea. Don't get me started. --Rob */ 37 /* I have no idea. Don't get me started. --Rob */
41 _pr_pageSize = sysconf(_SC_PAGE_SIZE); 38 _pr_pageSize = sysconf(_SC_PAGE_SIZE);
42 #else 39 #else
43 _pr_pageSize = sysconf(_SC_PAGESIZE); 40 _pr_pageSize = sysconf(_SC_PAGESIZE);
44 #endif 41 #endif
45 #endif /* XP_UNIX */ 42 #endif /* XP_UNIX */
46 43
47 #ifdef XP_BEOS 44 #ifdef XP_BEOS
(...skipping 22 matching lines...) Expand all
70 return _pr_pageShift; 67 return _pr_pageShift;
71 } 68 }
72 69
73 PR_IMPLEMENT(PRInt32) PR_GetPageSize(void) 70 PR_IMPLEMENT(PRInt32) PR_GetPageSize(void)
74 { 71 {
75 if (!_pr_pageSize) { 72 if (!_pr_pageSize) {
76 GetPageSize(); 73 GetPageSize();
77 } 74 }
78 return _pr_pageSize; 75 return _pr_pageSize;
79 } 76 }
OLDNEW
« no previous file with comments | « mozilla/nsprpub/pr/src/linking/prlink.c ('k') | mozilla/nsprpub/pr/src/md/unix/darwin.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698