| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2007 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2007 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 if (printable) { | 65 if (printable) { |
| 66 ss << '\''; | 66 ss << '\''; |
| 67 } else { | 67 } else { |
| 68 ss.str(""); | 68 ss.str(""); |
| 69 ss << "0x" << std::hex << fc; | 69 ss << "0x" << std::hex << fc; |
| 70 } | 70 } |
| 71 out->append(ss.str()); | 71 out->append(ss.str()); |
| 72 } | 72 } |
| 73 | 73 |
| 74 static bool GetOSVersion(int* major, int* minor, int* bugfix) { | 74 static bool GetOSVersion(int* major, int* minor, int* bugfix) { |
| 75 RTC_DCHECK(major && minor && bugfix); | 75 RTC_DCHECK(major); |
| 76 RTC_DCHECK(minor); |
| 77 RTC_DCHECK(bugfix); |
| 76 struct utsname uname_info; | 78 struct utsname uname_info; |
| 77 if (uname(&uname_info) != 0) | 79 if (uname(&uname_info) != 0) |
| 78 return false; | 80 return false; |
| 79 | 81 |
| 80 if (strcmp(uname_info.sysname, "Darwin") != 0) | 82 if (strcmp(uname_info.sysname, "Darwin") != 0) |
| 81 return false; | 83 return false; |
| 82 *major = 10; | 84 *major = 10; |
| 83 | 85 |
| 84 // The market version of macOS is always 4 lower than the internal version. | 86 // The market version of macOS is always 4 lower than the internal version. |
| 85 int minor_version = atoi(uname_info.release); | 87 int minor_version = atoi(uname_info.release); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 116 case 7: | 118 case 7: |
| 117 return kMacOSLion; | 119 return kMacOSLion; |
| 118 case 8: | 120 case 8: |
| 119 return kMacOSMountainLion; | 121 return kMacOSMountainLion; |
| 120 case 9: | 122 case 9: |
| 121 return kMacOSMavericks; | 123 return kMacOSMavericks; |
| 122 } | 124 } |
| 123 return kMacOSNewer; | 125 return kMacOSNewer; |
| 124 } | 126 } |
| 125 } // namespace rtc | 127 } // namespace rtc |
| OLD | NEW |