diff --git a/Source/GSFileHandle.m b/Source/GSFileHandle.m index 37bc420cf..cfb51e637 100644 --- a/Source/GSFileHandle.m +++ b/Source/GSFileHandle.m @@ -2022,7 +2022,6 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr"; if (operation == GSFileHandleConnectCompletionNotification || operation == GSSOCKSConnect) { // Connection attempt completed. - extern int errno; int result; int rval; unsigned len = sizeof(result); diff --git a/Source/GSHTTPURLHandle.m b/Source/GSHTTPURLHandle.m index 132eb894a..61844190e 100644 --- a/Source/GSHTTPURLHandle.m +++ b/Source/GSHTTPURLHandle.m @@ -62,6 +62,8 @@ #include // For MSG_PEEK, etc #endif +#include + /* * Implement map keys for strings with case insensitive comparisons, * so we can have case insensitive matching of http headers (correct @@ -1323,7 +1325,6 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data) } if (fd >= 0) { - extern int errno; int result; unsigned char c; @@ -1438,11 +1439,6 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data) } if (sock == nil) { - #ifdef _WIN32 - extern int __declspec(dllimport) errno; - #else - extern int errno; - #endif /* * Tell superclass that the load failed - let it do housekeeping. */ diff --git a/Source/win32/NSMessagePort.m b/Source/win32/NSMessagePort.m index 87a6927c2..bfa6ecd60 100644 --- a/Source/win32/NSMessagePort.m +++ b/Source/win32/NSMessagePort.m @@ -48,8 +48,7 @@ #include "../GSPortPrivate.h" #include - -extern __declspec(dllimport) int errno; +#include #define UNISTR(X) \ ((const unichar*)[(X) cStringUsingEncoding: NSUnicodeStringEncoding]) diff --git a/Source/win32/NSMessagePortNameServer.m b/Source/win32/NSMessagePortNameServer.m index 3994852fe..c866b0bca 100644 --- a/Source/win32/NSMessagePortNameServer.m +++ b/Source/win32/NSMessagePortNameServer.m @@ -42,13 +42,14 @@ #include "GNUstepBase/GSMime.h" +#include + #include "../GSPrivate.h" #include "../GSPortPrivate.h" #define UNISTR(X) \ ((const unichar*)[(X) cStringUsingEncoding: NSUnicodeStringEncoding]) -extern __declspec(dllimport) int errno; static NSRecursiveLock *serverLock = nil; static NSMessagePortNameServer *defaultServer = nil;