| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project 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 // Platform-specific code for Win32. | 5 // Platform-specific code for Win32. |
| 6 | 6 |
| 7 // Secure API functions are not available using MinGW with msvcrt.dll | 7 // Secure API functions are not available using MinGW with msvcrt.dll |
| 8 // on Windows XP. Make sure MINGW_HAS_SECURE_API is not defined to | 8 // on Windows XP. Make sure MINGW_HAS_SECURE_API is not defined to |
| 9 // disable definition of secure API functions in standard headers that | 9 // disable definition of secure API functions in standard headers that |
| 10 // would conflict with our own implementation. | 10 // would conflict with our own implementation. |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 } else { | 567 } else { |
| 568 return NULL; | 568 return NULL; |
| 569 } | 569 } |
| 570 } | 570 } |
| 571 | 571 |
| 572 | 572 |
| 573 bool OS::Remove(const char* path) { | 573 bool OS::Remove(const char* path) { |
| 574 return (DeleteFileA(path) != 0); | 574 return (DeleteFileA(path) != 0); |
| 575 } | 575 } |
| 576 | 576 |
| 577 char OS::DirectorySeparator() { return '\\'; } |
| 577 | 578 |
| 578 bool OS::isDirectorySeparator(const char ch) { | 579 bool OS::isDirectorySeparator(const char ch) { |
| 579 return ch == '/' || ch == '\\'; | 580 return ch == '/' || ch == '\\'; |
| 580 } | 581 } |
| 581 | 582 |
| 582 | 583 |
| 583 FILE* OS::OpenTemporaryFile() { | 584 FILE* OS::OpenTemporaryFile() { |
| 584 // tmpfile_s tries to use the root dir, don't use it. | 585 // tmpfile_s tries to use the root dir, don't use it. |
| 585 char tempPathBuffer[MAX_PATH]; | 586 char tempPathBuffer[MAX_PATH]; |
| 586 DWORD path_result = 0; | 587 DWORD path_result = 0; |
| (...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1392 | 1393 |
| 1393 | 1394 |
| 1394 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { | 1395 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { |
| 1395 BOOL result = TlsSetValue(static_cast<DWORD>(key), value); | 1396 BOOL result = TlsSetValue(static_cast<DWORD>(key), value); |
| 1396 USE(result); | 1397 USE(result); |
| 1397 DCHECK(result); | 1398 DCHECK(result); |
| 1398 } | 1399 } |
| 1399 | 1400 |
| 1400 } // namespace base | 1401 } // namespace base |
| 1401 } // namespace v8 | 1402 } // namespace v8 |
| OLD | NEW |