All modules either build with msvcrt headers or define USE_WS_PREFIX now. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> --- include/msvcrt/sys/types.h | 8 -------- include/winsock.h | 21 +++++---------------- 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/include/msvcrt/sys/types.h b/include/msvcrt/sys/types.h index b44aa386d44..47af7752a5d 100644 --- a/include/msvcrt/sys/types.h +++ b/include/msvcrt/sys/types.h @@ -46,14 +46,6 @@ typedef int _off_t; #define _OFF_T_DEFINED #endif -#ifndef _BSDTYPES_DEFINED -typedef unsigned char u_char; -typedef unsigned short u_short; -typedef unsigned int u_int; -typedef __msvcrt_ulong u_long; -#define _BSDTYPES_DEFINED -#endif - #define dev_t _dev_t #define ino_t _ino_t #define mode_t _mode_t diff --git a/include/winsock.h b/include/winsock.h index cafac1a1723..1d33d573329 100644 --- a/include/winsock.h +++ b/include/winsock.h @@ -114,28 +114,17 @@ #include <inaddr.h> -#ifdef USE_WS_PREFIX -typedef unsigned char WS_u_char; -typedef unsigned short WS_u_short; -typedef unsigned int WS_u_int; -typedef ULONG WS_u_long; -#elif (defined(_MSC_VER) || defined(__MINGW32__) || defined(__WATCOMC__)) && !defined(_BSDTYPES_DEFINED) -/* MinGW doesn't define the u_xxx types */ -typedef unsigned char u_char; -typedef unsigned short u_short; -typedef unsigned int u_int; -typedef ULONG u_long; -#define _BSDTYPES_DEFINED -#else -#define u_long ULONG /* make sure we don't use the system u_long */ -#endif - #ifdef USE_WS_PREFIX # define WS(x) WS_##x #else # define WS(x) x #endif +typedef unsigned char WS(u_char); +typedef unsigned short WS(u_short); +typedef unsigned int WS(u_int); +typedef ULONG WS(u_long); + #ifdef __cplusplus extern "C" { #endif /* defined(__cplusplus) */ -- 2.30.2