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 @@ -418,22 +418,6 @@ int mingw_chmod(const char *filename, int mode)
418
418
return _wchmod (wfilename , mode );
419
419
}
420
420
421
- /*
422
- * The unit of FILETIME is 100-nanoseconds since January 1, 1601, UTC.
423
- * Returns the 100-nanoseconds ("hekto nanoseconds") since the epoch.
424
- */
425
- static inline long long filetime_to_hnsec (const FILETIME * ft )
426
- {
427
- long long winTime = ((long long )ft -> dwHighDateTime << 32 ) + ft -> dwLowDateTime ;
428
- /* Windows to Unix Epoch conversion */
429
- return winTime - 116444736000000000LL ;
430
- }
431
-
432
- static inline time_t filetime_to_time_t (const FILETIME * ft )
433
- {
434
- return (time_t )(filetime_to_hnsec (ft ) / 10000000 );
435
- }
436
-
437
421
/* We keep the do_lstat code in a separate function to avoid recursion.
438
422
* When a path ends with a slash, the stat will fail with ENOENT. In
439
423
* this case, we strip the trailing slashes and stat again.
Original file line number Diff line number Diff line change @@ -274,6 +274,22 @@ static inline int getrlimit(int resource, struct rlimit *rlp)
274
274
return 0 ;
275
275
}
276
276
277
+ /*
278
+ * The unit of FILETIME is 100-nanoseconds since January 1, 1601, UTC.
279
+ * Returns the 100-nanoseconds ("hekto nanoseconds") since the epoch.
280
+ */
281
+ static inline long long filetime_to_hnsec (const FILETIME * ft )
282
+ {
283
+ long long winTime = ((long long )ft -> dwHighDateTime << 32 ) + ft -> dwLowDateTime ;
284
+ /* Windows to Unix Epoch conversion */
285
+ return winTime - 116444736000000000LL ;
286
+ }
287
+
288
+ static inline time_t filetime_to_time_t (const FILETIME * ft )
289
+ {
290
+ return (time_t )(filetime_to_hnsec (ft ) / 10000000 );
291
+ }
292
+
277
293
/*
278
294
* Use mingw specific stat()/lstat()/fstat() implementations on Windows.
279
295
*/
You can’t perform that action at this time.
0 commit comments