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 @@ -732,24 +732,6 @@ int mingw_chmod(const char *filename, int mode)
732
732
return _wchmod (wfilename , mode );
733
733
}
734
734
735
- /*
736
- * The unit of FILETIME is 100-nanoseconds since January 1, 1601, UTC.
737
- * Returns the 100-nanoseconds ("hekto nanoseconds") since the epoch.
738
- */
739
- static inline long long filetime_to_hnsec (const FILETIME * ft )
740
- {
741
- long long winTime = ((long long )ft -> dwHighDateTime << 32 ) + ft -> dwLowDateTime ;
742
- /* Windows to Unix Epoch conversion */
743
- return winTime - 116444736000000000LL ;
744
- }
745
-
746
- static inline void filetime_to_timespec (const FILETIME * ft , struct timespec * ts )
747
- {
748
- long long hnsec = filetime_to_hnsec (ft );
749
- ts -> tv_sec = (time_t )(hnsec / 10000000 );
750
- ts -> tv_nsec = (hnsec % 10000000 ) * 100 ;
751
- }
752
-
753
735
/**
754
736
* Verifies that safe_create_leading_directories() would succeed.
755
737
*/
Original file line number Diff line number Diff line change @@ -351,6 +351,17 @@ static inline int getrlimit(int resource, struct rlimit *rlp)
351
351
return 0 ;
352
352
}
353
353
354
+ /*
355
+ * The unit of FILETIME is 100-nanoseconds since January 1, 1601, UTC.
356
+ * Returns the 100-nanoseconds ("hekto nanoseconds") since the epoch.
357
+ */
358
+ static inline long long filetime_to_hnsec (const FILETIME * ft )
359
+ {
360
+ long long winTime = ((long long )ft -> dwHighDateTime << 32 ) + ft -> dwLowDateTime ;
361
+ /* Windows to Unix Epoch conversion */
362
+ return winTime - 116444736000000000LL ;
363
+ }
364
+
354
365
/*
355
366
* Use mingw specific stat()/lstat()/fstat() implementations on Windows,
356
367
* including our own struct stat with 64 bit st_size and nanosecond-precision
@@ -367,6 +378,13 @@ struct timespec {
367
378
#endif
368
379
#endif
369
380
381
+ static inline void filetime_to_timespec (const FILETIME * ft , struct timespec * ts )
382
+ {
383
+ long long hnsec = filetime_to_hnsec (ft );
384
+ ts -> tv_sec = (time_t )(hnsec / 10000000 );
385
+ ts -> tv_nsec = (hnsec % 10000000 ) * 100 ;
386
+ }
387
+
370
388
struct mingw_stat {
371
389
_dev_t st_dev ;
372
390
_ino_t st_ino ;
You can’t perform that action at this time.
0 commit comments