An update will be applied December 9th, between 12PM and 1:00PM EST (UTC -5:00). The site may be slow during that time.

Commit f25a301f authored by Brad King's avatar Brad King
Browse files

Merge branch 'hpux-libarchive-compile' into release

parents eca79814 4189a7f9
...@@ -2861,7 +2861,7 @@ set_time(int fd, int mode, const char *name, ...@@ -2861,7 +2861,7 @@ set_time(int fd, int mode, const char *name,
#endif #endif
} }
#ifdef F_SETTIMES /* Tru64 */ #ifdef F_SETTIMES
static int static int
set_time_tru64(int fd, int mode, const char *name, set_time_tru64(int fd, int mode, const char *name,
time_t atime, long atime_nsec, time_t atime, long atime_nsec,
...@@ -2869,19 +2869,21 @@ set_time_tru64(int fd, int mode, const char *name, ...@@ -2869,19 +2869,21 @@ set_time_tru64(int fd, int mode, const char *name,
time_t ctime, long ctime_nsec) time_t ctime, long ctime_nsec)
{ {
struct attr_timbuf tstamp; struct attr_timbuf tstamp;
struct timeval times[3]; tstamp.atime.tv_sec = atime;
times[0].tv_sec = atime; tstamp.mtime.tv_sec = mtime;
times[0].tv_usec = atime_nsec / 1000; tstamp.ctime.tv_sec = ctime;
times[1].tv_sec = mtime; #if defined (__hpux) && defined (__ia64)
times[1].tv_usec = mtime_nsec / 1000; tstamp.atime.tv_nsec = atime_nsec;
times[2].tv_sec = ctime; tstamp.mtime.tv_nsec = mtime_nsec;
times[2].tv_usec = ctime_nsec / 1000; tstamp.ctime.tv_nsec = ctime_nsec;
tstamp.atime = times[0]; #else
tstamp.mtime = times[1]; tstamp.atime.tv_usec = atime_nsec / 1000;
tstamp.ctime = times[2]; tstamp.mtime.tv_usec = mtime_nsec / 1000;
tstamp.ctime.tv_usec = ctime_nsec / 1000;
#endif
return (fcntl(fd,F_SETTIMES,&tstamp)); return (fcntl(fd,F_SETTIMES,&tstamp));
} }
#endif /* Tru64 */ #endif /* F_SETTIMES */
static int static int
set_times(struct archive_write_disk *a, set_times(struct archive_write_disk *a,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment