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

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

Issue 14593004: Fix dartbug.com/10415: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 | « runtime/vm/os_android.cc ('k') | runtime/vm/os_macos.cc » ('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_LINUX) 6 #if defined(TARGET_OS_LINUX)
7 7
8 #include "vm/os.h" 8 #include "vm/os.h"
9 9
10 #include <errno.h> // NOLINT 10 #include <errno.h> // NOLINT
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 } else { 261 } else {
262 DebugInfo::RegisterSection(name, base, size); 262 DebugInfo::RegisterSection(name, base, size);
263 } 263 }
264 } 264 }
265 265
266 private: 266 private:
267 DISALLOW_COPY_AND_ASSIGN(GdbCodeObserver); 267 DISALLOW_COPY_AND_ASSIGN(GdbCodeObserver);
268 }; 268 };
269 269
270 270
271 const char* OS::Name() {
272 return "linux";
273 }
274
275
271 static bool LocalTime(int64_t seconds_since_epoch, tm* tm_result) { 276 static bool LocalTime(int64_t seconds_since_epoch, tm* tm_result) {
272 time_t seconds = static_cast<time_t>(seconds_since_epoch); 277 time_t seconds = static_cast<time_t>(seconds_since_epoch);
273 if (seconds != seconds_since_epoch) return false; 278 if (seconds != seconds_since_epoch) return false;
274 struct tm* error_code = localtime_r(&seconds, tm_result); 279 struct tm* error_code = localtime_r(&seconds, tm_result);
275 return error_code != NULL; 280 return error_code != NULL;
276 } 281 }
277 282
278 283
279 const char* OS::GetTimeZoneName(int64_t seconds_since_epoch) { 284 const char* OS::GetTimeZoneName(int64_t seconds_since_epoch) {
280 tm decomposed; 285 tm decomposed;
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 } 520 }
516 521
517 522
518 void OS::Exit(int code) { 523 void OS::Exit(int code) {
519 exit(code); 524 exit(code);
520 } 525 }
521 526
522 } // namespace dart 527 } // namespace dart
523 528
524 #endif // defined(TARGET_OS_LINUX) 529 #endif // defined(TARGET_OS_LINUX)
OLDNEW
« no previous file with comments | « runtime/vm/os_android.cc ('k') | runtime/vm/os_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698