OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 #endif | 108 #endif |
109 #endif | 109 #endif |
110 #undef GCC_VERSION | 110 #undef GCC_VERSION |
111 } | 111 } |
112 | 112 |
113 #endif // def __arm__ | 113 #endif // def __arm__ |
114 | 114 |
115 | 115 |
116 const char* OS::LocalTimezone(double time) { | 116 const char* OS::LocalTimezone(double time) { |
117 if (std::isnan(time)) return ""; | 117 if (std::isnan(time)) return ""; |
118 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); | 118 time_t tv = static_cast<time_t>(std::floor(time/msPerSecond)); |
119 struct tm* t = localtime(&tv); | 119 struct tm* t = localtime(&tv); |
120 if (NULL == t) return ""; | 120 if (NULL == t) return ""; |
121 return t->tm_zone; | 121 return t->tm_zone; |
122 } | 122 } |
123 | 123 |
124 | 124 |
125 double OS::LocalTimeOffset() { | 125 double OS::LocalTimeOffset() { |
126 time_t tv = time(NULL); | 126 time_t tv = time(NULL); |
127 struct tm* t = localtime(&tv); | 127 struct tm* t = localtime(&tv); |
128 // tm_gmtoff includes any daylight savings offset, so subtract it. | 128 // tm_gmtoff includes any daylight savings offset, so subtract it. |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { | 435 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { |
436 return munmap(base, size) == 0; | 436 return munmap(base, size) == 0; |
437 } | 437 } |
438 | 438 |
439 | 439 |
440 bool VirtualMemory::HasLazyCommits() { | 440 bool VirtualMemory::HasLazyCommits() { |
441 return true; | 441 return true; |
442 } | 442 } |
443 | 443 |
444 } } // namespace v8::internal | 444 } } // namespace v8::internal |
OLD | NEW |