commit 820c72ee71d93dc7337a0369545ae57f15f95dc3 parent 51f98ee069c7a21843d66135d5b7a6bd05846d8c Author: Michael Savage <mikejsavage@gmail.com> Date: Sun Jan 15 15:30:32 +0200 Don't define ssize_t when compiling with mingw Diffstat:
platform.h | | | 4 | ++++ |
platform_io.h | | | 2 | ++ |
win32_network.h | | | 2 | ++ |
diff --git a/platform.h b/platform.h @@ -27,6 +27,10 @@ # error new compiler #endif +#if defined( __MINGW32__ ) +# define COMPILER_MINGW 1 +#endif + #ifdef RL_TEST # define PLATFORM_RELACY 1 #endif diff --git a/platform_io.h b/platform_io.h @@ -7,7 +7,9 @@ #include <windows.h> #include <io.h> +#if !COMPILER_MINGW typedef int ssize_t; +#endif #define snprintf _snprintf #define mkdir( path, mode ) ( CreateDirectory( path, NULL ) != 0 ? 0 : -1 ) diff --git a/win32_network.h b/win32_network.h @@ -3,7 +3,9 @@ #include <winsock2.h> #include <ws2tcpip.h> +#if !COMPILER_MINGW typedef int ssize_t; +#endif inline void net_init() { WSADATA wsa_data;