File tree Expand file tree Collapse file tree 2 files changed +18
-18
lines changed Expand file tree Collapse file tree 2 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -651,24 +651,6 @@ int mingw_chmod(const char *filename, int mode)
651
651
return _wchmod (wfilename , mode );
652
652
}
653
653
654
- /*
655
- * The unit of FILETIME is 100-nanoseconds since January 1, 1601, UTC.
656
- * Returns the 100-nanoseconds ("hekto nanoseconds") since the epoch.
657
- */
658
- static inline long long filetime_to_hnsec (const FILETIME * ft )
659
- {
660
- long long winTime = ((long long )ft -> dwHighDateTime << 32 ) + ft -> dwLowDateTime ;
661
- /* Windows to Unix Epoch conversion */
662
- return winTime - 116444736000000000LL ;
663
- }
664
-
665
- static inline void filetime_to_timespec (const FILETIME * ft , struct timespec * ts )
666
- {
667
- long long hnsec = filetime_to_hnsec (ft );
668
- ts -> tv_sec = (time_t )(hnsec / 10000000 );
669
- ts -> tv_nsec = (hnsec % 10000000 ) * 100 ;
670
- }
671
-
672
654
/**
673
655
* Verifies that safe_create_leading_directories() would succeed.
674
656
*/
Original file line number Diff line number Diff line change @@ -364,6 +364,17 @@ static inline int getrlimit(int resource, struct rlimit *rlp)
364
364
return 0 ;
365
365
}
366
366
367
+ /*
368
+ * The unit of FILETIME is 100-nanoseconds since January 1, 1601, UTC.
369
+ * Returns the 100-nanoseconds ("hekto nanoseconds") since the epoch.
370
+ */
371
+ static inline long long filetime_to_hnsec (const FILETIME * ft )
372
+ {
373
+ long long winTime = ((long long )ft -> dwHighDateTime << 32 ) + ft -> dwLowDateTime ;
374
+ /* Windows to Unix Epoch conversion */
375
+ return winTime - 116444736000000000LL ;
376
+ }
377
+
367
378
/*
368
379
* Use mingw specific stat()/lstat()/fstat() implementations on Windows,
369
380
* including our own struct stat with 64 bit st_size and nanosecond-precision
@@ -380,6 +391,13 @@ struct timespec {
380
391
#endif
381
392
#endif
382
393
394
+ static inline void filetime_to_timespec (const FILETIME * ft , struct timespec * ts )
395
+ {
396
+ long long hnsec = filetime_to_hnsec (ft );
397
+ ts -> tv_sec = (time_t )(hnsec / 10000000 );
398
+ ts -> tv_nsec = (hnsec % 10000000 ) * 100 ;
399
+ }
400
+
383
401
struct mingw_stat {
384
402
_dev_t st_dev ;
385
403
_ino_t st_ino ;
You can’t perform that action at this time.
0 commit comments