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

Side by Side Diff: base/sys_info_posix.cc

Issue 495002: Changes to base/ from a combination of FreeBSD and OpenBSD patches. (Closed)
Patch Set: minor tweaks Created 11 years 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
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/sys_info.h" 5 #include "base/sys_info.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <string.h> 8 #include <string.h>
9 #include <sys/param.h>
9 #include <sys/statvfs.h> 10 #include <sys/statvfs.h>
11 #include <sys/sysctl.h>
10 #include <sys/utsname.h> 12 #include <sys/utsname.h>
11 #include <unistd.h> 13 #include <unistd.h>
12 14
13 #if !defined(OS_MACOSX) 15 #if !defined(OS_MACOSX)
14 #include <gdk/gdk.h> 16 #include <gdk/gdk.h>
15 #endif 17 #endif
16 18
17 #if defined(OS_OPENBSD)
18 #include <sys/param.h>
19 #include <sys/sysctl.h>
20 #endif
21
22 #include "base/basictypes.h" 19 #include "base/basictypes.h"
23 #include "base/file_util.h" 20 #include "base/file_util.h"
24 #include "base/logging.h" 21 #include "base/logging.h"
25 #include "base/utf_string_conversions.h" 22 #include "base/utf_string_conversions.h"
26 23
27 namespace base { 24 namespace base {
28 25
29 #if !defined(OS_OPENBSD) 26 #if !defined(OS_OPENBSD)
30 int SysInfo::NumberOfProcessors() { 27 int SysInfo::NumberOfProcessors() {
31 // It seems that sysconf returns the number of "logical" processors on both 28 // It seems that sysconf returns the number of "logical" processors on both
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 return gdk_screen_get_n_monitors(screen); 116 return gdk_screen_get_n_monitors(screen);
120 } 117 }
121 #endif 118 #endif
122 119
123 // static 120 // static
124 size_t SysInfo::VMAllocationGranularity() { 121 size_t SysInfo::VMAllocationGranularity() {
125 return getpagesize(); 122 return getpagesize();
126 } 123 }
127 124
128 } // namespace base 125 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698