This repository was archived by the owner on Nov 9, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-16
lines changed
Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -474,22 +474,6 @@ int mingw_chmod(const char *filename, int mode)
474474 return _wchmod (wfilename , mode );
475475}
476476
477- /*
478- * The unit of FILETIME is 100-nanoseconds since January 1, 1601, UTC.
479- * Returns the 100-nanoseconds ("hekto nanoseconds") since the epoch.
480- */
481- static inline long long filetime_to_hnsec (const FILETIME * ft )
482- {
483- long long winTime = ((long long )ft -> dwHighDateTime << 32 ) + ft -> dwLowDateTime ;
484- /* Windows to Unix Epoch conversion */
485- return winTime - 116444736000000000LL ;
486- }
487-
488- static inline time_t filetime_to_time_t (const FILETIME * ft )
489- {
490- return (time_t )(filetime_to_hnsec (ft ) / 10000000 );
491- }
492-
493477/* We keep the do_lstat code in a separate function to avoid recursion.
494478 * When a path ends with a slash, the stat will fail with ENOENT. In
495479 * this case, we strip the trailing slashes and stat again.
Original file line number Diff line number Diff line change @@ -277,6 +277,22 @@ static inline int getrlimit(int resource, struct rlimit *rlp)
277277 return 0 ;
278278}
279279
280+ /*
281+ * The unit of FILETIME is 100-nanoseconds since January 1, 1601, UTC.
282+ * Returns the 100-nanoseconds ("hekto nanoseconds") since the epoch.
283+ */
284+ static inline long long filetime_to_hnsec (const FILETIME * ft )
285+ {
286+ long long winTime = ((long long )ft -> dwHighDateTime << 32 ) + ft -> dwLowDateTime ;
287+ /* Windows to Unix Epoch conversion */
288+ return winTime - 116444736000000000LL ;
289+ }
290+
291+ static inline time_t filetime_to_time_t (const FILETIME * ft )
292+ {
293+ return (time_t )(filetime_to_hnsec (ft ) / 10000000 );
294+ }
295+
280296/*
281297 * Use mingw specific stat()/lstat()/fstat() implementations on Windows.
282298 */
You can’t perform that action at this time.
0 commit comments