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 @@ -705,24 +705,6 @@ int mingw_chmod(const char *filename, int mode)
705
705
return _wchmod (wfilename , mode );
706
706
}
707
707
708
- /*
709
- * The unit of FILETIME is 100-nanoseconds since January 1, 1601, UTC.
710
- * Returns the 100-nanoseconds ("hekto nanoseconds") since the epoch.
711
- */
712
- static inline long long filetime_to_hnsec (const FILETIME * ft )
713
- {
714
- long long winTime = ((long long )ft -> dwHighDateTime << 32 ) + ft -> dwLowDateTime ;
715
- /* Windows to Unix Epoch conversion */
716
- return winTime - 116444736000000000LL ;
717
- }
718
-
719
- static inline void filetime_to_timespec (const FILETIME * ft , struct timespec * ts )
720
- {
721
- long long hnsec = filetime_to_hnsec (ft );
722
- ts -> tv_sec = (time_t )(hnsec / 10000000 );
723
- ts -> tv_nsec = (hnsec % 10000000 ) * 100 ;
724
- }
725
-
726
708
/**
727
709
* Verifies that safe_create_leading_directories() would succeed.
728
710
*/
Original file line number Diff line number Diff line change @@ -344,6 +344,17 @@ static inline int getrlimit(int resource, struct rlimit *rlp)
344
344
return 0 ;
345
345
}
346
346
347
+ /*
348
+ * The unit of FILETIME is 100-nanoseconds since January 1, 1601, UTC.
349
+ * Returns the 100-nanoseconds ("hekto nanoseconds") since the epoch.
350
+ */
351
+ static inline long long filetime_to_hnsec (const FILETIME * ft )
352
+ {
353
+ long long winTime = ((long long )ft -> dwHighDateTime << 32 ) + ft -> dwLowDateTime ;
354
+ /* Windows to Unix Epoch conversion */
355
+ return winTime - 116444736000000000LL ;
356
+ }
357
+
347
358
/*
348
359
* Use mingw specific stat()/lstat()/fstat() implementations on Windows,
349
360
* including our own struct stat with 64 bit st_size and nanosecond-precision
@@ -360,6 +371,13 @@ struct timespec {
360
371
#endif
361
372
#endif
362
373
374
+ static inline void filetime_to_timespec (const FILETIME * ft , struct timespec * ts )
375
+ {
376
+ long long hnsec = filetime_to_hnsec (ft );
377
+ ts -> tv_sec = (time_t )(hnsec / 10000000 );
378
+ ts -> tv_nsec = (hnsec % 10000000 ) * 100 ;
379
+ }
380
+
363
381
struct mingw_stat {
364
382
_dev_t st_dev ;
365
383
_ino_t st_ino ;
You can’t perform that action at this time.
0 commit comments