win32.patch 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. diff -r e82d852e4fb0 include/carve/win32.h
  2. --- a/include/carve/win32.h Wed Jan 15 13:16:14 2014 +1100
  3. +++ b/include/carve/win32.h Fri Jan 31 15:32:01 2014 +0600
  4. @@ -32,17 +32,27 @@
  5. # if _MSC_VER < 1600
  6. // stdint.h is not available before VS2010
  7. -typedef char int8_t;
  8. -typedef short int16_t;
  9. -typedef long int32_t;
  10. +#if defined(_WIN32)
  11. +/* The __intXX are built-in types of the visual complier! So we don't
  12. + need to include anything else here.
  13. + This typedefs should be in sync with types from MEM_sys_types.h */
  14. -typedef unsigned char uint8_t;
  15. -typedef unsigned short uint16_t;
  16. -typedef unsigned long uint32_t;
  17. +typedef signed __int8 int8_t;
  18. +typedef signed __int16 int16_t;
  19. +typedef signed __int32 int32_t;
  20. +typedef unsigned __int8 uint8_t;
  21. +typedef unsigned __int16 uint16_t;
  22. +typedef unsigned __int32 uint32_t;
  23. +#endif
  24. typedef __int64 int64_t;
  25. typedef unsigned __int64 uint64_t;
  26. # else
  27. # include <stdint.h>
  28. # endif
  29. #endif
  30. +
  31. +#if defined(_MSC_VER)
  32. +# include <BaseTsd.h>
  33. +typedef SSIZE_T ssize_t;
  34. +#endif