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 @@ -606,24 +606,6 @@ int mingw_chmod(const char *filename, int mode)
606
606
return _wchmod (wfilename , mode );
607
607
}
608
608
609
- /*
610
- * The unit of FILETIME is 100-nanoseconds since January 1, 1601, UTC.
611
- * Returns the 100-nanoseconds ("hekto nanoseconds") since the epoch.
612
- */
613
- static inline long long filetime_to_hnsec (const FILETIME * ft )
614
- {
615
- long long winTime = ((long long )ft -> dwHighDateTime << 32 ) + ft -> dwLowDateTime ;
616
- /* Windows to Unix Epoch conversion */
617
- return winTime - 116444736000000000LL ;
618
- }
619
-
620
- static inline void filetime_to_timespec (const FILETIME * ft , struct timespec * ts )
621
- {
622
- long long hnsec = filetime_to_hnsec (ft );
623
- ts -> tv_sec = (time_t )(hnsec / 10000000 );
624
- ts -> tv_nsec = (hnsec % 10000000 ) * 100 ;
625
- }
626
-
627
609
/**
628
610
* Verifies that safe_create_leading_directories() would succeed.
629
611
*/
Original file line number Diff line number Diff line change @@ -353,6 +353,17 @@ static inline int getrlimit(int resource, struct rlimit *rlp)
353
353
return 0 ;
354
354
}
355
355
356
+ /*
357
+ * The unit of FILETIME is 100-nanoseconds since January 1, 1601, UTC.
358
+ * Returns the 100-nanoseconds ("hekto nanoseconds") since the epoch.
359
+ */
360
+ static inline long long filetime_to_hnsec (const FILETIME * ft )
361
+ {
362
+ long long winTime = ((long long )ft -> dwHighDateTime << 32 ) + ft -> dwLowDateTime ;
363
+ /* Windows to Unix Epoch conversion */
364
+ return winTime - 116444736000000000LL ;
365
+ }
366
+
356
367
/*
357
368
* Use mingw specific stat()/lstat()/fstat() implementations on Windows,
358
369
* including our own struct stat with 64 bit st_size and nanosecond-precision
@@ -369,6 +380,13 @@ struct timespec {
369
380
#endif
370
381
#endif
371
382
383
+ static inline void filetime_to_timespec (const FILETIME * ft , struct timespec * ts )
384
+ {
385
+ long long hnsec = filetime_to_hnsec (ft );
386
+ ts -> tv_sec = (time_t )(hnsec / 10000000 );
387
+ ts -> tv_nsec = (hnsec % 10000000 ) * 100 ;
388
+ }
389
+
372
390
struct mingw_stat {
373
391
_dev_t st_dev ;
374
392
_ino_t st_ino ;
You can’t perform that action at this time.
0 commit comments