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 @@ -858,24 +858,6 @@ int mingw_chmod(const char *filename, int mode)
858
858
return _wchmod (wfilename , mode );
859
859
}
860
860
861
- /*
862
- * The unit of FILETIME is 100-nanoseconds since January 1, 1601, UTC.
863
- * Returns the 100-nanoseconds ("hekto nanoseconds") since the epoch.
864
- */
865
- static inline long long filetime_to_hnsec (const FILETIME * ft )
866
- {
867
- long long winTime = ((long long )ft -> dwHighDateTime << 32 ) + ft -> dwLowDateTime ;
868
- /* Windows to Unix Epoch conversion */
869
- return winTime - 116444736000000000LL ;
870
- }
871
-
872
- static inline void filetime_to_timespec (const FILETIME * ft , struct timespec * ts )
873
- {
874
- long long hnsec = filetime_to_hnsec (ft );
875
- ts -> tv_sec = (time_t )(hnsec / 10000000 );
876
- ts -> tv_nsec = (hnsec % 10000000 ) * 100 ;
877
- }
878
-
879
861
/**
880
862
* Verifies that safe_create_leading_directories() would succeed.
881
863
*/
Original file line number Diff line number Diff line change @@ -361,6 +361,17 @@ static inline int getrlimit(int resource, struct rlimit *rlp)
361
361
return 0 ;
362
362
}
363
363
364
+ /*
365
+ * The unit of FILETIME is 100-nanoseconds since January 1, 1601, UTC.
366
+ * Returns the 100-nanoseconds ("hekto nanoseconds") since the epoch.
367
+ */
368
+ static inline long long filetime_to_hnsec (const FILETIME * ft )
369
+ {
370
+ long long winTime = ((long long )ft -> dwHighDateTime << 32 ) + ft -> dwLowDateTime ;
371
+ /* Windows to Unix Epoch conversion */
372
+ return winTime - 116444736000000000LL ;
373
+ }
374
+
364
375
/*
365
376
* Use mingw specific stat()/lstat()/fstat() implementations on Windows,
366
377
* including our own struct stat with 64 bit st_size and nanosecond-precision
@@ -377,6 +388,13 @@ struct timespec {
377
388
#endif
378
389
#endif
379
390
391
+ static inline void filetime_to_timespec (const FILETIME * ft , struct timespec * ts )
392
+ {
393
+ long long hnsec = filetime_to_hnsec (ft );
394
+ ts -> tv_sec = (time_t )(hnsec / 10000000 );
395
+ ts -> tv_nsec = (hnsec % 10000000 ) * 100 ;
396
+ }
397
+
380
398
struct mingw_stat {
381
399
_dev_t st_dev ;
382
400
_ino_t st_ino ;
You can’t perform that action at this time.
0 commit comments