Index: src/OFFile.m ================================================================== --- src/OFFile.m +++ src/OFFile.m @@ -326,21 +326,24 @@ } + (OFArray*)contentsOfDirectoryAtPath: (OFString*)path { OFMutableArray *files; +#ifndef _WIN32 of_string_encoding_t encoding; +#endif if (path == nil) @throw [OFInvalidArgumentException exception]; files = [OFMutableArray array]; - encoding = [OFString nativeOSEncoding]; #ifndef _WIN32 DIR *dir; struct dirent *dirent; + + encoding = [OFString nativeOSEncoding]; if ((dir = opendir([path cStringWithEncoding: encoding])) == NULL) @throw [OFOpenFileFailedException exceptionWithPath: path mode: @"r"]; @@ -644,11 +647,13 @@ + (void)moveItemAtPath: (OFString*)source toPath: (OFString*)destination { void *pool; of_stat_t s; +#ifndef _WIN32 of_string_encoding_t encoding; +#endif if (source == nil || destination == nil) @throw [OFInvalidArgumentException exception]; pool = objc_autoreleasePoolPush(); @@ -658,13 +663,13 @@ @throw [OFCopyItemFailedException exceptionWithSourcePath: source destinationPath: destination]; } +#ifndef _WIN32 encoding = [OFString nativeOSEncoding]; -#ifndef _WIN32 if (rename([source cStringWithEncoding: encoding], [destination cStringWithEncoding: encoding])) { #else if (_wrename([source UTF16String], [destination UTF16String])) { #endif Index: src/OFTCPSocket.m ================================================================== --- src/OFTCPSocket.m +++ src/OFTCPSocket.m @@ -14,11 +14,10 @@ * file. */ #include "config.h" -#define _WIN32_WINNT 0x0501 #define __NO_EXT_QNX #include #include #include Index: src/resolver.m ================================================================== --- src/resolver.m +++ src/resolver.m @@ -13,10 +13,12 @@ * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" + +#define _WIN32_WINNT 0x0501 #include #include #include #include Index: src/socket.h ================================================================== --- src/socket.h +++ src/socket.h @@ -25,10 +25,11 @@ #ifdef OF_HAVE_SYS_SOCKET_H # include #endif #ifdef _WIN32 +# include # include #endif #ifdef __wii__ # define BOOL OGC_BOOL