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 @@ -282,6 +282,22 @@ static inline int getrlimit(int resource, struct rlimit *rlp)
282
282
return 0 ;
283
283
}
284
284
285
+ /*
286
+ * The unit of FILETIME is 100-nanoseconds since January 1, 1601, UTC.
287
+ * Returns the 100-nanoseconds ("hekto nanoseconds") since the epoch.
288
+ */
289
+ static inline long long filetime_to_hnsec (const FILETIME * ft )
290
+ {
291
+ long long winTime = ((long long )ft -> dwHighDateTime << 32 ) + ft -> dwLowDateTime ;
292
+ /* Windows to Unix Epoch conversion */
293
+ return winTime - 116444736000000000LL ;
294
+ }
295
+
296
+ static inline time_t filetime_to_time_t (const FILETIME * ft )
297
+ {
298
+ return (time_t )(filetime_to_hnsec (ft ) / 10000000 );
299
+ }
300
+
285
301
/*
286
302
* Use mingw specific stat()/lstat()/fstat() implementations on Windows.
287
303
*/
You can’t perform that action at this time.
0 commit comments