X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fstat-time.h;fp=lib%2Fstat-time.h;h=69ebe85df1dd1535ef295a14e76efc3fb4563539;hb=dc02bf0d39a3ae0d90d9b7b0feb32c2cc7cdff86;hp=104f53766829c5aa3709d9b6bfa7657799813bae;hpb=a8a88eddaa90432e6ec1b8d9d5c9842bc91afd1d;p=debian%2Fgzip 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 . */ @@ -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;