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 Cygwin goes here. For the POSIX-compatible | 5 // Platform-specific code for Cygwin goes here. For the POSIX-compatible |
6 // parts, the implementation is in platform-posix.cc. | 6 // parts, the implementation is in platform-posix.cc. |
7 | 7 |
8 #include <errno.h> | 8 #include <errno.h> |
9 #include <pthread.h> | 9 #include <pthread.h> |
10 #include <semaphore.h> | 10 #include <semaphore.h> |
11 #include <stdarg.h> | 11 #include <stdarg.h> |
12 #include <strings.h> // index | 12 #include <strings.h> // index |
13 #include <sys/time.h> | 13 #include <sys/time.h> |
14 #include <sys/mman.h> // mmap & munmap | 14 #include <sys/mman.h> // mmap & munmap |
15 #include <unistd.h> // sysconf | 15 #include <unistd.h> // sysconf |
16 | 16 |
17 #undef MAP_TYPE | 17 #undef MAP_TYPE |
18 | 18 |
19 #include "src/v8.h" | 19 #include "src/v8.h" |
20 | 20 |
| 21 #include "src/base/win32-headers.h" |
21 #include "src/platform.h" | 22 #include "src/platform.h" |
22 #include "src/v8threads.h" | 23 #include "src/v8threads.h" |
23 #include "src/win32-headers.h" | |
24 | 24 |
25 namespace v8 { | 25 namespace v8 { |
26 namespace internal { | 26 namespace internal { |
27 | 27 |
28 | 28 |
29 const char* OS::LocalTimezone(double time, TimezoneCache* cache) { | 29 const char* OS::LocalTimezone(double time, TimezoneCache* cache) { |
30 if (std::isnan(time)) return ""; | 30 if (std::isnan(time)) return ""; |
31 time_t tv = static_cast<time_t>(std::floor(time/msPerSecond)); | 31 time_t tv = static_cast<time_t>(std::floor(time/msPerSecond)); |
32 struct tm* t = localtime(&tv); | 32 struct tm* t = localtime(&tv); |
33 if (NULL == t) return ""; | 33 if (NULL == t) return ""; |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 return VirtualFree(base, 0, MEM_RELEASE) != 0; | 323 return VirtualFree(base, 0, MEM_RELEASE) != 0; |
324 } | 324 } |
325 | 325 |
326 | 326 |
327 bool VirtualMemory::HasLazyCommits() { | 327 bool VirtualMemory::HasLazyCommits() { |
328 // TODO(alph): implement for the platform. | 328 // TODO(alph): implement for the platform. |
329 return false; | 329 return false; |
330 } | 330 } |
331 | 331 |
332 } } // namespace v8::internal | 332 } } // namespace v8::internal |
OLD | NEW |