| 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 28 matching lines...) Expand all  Loading... | 
|    39  |    39  | 
|    40 inline void MemoryBarrier() { |    40 inline void MemoryBarrier() { | 
|    41   int barrier = 0; |    41   int barrier = 0; | 
|    42   __asm__ __volatile__("xchgl %%eax,%0 ":"=r" (barrier)); |    42   __asm__ __volatile__("xchgl %%eax,%0 ":"=r" (barrier)); | 
|    43 } |    43 } | 
|    44  |    44  | 
|    45 #endif  // __MINGW64_VERSION_MAJOR |    45 #endif  // __MINGW64_VERSION_MAJOR | 
|    46  |    46  | 
|    47  |    47  | 
|    48 int localtime_s(tm* out_tm, const time_t* time) { |    48 int localtime_s(tm* out_tm, const time_t* time) { | 
|    49   tm* posix_local_time_struct = localtime(time);  // NOLINT |    49   tm* posix_local_time_struct = localtime_r(time, out_tm); | 
|    50   if (posix_local_time_struct == NULL) return 1; |    50   if (posix_local_time_struct == NULL) return 1; | 
|    51   *out_tm = *posix_local_time_struct; |  | 
|    52   return 0; |    51   return 0; | 
|    53 } |    52 } | 
|    54  |    53  | 
|    55  |    54  | 
|    56 int fopen_s(FILE** pFile, const char* filename, const char* mode) { |    55 int fopen_s(FILE** pFile, const char* filename, const char* mode) { | 
|    57   *pFile = fopen(filename, mode); |    56   *pFile = fopen(filename, mode); | 
|    58   return *pFile != NULL ? 0 : 1; |    57   return *pFile != NULL ? 0 : 1; | 
|    59 } |    58 } | 
|    60  |    59  | 
|    61 int _vsnprintf_s(char* buffer, size_t sizeOfBuffer, size_t count, |    60 int _vsnprintf_s(char* buffer, size_t sizeOfBuffer, size_t count, | 
| (...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1397  |  1396  | 
|  1398  |  1397  | 
|  1399 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { |  1398 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { | 
|  1400   BOOL result = TlsSetValue(static_cast<DWORD>(key), value); |  1399   BOOL result = TlsSetValue(static_cast<DWORD>(key), value); | 
|  1401   USE(result); |  1400   USE(result); | 
|  1402   DCHECK(result); |  1401   DCHECK(result); | 
|  1403 } |  1402 } | 
|  1404  |  1403  | 
|  1405 }  // namespace base |  1404 }  // namespace base | 
|  1406 }  // namespace v8 |  1405 }  // namespace v8 | 
| OLD | NEW |