| OLD | NEW |
| 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 "platform/globals.h" | 5 #include "platform/globals.h" |
| 6 #if defined(TARGET_OS_WINDOWS) | 6 #if defined(TARGET_OS_WINDOWS) |
| 7 | 7 |
| 8 #include "bin/platform.h" | 8 #include "bin/platform.h" |
| 9 | 9 |
| 10 #include "bin/file.h" | 10 #include "bin/file.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 GetSystemInfo(&info); | 38 GetSystemInfo(&info); |
| 39 return info.dwNumberOfProcessors; | 39 return info.dwNumberOfProcessors; |
| 40 } | 40 } |
| 41 | 41 |
| 42 | 42 |
| 43 const char* Platform::OperatingSystem() { | 43 const char* Platform::OperatingSystem() { |
| 44 return "windows"; | 44 return "windows"; |
| 45 } | 45 } |
| 46 | 46 |
| 47 | 47 |
| 48 const char* Platform::LibraryPrefix() { |
| 49 return ""; |
| 50 } |
| 51 |
| 52 |
| 48 const char* Platform::LibraryExtension() { | 53 const char* Platform::LibraryExtension() { |
| 49 return "dll"; | 54 return "dll"; |
| 50 } | 55 } |
| 51 | 56 |
| 52 | 57 |
| 53 bool Platform::LocalHostname(char *buffer, intptr_t buffer_length) { | 58 bool Platform::LocalHostname(char *buffer, intptr_t buffer_length) { |
| 54 #if defined(DART_IO_DISABLED) || defined(PLATFORM_DISABLE_SOCKET) | 59 #if defined(DART_IO_DISABLED) || defined(PLATFORM_DISABLE_SOCKET) |
| 55 return false; | 60 return false; |
| 56 #else | 61 #else |
| 57 if (!Socket::Initialize()) { | 62 if (!Socket::Initialize()) { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 ::dart::private_flag_windows_run_tls_destructors = false; | 126 ::dart::private_flag_windows_run_tls_destructors = false; |
| 122 // On Windows we use ExitProcess so that threads can't clobber the exit_code. | 127 // On Windows we use ExitProcess so that threads can't clobber the exit_code. |
| 123 // See: https://code.google.com/p/nativeclient/issues/detail?id=2870 | 128 // See: https://code.google.com/p/nativeclient/issues/detail?id=2870 |
| 124 ::ExitProcess(exit_code); | 129 ::ExitProcess(exit_code); |
| 125 } | 130 } |
| 126 | 131 |
| 127 } // namespace bin | 132 } // namespace bin |
| 128 } // namespace dart | 133 } // namespace dart |
| 129 | 134 |
| 130 #endif // defined(TARGET_OS_WINDOWS) | 135 #endif // defined(TARGET_OS_WINDOWS) |
| OLD | NEW |