diff options
author | Björn Jacke <bj@sernet.de> | 2009-01-29 00:35:26 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-01-29 09:51:36 -0800 |
commit | 3639e525a92c1c91dd8d6f9286f1da4a33ee7656 (patch) | |
tree | 3341c8ef0e602de7e2027c93759ff8d5683a85ef /source3 | |
parent | 11f32204f8e6c5e90e8e242116d3f74808184884 (diff) | |
download | samba-3639e525a92c1c91dd8d6f9286f1da4a33ee7656.tar.gz samba-3639e525a92c1c91dd8d6f9286f1da4a33ee7656.tar.bz2 samba-3639e525a92c1c91dd8d6f9286f1da4a33ee7656.zip |
add AIX sub-second resolution timestamp support
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/time.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source3/lib/time.c b/source3/lib/time.c index 7dd0da8fa8..1466471639 100644 --- a/source3/lib/time.c +++ b/source3/lib/time.c @@ -404,6 +404,11 @@ struct timespec get_atimespec(const SMB_STRUCT_STAT *pst) ret.tv_sec = pst->st_atime; ret.tv_nsec = pst->st_atimensec; return ret; +#elif defined(HAVE_STAT_ST_ATIME_N) + struct timespec ret; + ret.tv_sec = pst->st_atime; + ret.tv_nsec = pst->st_atime_n; + return ret; #elif defined(HAVE_STAT_ST_ATIMESPEC) return pst->st_atimespec; #else @@ -423,6 +428,9 @@ void set_atimespec(SMB_STRUCT_STAT *pst, struct timespec ts) #elif defined(HAVE_STAT_ST_ATIMENSEC) pst->st_atime = ts.tv_sec; pst->st_atimensec = ts.tv_nsec +#elif defined(HAVE_STAT_ST_ATIME_N) + pst->st_atime = ts.tv_sec; + pst->st_atime_n = ts.tv_nsec #elif defined(HAVE_STAT_ST_ATIMESPEC) pst->st_atimespec = ts; #else @@ -448,6 +456,11 @@ struct timespec get_mtimespec(const SMB_STRUCT_STAT *pst) ret.tv_sec = pst->st_mtime; ret.tv_nsec = pst->st_mtimensec; return ret; +#elif defined(HAVE_STAT_ST_MTIME_N) + struct timespec ret; + ret.tv_sec = pst->st_mtime; + ret.tv_nsec = pst->st_mtime_n; + return ret; #elif defined(HAVE_STAT_ST_MTIMESPEC) return pst->st_mtimespec; #else @@ -467,6 +480,9 @@ void set_mtimespec(SMB_STRUCT_STAT *pst, struct timespec ts) #elif defined(HAVE_STAT_ST_MTIMENSEC) pst->st_mtime = ts.tv_sec; pst->st_mtimensec = ts.tv_nsec +#elif defined(HAVE_STAT_ST_MTIME_N) + pst->st_mtime = ts.tv_sec; + pst->st_mtime_n = ts.tv_nsec #elif defined(HAVE_STAT_ST_ATIMESPEC) pst->st_atimespec = ts; #else @@ -492,6 +508,11 @@ struct timespec get_ctimespec(const SMB_STRUCT_STAT *pst) ret.tv_sec = pst->st_ctime; ret.tv_nsec = pst->st_ctimensec; return ret; +#elif defined(HAVE_STAT_ST_CTIME_N) + struct timespec ret; + ret.tv_sec = pst->st_ctime; + ret.tv_nsec = pst->st_ctime_n; + return ret; #elif defined(HAVE_STAT_ST_CTIMESPEC) return pst->st_ctimespec; #else @@ -511,6 +532,9 @@ void set_ctimespec(SMB_STRUCT_STAT *pst, struct timespec ts) #elif defined(HAVE_STAT_ST_CTIMENSEC) pst->st_ctime = ts.tv_sec; pst->st_ctimensec = ts.tv_nsec +#elif defined(HAVE_STAT_ST_CTIME_N) + pst->st_ctime = ts.tv_sec; + pst->st_ctime_n = ts.tv_nsec #elif defined(HAVE_STAT_ST_CTIMESPEC) pst->st_ctimespec = ts; #else |