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)
474
474
return _wchmod (wfilename , mode );
475
475
}
476
476
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
-
493
477
/* We keep the do_lstat code in a separate function to avoid recursion.
494
478
* When a path ends with a slash, the stat will fail with ENOENT. In
495
479
* this case, we strip the trailing slashes and stat again.
Original file line number Diff line number Diff line change @@ -295,6 +295,22 @@ static inline int getrlimit(int resource, struct rlimit *rlp)
295
295
return 0 ;
296
296
}
297
297
298
+ /*
299
+ * The unit of FILETIME is 100-nanoseconds since January 1, 1601, UTC.
300
+ * Returns the 100-nanoseconds ("hekto nanoseconds") since the epoch.
301
+ */
302
+ static inline long long filetime_to_hnsec (const FILETIME * ft )
303
+ {
304
+ long long winTime = ((long long )ft -> dwHighDateTime << 32 ) + ft -> dwLowDateTime ;
305
+ /* Windows to Unix Epoch conversion */
306
+ return winTime - 116444736000000000LL ;
307
+ }
308
+
309
+ static inline time_t filetime_to_time_t (const FILETIME * ft )
310
+ {
311
+ return (time_t )(filetime_to_hnsec (ft ) / 10000000 );
312
+ }
313
+
298
314
/*
299
315
* Use mingw specific stat()/lstat()/fstat() implementations on Windows.
300
316
*/
You can’t perform that action at this time.
0 commit comments