diff options
author | Jan Niklas Hasse <jhasse@bixense.com> | 2018-11-05 19:07:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-05 19:07:05 (GMT) |
commit | 9342a7e5ff660c421e9cedec6bb2d822dce9a7f8 (patch) | |
tree | 9c57c82ae74f87c919356b552e06e5c79affa599 | |
parent | 3841023a44621e8d8133e9eb6e79e26481dc0bc3 (diff) | |
parent | 056633514fcb735f2a11a1354d71896262e1b92c (diff) | |
download | Ninja-9342a7e5ff660c421e9cedec6bb2d822dce9a7f8.zip Ninja-9342a7e5ff660c421e9cedec6bb2d822dce9a7f8.tar.gz Ninja-9342a7e5ff660c421e9cedec6bb2d822dce9a7f8.tar.bz2 |
Merge pull request #1457 from V-for-Vasili/AIX-support
Port to AIX platform
-rwxr-xr-x | configure.py | 5 | ||||
-rw-r--r-- | src/disk_interface.cc | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/configure.py b/configure.py index 9e23a5a..5841f8d 100755 --- a/configure.py +++ b/configure.py @@ -356,6 +356,11 @@ else: if platform.uses_usr_local(): cflags.append('-I/usr/local/include') ldflags.append('-L/usr/local/lib') + if platform.is_aix(): + # printf formats for int64_t, uint64_t; large file support + cflags.append('-D__STDC_FORMAT_MACROS') + cflags.append('-D_LARGE_FILES') + libs = [] diff --git a/src/disk_interface.cc b/src/disk_interface.cc index 7eb44b2..7351715 100644 --- a/src/disk_interface.cc +++ b/src/disk_interface.cc @@ -212,6 +212,8 @@ TimeStamp RealDiskInterface::Stat(const string& path, string* err) const { // For bionic, C and POSIX API is always enabled. // For solaris, see https://docs.oracle.com/cd/E88353_01/html/E37841/stat-2.html. return (int64_t)st.st_mtim.tv_sec * 1000000000LL + st.st_mtim.tv_nsec; +#elif defined(_AIX) + return (int64_t)st.st_mtime * 1000000000LL + st.st_mtime_n; #else return (int64_t)st.st_mtime * 1000000000LL + st.st_mtimensec; #endif |