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 @@ -345,6 +345,17 @@ static inline int getrlimit(int resource, struct rlimit *rlp)
345
345
return 0 ;
346
346
}
347
347
348
+ /*
349
+ * The unit of FILETIME is 100-nanoseconds since January 1, 1601, UTC.
350
+ * Returns the 100-nanoseconds ("hekto nanoseconds") since the epoch.
351
+ */
352
+ static inline long long filetime_to_hnsec (const FILETIME * ft )
353
+ {
354
+ long long winTime = ((long long )ft -> dwHighDateTime << 32 ) + ft -> dwLowDateTime ;
355
+ /* Windows to Unix Epoch conversion */
356
+ return winTime - 116444736000000000LL ;
357
+ }
358
+
348
359
/*
349
360
* Use mingw specific stat()/lstat()/fstat() implementations on Windows,
350
361
* including our own struct stat with 64 bit st_size and nanosecond-precision
@@ -361,6 +372,13 @@ struct timespec {
361
372
#endif
362
373
#endif
363
374
375
+ static inline void filetime_to_timespec (const FILETIME * ft , struct timespec * ts )
376
+ {
377
+ long long hnsec = filetime_to_hnsec (ft );
378
+ ts -> tv_sec = (time_t )(hnsec / 10000000 );
379
+ ts -> tv_nsec = (hnsec % 10000000 ) * 100 ;
380
+ }
381
+
364
382
struct mingw_stat {
365
383
_dev_t st_dev ;
366
384
_ino_t st_ino ;
You can’t perform that action at this time.
0 commit comments