OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <string.h> | 10 #include <string.h> |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 struct utsname info; | 212 struct utsname info; |
213 if (uname(&info) < 0) { | 213 if (uname(&info) < 0) { |
214 NOTREACHED(); | 214 NOTREACHED(); |
215 return std::string(); | 215 return std::string(); |
216 } | 216 } |
217 std::string arch(info.machine); | 217 std::string arch(info.machine); |
218 if (arch == "i386" || arch == "i486" || arch == "i586" || arch == "i686") { | 218 if (arch == "i386" || arch == "i486" || arch == "i586" || arch == "i686") { |
219 arch = "x86"; | 219 arch = "x86"; |
220 } else if (arch == "amd64") { | 220 } else if (arch == "amd64") { |
221 arch = "x86_64"; | 221 arch = "x86_64"; |
| 222 } else if (std::string(info.sysname) == "AIX") { |
| 223 arch = "ppc64"; |
222 } | 224 } |
223 return arch; | 225 return arch; |
224 } | 226 } |
225 | 227 |
226 // static | 228 // static |
227 size_t SysInfo::VMAllocationGranularity() { | 229 size_t SysInfo::VMAllocationGranularity() { |
228 return getpagesize(); | 230 return getpagesize(); |
229 } | 231 } |
230 | 232 |
231 } // namespace base | 233 } // namespace base |
OLD | NEW |