summaryrefslogtreecommitdiff
path: root/lib/stat-time.h
diff options
context:
space:
mode:
authorClint Adams <clint@debian.org>2018-12-22 09:23:19 -0500
committerClint Adams <clint@debian.org>2018-12-22 09:23:19 -0500
commit637a2e292881341dde845545517b0ed3d3ccfc94 (patch)
treec0d05d9f8978af415c5cea9ec39fc85b6bfb6cec /lib/stat-time.h
parent117dcd10d7e04d0dda7668518b8d085027f4d705 (diff)
New upstream version 4.7
Diffstat (limited to 'lib/stat-time.h')
-rw-r--r--lib/stat-time.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/stat-time.h b/lib/stat-time.h
index 104f537..69ebe85 100644
--- a/lib/stat-time.h
+++ b/lib/stat-time.h
@@ -168,7 +168,7 @@ get_stat_birthtime (struct stat const *st _GL_UNUSED)
#elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
t.tv_sec = st->st_birthtime;
t.tv_nsec = st->st_birthtimensec;
-#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#elif defined _WIN32 && ! defined __CYGWIN__
/* Native Windows platforms (but not Cygwin) put the "file creation
time" in st_ctime (!). See
<https://msdn.microsoft.com/en-us/library/14h5k7ff(VS.80).aspx>. */
@@ -213,7 +213,7 @@ stat_time_normalize (int result, struct stat *st _GL_UNUSED)
#if defined __sun && defined STAT_TIMESPEC
if (result == 0)
{
- long int timespec_resolution = 1000000000;
+ long int timespec_hz = 1000000000;
short int const ts_off[] = { offsetof (struct stat, st_atim),
offsetof (struct stat, st_mtim),
offsetof (struct stat, st_ctim) };
@@ -221,11 +221,11 @@ stat_time_normalize (int result, struct stat *st _GL_UNUSED)
for (i = 0; i < sizeof ts_off / sizeof *ts_off; i++)
{
struct timespec *ts = (struct timespec *) ((char *) st + ts_off[i]);
- long int q = ts->tv_nsec / timespec_resolution;
- long int r = ts->tv_nsec % timespec_resolution;
+ long int q = ts->tv_nsec / timespec_hz;
+ long int r = ts->tv_nsec % timespec_hz;
if (r < 0)
{
- r += timespec_resolution;
+ r += timespec_hz;
q--;
}
ts->tv_nsec = r;