Port to AIX platform.

Taking care of printf format specifiers and large files using compiler macros in configure.py
This commit is contained in:
Vasili Skurydzin 2018-08-01 12:31:42 -04:00
parent ca041d88f4
commit 056633514f
2 changed files with 7 additions and 0 deletions

View File

@ -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 = []

View File

@ -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