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

Side by Side Diff: runtime/vm/os_macos.cc

Issue 1417013011: Report iOS as iOS rather than OS X. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 5 years, 1 month 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
« no previous file with comments | « runtime/bin/platform_macos.cc ('k') | sdk/lib/io/platform.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_OS_MACOS) 6 #if defined(TARGET_OS_MACOS)
7 7
8 #include "vm/os.h" 8 #include "vm/os.h"
9 9
10 #include <errno.h> // NOLINT 10 #include <errno.h> // NOLINT
11 #include <limits.h> // NOLINT 11 #include <limits.h> // NOLINT
12 #include <mach/mach.h> // NOLINT 12 #include <mach/mach.h> // NOLINT
13 #include <mach/clock.h> // NOLINT 13 #include <mach/clock.h> // NOLINT
14 #include <mach/mach_time.h> // NOLINT 14 #include <mach/mach_time.h> // NOLINT
15 #include <sys/time.h> // NOLINT 15 #include <sys/time.h> // NOLINT
16 #include <sys/resource.h> // NOLINT 16 #include <sys/resource.h> // NOLINT
17 #include <unistd.h> // NOLINT 17 #include <unistd.h> // NOLINT
18 #if TARGET_OS_IOS 18 #if TARGET_OS_IOS
19 #include <sys/sysctl.h> // NOLINT 19 #include <sys/sysctl.h> // NOLINT
20 #include <syslog.h> // NOLINT 20 #include <syslog.h> // NOLINT
21 #endif 21 #endif
22 22
23 #include "platform/utils.h" 23 #include "platform/utils.h"
24 #include "vm/isolate.h" 24 #include "vm/isolate.h"
25 #include "vm/zone.h" 25 #include "vm/zone.h"
26 26
27 namespace dart { 27 namespace dart {
28 28
29 const char* OS::Name() { 29 const char* OS::Name() {
30 #if TARGET_OS_IOS
31 return "ios";
32 #else
30 return "macos"; 33 return "macos";
34 #endif
31 } 35 }
32 36
33 37
34 intptr_t OS::ProcessId() { 38 intptr_t OS::ProcessId() {
35 return static_cast<intptr_t>(getpid()); 39 return static_cast<intptr_t>(getpid());
36 } 40 }
37 41
38 42
39 static bool LocalTime(int64_t seconds_since_epoch, tm* tm_result) { 43 static bool LocalTime(int64_t seconds_since_epoch, tm* tm_result) {
40 time_t seconds = static_cast<time_t>(seconds_since_epoch); 44 time_t seconds = static_cast<time_t>(seconds_since_epoch);
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 } 373 }
370 374
371 375
372 void OS::Exit(int code) { 376 void OS::Exit(int code) {
373 exit(code); 377 exit(code);
374 } 378 }
375 379
376 } // namespace dart 380 } // namespace dart
377 381
378 #endif // defined(TARGET_OS_MACOS) 382 #endif // defined(TARGET_OS_MACOS)
OLDNEW
« no previous file with comments | « runtime/bin/platform_macos.cc ('k') | sdk/lib/io/platform.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698