| Index: src/base/platform/platform-aix.cc
|
| diff --git a/src/base/platform/platform-aix.cc b/src/base/platform/platform-aix.cc
|
| index 6d6adfb2cb1b19020921dbe5dde30d286bb4fe10..d659dadedd214eeb9220662b283f185e2044de74 100644
|
| --- a/src/base/platform/platform-aix.cc
|
| +++ b/src/base/platform/platform-aix.cc
|
| @@ -29,9 +29,9 @@
|
| #undef MAP_TYPE
|
|
|
| #include "src/base/macros.h"
|
| +#include "src/base/platform/platform-posix.h"
|
| #include "src/base/platform/platform.h"
|
|
|
| -
|
| namespace v8 {
|
| namespace base {
|
|
|
| @@ -42,8 +42,15 @@ static inline void* mmapHelper(size_t len, int prot, int flags, int fildes,
|
| return mmap(addr, len, prot, flags, fildes, off);
|
| }
|
|
|
| +class AIXTimezoneCache : public PosixTimezoneCache {
|
| + const char* LocalTimezone(double time) override;
|
| +
|
| + double LocalTimeOffset() override;
|
|
|
| -const char* OS::LocalTimezone(double time, TimezoneCache* cache) {
|
| + ~AIXTimezoneCache() override {}
|
| +};
|
| +
|
| +const char* AIXTimezoneCache::LocalTimezone(double time) {
|
| if (std::isnan(time)) return "";
|
| time_t tv = static_cast<time_t>(floor(time / msPerSecond));
|
| struct tm tm;
|
| @@ -52,8 +59,7 @@ const char* OS::LocalTimezone(double time, TimezoneCache* cache) {
|
| return tzname[0]; // The location of the timezone string on AIX.
|
| }
|
|
|
| -
|
| -double OS::LocalTimeOffset(TimezoneCache* cache) {
|
| +double AIXTimezoneCache::LocalTimeOffset() {
|
| // On AIX, struct tm does not contain a tm_gmtoff field.
|
| time_t utc = time(NULL);
|
| DCHECK(utc != -1);
|
| @@ -63,6 +69,7 @@ double OS::LocalTimeOffset(TimezoneCache* cache) {
|
| return static_cast<double>((mktime(loc) - utc) * msPerSecond);
|
| }
|
|
|
| +TimezoneCache* OS::CreateTimezoneCache() { return new AIXTimezoneCache(); }
|
|
|
| void* OS::Allocate(const size_t requested, size_t* allocated, bool executable) {
|
| const size_t msize = RoundUp(requested, getpagesize());
|
|
|