win32_pg_compat.h 439 B

1234567891011121314151617181920212223
  1. #pragma once
  2. /* required to prevent double definition of struct stat on WIN64 */
  3. #if defined _VCRT_BUILD || defined _CORECRT_BUILD
  4. #include <sys/stat.h>
  5. #else
  6. #define _CRT_NO_TIME_T
  7. #include <sys/stat.h>
  8. #undef _CRT_NO_TIME_T
  9. /* copied from sys/stat.h
  10. need'em here due to disabled _CRT_NO_TIME_T */
  11. #ifdef _USE_32BIT_TIME_T
  12. typedef __time32_t time_t;
  13. #else
  14. typedef __time64_t time_t;
  15. #endif
  16. #endif
  17. #undef fstat
  18. #undef stat