Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -569,12 +569,11 @@ #ifndef _WIN32 # include # include # include #else - # define _WIN32_WINNT 0x0501 - # include + typedef unsigned char BOOL; # include #endif ], [ struct addrinfo ai; getaddrinfo(NULL, NULL, NULL, NULL); Index: src/OFApplication.m ================================================================== --- src/OFApplication.m +++ src/OFApplication.m @@ -24,14 +24,14 @@ #import "OFApplication.h" #import "OFString.h" #import "OFArray.h" #import "OFDictionary.h" +#import "OFRunLoop.h" #ifdef OF_HAVE_THREADS # import "OFThread.h" #endif -#import "OFRunLoop.h" #import "autorelease.h" #import "macros.h" #if defined(__MACH__) && !defined(OF_IOS) Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -24,14 +24,14 @@ #include #import "OFObject.h" #import "OFTimer.h" +#import "OFRunLoop.h" #ifdef OF_HAVE_THREADS # import "OFThread.h" #endif -#import "OFRunLoop.h" #import "OFAutoreleasePool.h" #import "OFAllocFailedException.h" #import "OFEnumerationMutationException.h" #import "OFInitializationFailedException.h" Index: src/OFRunLoop.h ================================================================== --- src/OFRunLoop.h +++ src/OFRunLoop.h @@ -14,19 +14,19 @@ * file. */ #import "OFObject.h" #import "OFStream.h" -#import "OFStreamObserver.h" #import "OFTCPSocket.h" @class OFSortedList; #ifdef OF_HAVE_THREADS @class OFMutex; #endif @class OFTimer; @class OFMutableDictionary; +@class OFStreamObserver; /*! * @brief A class providing a run loop for the application and its processes. */ @interface OFRunLoop: OFObject Index: src/OFRunLoop.m ================================================================== --- src/OFRunLoop.m +++ src/OFRunLoop.m @@ -18,10 +18,11 @@ #include #import "OFRunLoop.h" #import "OFDictionary.h" +#import "OFStreamObserver.h" #ifdef OF_HAVE_THREADS # import "OFThread.h" # import "OFMutex.h" #endif #import "OFSortedList.h" Index: src/OFStreamObserver.h ================================================================== --- src/OFStreamObserver.h +++ src/OFStreamObserver.h @@ -15,15 +15,11 @@ */ #import "OFObject.h" #ifdef _WIN32 -# ifndef _WIN32_WINNT -# define _WIN32_WINNT 0x0501 -# endif -# include -# include +# include #endif @class OFStream; @class OFMutableArray; @class OFMutableDictionary; Index: src/OFStreamSocket.h ================================================================== --- src/OFStreamSocket.h +++ src/OFStreamSocket.h @@ -15,27 +15,28 @@ */ #import "OFStream.h" #ifdef _WIN32 -# ifndef _WIN32_WINNT -# define _WIN32_WINNT 0x0501 -# endif # include #endif /*! * @brief A class which provides functions to create and use stream sockets. */ @interface OFStreamSocket: OFStream { - int _socket; - bool _atEndOfStream; +#ifndef _WIN32 + int _socket; +#else + SOCKET _socket; +#endif + bool _atEndOfStream; } /*! * @brief Returns a new, autoreleased OFTCPSocket. * * @return A new, autoreleased OFTCPSocket */ + (instancetype)socket; @end Index: src/OFStreamSocket.m ================================================================== --- src/OFStreamSocket.m +++ src/OFStreamSocket.m @@ -28,10 +28,14 @@ # include # include #endif #import "OFStreamSocket.h" + +#ifdef _WIN32 +# include +#endif #import "OFInitializationFailedException.h" #import "OFNotConnectedException.h" #import "OFReadFailedException.h" #import "OFSetOptionFailedException.h" Index: src/OFThread.m ================================================================== --- src/OFThread.m +++ src/OFThread.m @@ -29,15 +29,15 @@ #ifdef __HAIKU__ # include #endif +#import "OFRunLoop.h" #import "OFThread.h" #import "OFList.h" #import "OFDate.h" #import "OFSortedList.h" -#import "OFRunLoop.h" #import "OFAutoreleasePool.h" #ifdef _WIN32 # include #endif