mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 17:51:01 +00:00
More mingw32 tidyups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22000 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
666282d7fd
commit
5a64008d76
7 changed files with 2342 additions and 364 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2005-11-14 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/win32/GSFileHandleWin32.m: Move mingw32 implementation of
|
||||||
|
file handle code here.
|
||||||
|
* Source/GSFileHandle.m: Remove mingw32 code.
|
||||||
|
|
||||||
2005-11-12 Richard Frith-Macdonald <rfm@gnu.org>
|
2005-11-12 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSPathUtilities.m: NSOpenStepRootDirectory() remove
|
* Source/NSPathUtilities.m: NSOpenStepRootDirectory() remove
|
||||||
|
|
|
@ -129,7 +129,6 @@ GSArray.m \
|
||||||
GSAttributedString.m \
|
GSAttributedString.m \
|
||||||
GSCountedSet.m \
|
GSCountedSet.m \
|
||||||
GSDictionary.m \
|
GSDictionary.m \
|
||||||
GSFileHandle.m \
|
|
||||||
GSFormat.m \
|
GSFormat.m \
|
||||||
GSFTPURLHandle.m \
|
GSFTPURLHandle.m \
|
||||||
GSHTTPURLHandle.m \
|
GSHTTPURLHandle.m \
|
||||||
|
@ -226,6 +225,7 @@ objc-load.m
|
||||||
|
|
||||||
ifneq ($(GNUSTEP_TARGET_OS), mingw32)
|
ifneq ($(GNUSTEP_TARGET_OS), mingw32)
|
||||||
BASE_MFILES += \
|
BASE_MFILES += \
|
||||||
|
GSFileHandle.m \
|
||||||
NSMessagePort.m \
|
NSMessagePort.m \
|
||||||
NSMessagePortNameServer.m
|
NSMessagePortNameServer.m
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -44,15 +44,6 @@
|
||||||
|
|
||||||
#include "../Tools/gdomap.h"
|
#include "../Tools/gdomap.h"
|
||||||
|
|
||||||
#if defined(__MINGW32__)
|
|
||||||
#include <winsock2.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <sys/file.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <io.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#else
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
@ -68,11 +59,6 @@
|
||||||
#endif
|
#endif
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
|
||||||
#define SOCKET int
|
|
||||||
#define SOCKET_ERROR -1
|
|
||||||
#define INVALID_SOCKET -1
|
|
||||||
#endif /* __MINGW32__ */
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -133,11 +119,7 @@ static NSString* NotificationKey = @"NSFileHandleNotificationKey";
|
||||||
#endif
|
#endif
|
||||||
if (isSocket)
|
if (isSocket)
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
len = recv((SOCKET)_get_osfhandle(descriptor), buf, len, 0);
|
|
||||||
#else
|
|
||||||
len = recv(descriptor, buf, len, 0);
|
len = recv(descriptor, buf, len, 0);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -161,11 +143,7 @@ static NSString* NotificationKey = @"NSFileHandleNotificationKey";
|
||||||
#endif
|
#endif
|
||||||
if (isSocket)
|
if (isSocket)
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
len = send((SOCKET)_get_osfhandle(descriptor), buf, len, 0);
|
|
||||||
#else
|
|
||||||
len = send(descriptor, buf, len, 0);
|
len = send(descriptor, buf, len, 0);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -302,14 +280,6 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
||||||
[self setNonBlocking: wasNonBlocking];
|
[self setNonBlocking: wasNonBlocking];
|
||||||
if (closeOnDealloc == YES)
|
if (closeOnDealloc == YES)
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
if (isSocket)
|
|
||||||
{
|
|
||||||
closesocket((SOCKET)_get_osfhandle(descriptor));
|
|
||||||
WSACloseEvent(event);
|
|
||||||
event = WSA_INVALID_EVENT;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
close(descriptor);
|
close(descriptor);
|
||||||
descriptor = -1;
|
descriptor = -1;
|
||||||
}
|
}
|
||||||
|
@ -842,21 +812,13 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
{
|
{
|
||||||
NSLog(@"unable to bind to port %s:%d - %s", inet_ntoa(lsin.sin_addr),
|
NSLog(@"unable to bind to port %s:%d - %s", inet_ntoa(lsin.sin_addr),
|
||||||
GSSwapBigI16ToHost(sin.sin_port), GSLastErrorStr(errno));
|
GSSwapBigI16ToHost(sin.sin_port), GSLastErrorStr(errno));
|
||||||
#if defined(__MINGW32__)
|
|
||||||
(void) closesocket(net);
|
|
||||||
#else
|
|
||||||
(void) close(net);
|
(void) close(net);
|
||||||
#endif
|
|
||||||
RELEASE(self);
|
RELEASE(self);
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__MINGW32__)
|
|
||||||
self = [self initWithNativeHandle: (void*)net closeOnDealloc: YES];
|
|
||||||
#else
|
|
||||||
self = [self initWithFileDescriptor: net closeOnDealloc: YES];
|
self = [self initWithFileDescriptor: net closeOnDealloc: YES];
|
||||||
#endif
|
|
||||||
if (self)
|
if (self)
|
||||||
{
|
{
|
||||||
NSMutableDictionary* info;
|
NSMutableDictionary* info;
|
||||||
|
@ -865,11 +827,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
[self setNonBlocking: YES];
|
[self setNonBlocking: YES];
|
||||||
if (connect(net, (struct sockaddr*)&sin, sizeof(sin)) == SOCKET_ERROR)
|
if (connect(net, (struct sockaddr*)&sin, sizeof(sin)) == SOCKET_ERROR)
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
if (WSAGetLastError() != WSAEWOULDBLOCK)
|
|
||||||
#else
|
|
||||||
if (errno != EINPROGRESS)
|
if (errno != EINPROGRESS)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
NSLog(@"unable to make connection to %s:%d - %s",
|
NSLog(@"unable to make connection to %s:%d - %s",
|
||||||
inet_ntoa(sin.sin_addr),
|
inet_ntoa(sin.sin_addr),
|
||||||
|
@ -956,11 +914,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
{
|
{
|
||||||
NSLog(@"unable to bind to port %s:%d - %s", inet_ntoa(sin.sin_addr),
|
NSLog(@"unable to bind to port %s:%d - %s", inet_ntoa(sin.sin_addr),
|
||||||
GSSwapBigI16ToHost(sin.sin_port), GSLastErrorStr(errno));
|
GSSwapBigI16ToHost(sin.sin_port), GSLastErrorStr(errno));
|
||||||
#if defined(__MINGW32__)
|
|
||||||
(void) closesocket(net);
|
|
||||||
#else
|
|
||||||
(void) close(net);
|
(void) close(net);
|
||||||
#endif
|
|
||||||
RELEASE(self);
|
RELEASE(self);
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
@ -968,11 +922,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
if (listen(net, 256) == SOCKET_ERROR)
|
if (listen(net, 256) == SOCKET_ERROR)
|
||||||
{
|
{
|
||||||
NSLog(@"unable to listen on port - %s", GSLastErrorStr(errno));
|
NSLog(@"unable to listen on port - %s", GSLastErrorStr(errno));
|
||||||
#if defined(__MINGW32__)
|
|
||||||
(void) closesocket(net);
|
|
||||||
#else
|
|
||||||
(void) close(net);
|
(void) close(net);
|
||||||
#endif
|
|
||||||
RELEASE(self);
|
RELEASE(self);
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
@ -980,20 +930,12 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
if (getsockname(net, (struct sockaddr*)&sin, &size) == SOCKET_ERROR)
|
if (getsockname(net, (struct sockaddr*)&sin, &size) == SOCKET_ERROR)
|
||||||
{
|
{
|
||||||
NSLog(@"unable to get socket name - %s", GSLastErrorStr(errno));
|
NSLog(@"unable to get socket name - %s", GSLastErrorStr(errno));
|
||||||
#if defined(__MINGW32__)
|
|
||||||
(void) closesocket(net);
|
|
||||||
#else
|
|
||||||
(void) close(net);
|
(void) close(net);
|
||||||
#endif
|
|
||||||
RELEASE(self);
|
RELEASE(self);
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__MINGW32__)
|
|
||||||
self = [self initWithNativeHandle: (void*)net closeOnDealloc: YES];
|
|
||||||
#else
|
|
||||||
self = [self initWithFileDescriptor: net closeOnDealloc: YES];
|
self = [self initWithFileDescriptor: net closeOnDealloc: YES];
|
||||||
#endif
|
|
||||||
if (self)
|
if (self)
|
||||||
{
|
{
|
||||||
isSocket = YES;
|
isSocket = YES;
|
||||||
|
@ -1008,13 +950,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
|
|
||||||
- (id) initForReadingAtPath: (NSString*)path
|
- (id) initForReadingAtPath: (NSString*)path
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
int d = _wopen(
|
|
||||||
(unichar*)[path cStringUsingEncoding: NSUnicodeStringEncoding],
|
|
||||||
O_RDONLY|O_BINARY);
|
|
||||||
#else
|
|
||||||
int d = open([path fileSystemRepresentation], O_RDONLY|O_BINARY);
|
int d = open([path fileSystemRepresentation], O_RDONLY|O_BINARY);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (d < 0)
|
if (d < 0)
|
||||||
{
|
{
|
||||||
|
@ -1036,13 +972,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
|
|
||||||
- (id) initForWritingAtPath: (NSString*)path
|
- (id) initForWritingAtPath: (NSString*)path
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
int d = _wopen(
|
|
||||||
(unichar*)[path cStringUsingEncoding: NSUnicodeStringEncoding],
|
|
||||||
O_WRONLY|O_BINARY);
|
|
||||||
#else
|
|
||||||
int d = open([path fileSystemRepresentation], O_WRONLY|O_BINARY);
|
int d = open([path fileSystemRepresentation], O_WRONLY|O_BINARY);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (d < 0)
|
if (d < 0)
|
||||||
{
|
{
|
||||||
|
@ -1064,13 +994,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
|
|
||||||
- (id) initForUpdatingAtPath: (NSString*)path
|
- (id) initForUpdatingAtPath: (NSString*)path
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
int d = _wopen(
|
|
||||||
(unichar*)[path cStringUsingEncoding: NSUnicodeStringEncoding],
|
|
||||||
O_RDWR|O_BINARY);
|
|
||||||
#else
|
|
||||||
int d = open([path fileSystemRepresentation], O_RDWR|O_BINARY);
|
int d = open([path fileSystemRepresentation], O_RDWR|O_BINARY);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (d < 0)
|
if (d < 0)
|
||||||
{
|
{
|
||||||
|
@ -1151,18 +1075,12 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
|
|
||||||
- (id) initWithNullDevice
|
- (id) initWithNullDevice
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
isNullDevice = YES;
|
|
||||||
isStandardFile = YES;
|
|
||||||
descriptor = -1;
|
|
||||||
#else
|
|
||||||
self = [self initWithFileDescriptor: open("/dev/null", O_RDWR|O_BINARY)
|
self = [self initWithFileDescriptor: open("/dev/null", O_RDWR|O_BINARY)
|
||||||
closeOnDealloc: YES];
|
closeOnDealloc: YES];
|
||||||
if (self)
|
if (self)
|
||||||
{
|
{
|
||||||
isNullDevice = YES;
|
isNullDevice = YES;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1171,18 +1089,10 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (self != nil)
|
if (self != nil)
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
struct stat sbuf;
|
||||||
struct _stat sbuf;
|
int e;
|
||||||
#else
|
|
||||||
struct stat sbuf;
|
|
||||||
int e;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__MINGW32__)
|
|
||||||
if (_fstat(desc, &sbuf) != 0)
|
|
||||||
#else
|
|
||||||
if (fstat(desc, &sbuf) < 0)
|
if (fstat(desc, &sbuf) < 0)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
NSLog(@"unable to get status of descriptor %d - %s",
|
NSLog(@"unable to get status of descriptor %d - %s",
|
||||||
desc, GSLastErrorStr(errno));
|
desc, GSLastErrorStr(errno));
|
||||||
|
@ -1199,26 +1109,6 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__MINGW32__)
|
|
||||||
if (isStandardFile == NO)
|
|
||||||
{
|
|
||||||
unsigned long nbio = 0;
|
|
||||||
|
|
||||||
isSocket = YES;
|
|
||||||
/*
|
|
||||||
* This is probably a socket ... try
|
|
||||||
* using a socket specific call and see if that fails.
|
|
||||||
*/
|
|
||||||
if (ioctlsocket((SOCKET)_get_osfhandle(desc), FIONBIO, &nbio) == 0)
|
|
||||||
{
|
|
||||||
wasNonBlocking = (nbio == 0) ? NO : YES;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
isSocket = NO; // maybe special file desc. like std in/out/err?
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if ((e = fcntl(desc, F_GETFL, 0)) >= 0)
|
if ((e = fcntl(desc, F_GETFL, 0)) >= 0)
|
||||||
{
|
{
|
||||||
if (e & NBLK_OPT)
|
if (e & NBLK_OPT)
|
||||||
|
@ -1230,7 +1120,6 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
wasNonBlocking = NO;
|
wasNonBlocking = NO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
isNonBlocking = wasNonBlocking;
|
isNonBlocking = wasNonBlocking;
|
||||||
descriptor = desc;
|
descriptor = desc;
|
||||||
|
@ -1243,44 +1132,18 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
writeOK = YES;
|
writeOK = YES;
|
||||||
acceptOK = YES;
|
acceptOK = YES;
|
||||||
connectOK = YES;
|
connectOK = YES;
|
||||||
#if defined(__MINGW32__)
|
|
||||||
if (isSocket)
|
|
||||||
{
|
|
||||||
event = CreateEvent(NULL, NO, NO, NULL);
|
|
||||||
if (event == WSA_INVALID_EVENT)
|
|
||||||
{
|
|
||||||
NSLog(@"Invalid Event - '%d'", WSAGetLastError());
|
|
||||||
return nil;
|
|
||||||
}
|
|
||||||
WSAEventSelect(_get_osfhandle(descriptor), event, FD_ALL_EVENTS);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
event = WSA_INVALID_EVENT;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithNativeHandle: (void*)hdl
|
- (id) initWithNativeHandle: (void*)hdl
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
return [self initWithFileDescriptor: _open_osfhandle((SOCKET)hdl, 0)
|
|
||||||
closeOnDealloc: NO];
|
|
||||||
#else
|
|
||||||
return [self initWithFileDescriptor: (gsaddr)hdl closeOnDealloc: NO];
|
return [self initWithFileDescriptor: (gsaddr)hdl closeOnDealloc: NO];
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithNativeHandle: (void*)hdl closeOnDealloc: (BOOL)flag
|
- (id) initWithNativeHandle: (void*)hdl closeOnDealloc: (BOOL)flag
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
return [self initWithFileDescriptor: _open_osfhandle((SOCKET)hdl, 0)
|
|
||||||
closeOnDealloc: flag];
|
|
||||||
#else
|
|
||||||
return [self initWithFileDescriptor: (gsaddr)hdl closeOnDealloc: flag];
|
return [self initWithFileDescriptor: (gsaddr)hdl closeOnDealloc: flag];
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) checkAccept
|
- (void) checkAccept
|
||||||
|
@ -1385,11 +1248,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
|
|
||||||
- (void*) nativeHandle
|
- (void*) nativeHandle
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
return (void*)(SOCKET)_get_osfhandle(descriptor);
|
|
||||||
#else
|
|
||||||
return (void*)descriptor;
|
return (void*)descriptor;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Synchronous I/O operations
|
// Synchronous I/O operations
|
||||||
|
@ -1530,12 +1389,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
rval = [self write: (char*)ptr+pos length: toWrite];
|
rval = [self write: (char*)ptr+pos length: toWrite];
|
||||||
if (rval < 0)
|
if (rval < 0)
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
if (WSAGetLastError()== WSAEINTR ||
|
|
||||||
WSAGetLastError()== WSAEWOULDBLOCK)
|
|
||||||
#else
|
|
||||||
if (errno == EAGAIN || errno == EINTR)
|
if (errno == EAGAIN || errno == EINTR)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
rval = 0;
|
rval = 0;
|
||||||
}
|
}
|
||||||
|
@ -1650,11 +1504,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
#if defined(__MINGW32__)
|
|
||||||
result = _lseek(descriptor, 0, SEEK_CUR);
|
|
||||||
#else
|
|
||||||
result = lseek(descriptor, 0, SEEK_CUR);
|
result = lseek(descriptor, 0, SEEK_CUR);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
{
|
{
|
||||||
|
@ -1678,11 +1528,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
#if defined(__MINGW32__)
|
|
||||||
result = _lseek(descriptor, 0, SEEK_END);
|
|
||||||
#else
|
|
||||||
result = lseek(descriptor, 0, SEEK_END);
|
result = lseek(descriptor, 0, SEEK_END);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
{
|
{
|
||||||
|
@ -1706,11 +1552,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
#if defined(__MINGW32__)
|
|
||||||
result = _lseek(descriptor, (off_t)pos, SEEK_SET);
|
|
||||||
#else
|
|
||||||
result = lseek(descriptor, (off_t)pos, SEEK_SET);
|
result = lseek(descriptor, (off_t)pos, SEEK_SET);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
{
|
{
|
||||||
|
@ -1740,14 +1582,6 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
gzclose(gzDescriptor);
|
gzclose(gzDescriptor);
|
||||||
gzDescriptor = 0;
|
gzDescriptor = 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#if defined(__MINGW32__)
|
|
||||||
if (isSocket)
|
|
||||||
{
|
|
||||||
(void)closesocket((SOCKET)_get_osfhandle(descriptor));
|
|
||||||
WSACloseEvent(event);
|
|
||||||
event = WSA_INVALID_EVENT;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
(void)close(descriptor);
|
(void)close(descriptor);
|
||||||
descriptor = -1;
|
descriptor = -1;
|
||||||
|
@ -1782,24 +1616,16 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
{
|
{
|
||||||
if (isStandardFile)
|
if (isStandardFile)
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
(void)_commit(descriptor);
|
|
||||||
#else
|
|
||||||
(void)sync();
|
(void)sync();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) truncateFileAtOffset: (unsigned long long)pos
|
- (void) truncateFileAtOffset: (unsigned long long)pos
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
_chsize(descriptor, pos);
|
|
||||||
#else
|
|
||||||
if (isStandardFile && descriptor >= 0)
|
if (isStandardFile && descriptor >= 0)
|
||||||
{
|
{
|
||||||
(void)ftruncate(descriptor, pos);
|
(void)ftruncate(descriptor, pos);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
[self seekToFileOffset: pos];
|
[self seekToFileOffset: pos];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1926,32 +1752,18 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
|
|
||||||
for (i = 0; i < [modes count]; i++)
|
for (i = 0; i < [modes count]; i++)
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
[l removeEvent: (void*)(gsaddr)event
|
|
||||||
type: ET_HANDLE
|
|
||||||
forMode: [modes objectAtIndex: i]
|
|
||||||
all: YES];
|
|
||||||
#else
|
|
||||||
[l removeEvent: (void*)(gsaddr)descriptor
|
[l removeEvent: (void*)(gsaddr)descriptor
|
||||||
type: ET_RDESC
|
type: ET_RDESC
|
||||||
forMode: [modes objectAtIndex: i]
|
forMode: [modes objectAtIndex: i]
|
||||||
all: YES];
|
all: YES];
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
[l removeEvent: (void*)(gsaddr)event
|
|
||||||
type: ET_HANDLE
|
|
||||||
forMode: NSDefaultRunLoopMode
|
|
||||||
all: YES];
|
|
||||||
#else
|
|
||||||
[l removeEvent: (void*)(gsaddr)descriptor
|
[l removeEvent: (void*)(gsaddr)descriptor
|
||||||
type: ET_RDESC
|
type: ET_RDESC
|
||||||
forMode: NSDefaultRunLoopMode
|
forMode: NSDefaultRunLoopMode
|
||||||
all: YES];
|
all: YES];
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1980,32 +1792,18 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
|
|
||||||
for (i = 0; i < [modes count]; i++)
|
for (i = 0; i < [modes count]; i++)
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
[l removeEvent: (void*)(gsaddr)event
|
|
||||||
type: ET_HANDLE
|
|
||||||
forMode: [modes objectAtIndex: i]
|
|
||||||
all: YES];
|
|
||||||
#else
|
|
||||||
[l removeEvent: (void*)(gsaddr)descriptor
|
[l removeEvent: (void*)(gsaddr)descriptor
|
||||||
type: ET_WDESC
|
type: ET_WDESC
|
||||||
forMode: [modes objectAtIndex: i]
|
forMode: [modes objectAtIndex: i]
|
||||||
all: YES];
|
all: YES];
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
[l removeEvent: (void*)(gsaddr)event
|
|
||||||
type: ET_HANDLE
|
|
||||||
forMode: NSDefaultRunLoopMode
|
|
||||||
all: YES];
|
|
||||||
#else
|
|
||||||
[l removeEvent: (void*)(gsaddr)descriptor
|
[l removeEvent: (void*)(gsaddr)descriptor
|
||||||
type: ET_WDESC
|
type: ET_WDESC
|
||||||
forMode: NSDefaultRunLoopMode
|
forMode: NSDefaultRunLoopMode
|
||||||
all: YES];
|
all: YES];
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2026,33 +1824,19 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
|
|
||||||
for (i = 0; i < [modes count]; i++)
|
for (i = 0; i < [modes count]; i++)
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
[l addEvent: (void*)(gsaddr)event
|
|
||||||
type: ET_HANDLE
|
|
||||||
watcher: self
|
|
||||||
forMode: [modes objectAtIndex: i]];
|
|
||||||
#else
|
|
||||||
[l addEvent: (void*)(gsaddr)descriptor
|
[l addEvent: (void*)(gsaddr)descriptor
|
||||||
type: ET_RDESC
|
type: ET_RDESC
|
||||||
watcher: self
|
watcher: self
|
||||||
forMode: [modes objectAtIndex: i]];
|
forMode: [modes objectAtIndex: i]];
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
[readInfo setObject: modes forKey: NSFileHandleNotificationMonitorModes];
|
[readInfo setObject: modes forKey: NSFileHandleNotificationMonitorModes];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
[l addEvent: (void*)(gsaddr)event
|
|
||||||
type: ET_HANDLE
|
|
||||||
watcher: self
|
|
||||||
forMode: NSDefaultRunLoopMode];
|
|
||||||
#else
|
|
||||||
[l addEvent: (void*)(gsaddr)descriptor
|
[l addEvent: (void*)(gsaddr)descriptor
|
||||||
type: ET_RDESC
|
type: ET_RDESC
|
||||||
watcher: self
|
watcher: self
|
||||||
forMode: NSDefaultRunLoopMode];
|
forMode: NSDefaultRunLoopMode];
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2077,32 +1861,18 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
|
|
||||||
for (i = 0; i < [modes count]; i++)
|
for (i = 0; i < [modes count]; i++)
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
[l addEvent: (void*)(gsaddr)event
|
|
||||||
type: ET_HANDLE
|
|
||||||
watcher: self
|
|
||||||
forMode: [modes objectAtIndex: i]];
|
|
||||||
#else
|
|
||||||
[l addEvent: (void*)(gsaddr)descriptor
|
[l addEvent: (void*)(gsaddr)descriptor
|
||||||
type: ET_WDESC
|
type: ET_WDESC
|
||||||
watcher: self
|
watcher: self
|
||||||
forMode: [modes objectAtIndex: i]];
|
forMode: [modes objectAtIndex: i]];
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
[l addEvent: (void*)(gsaddr)event
|
|
||||||
type: ET_HANDLE
|
|
||||||
watcher: self
|
|
||||||
forMode: NSDefaultRunLoopMode];
|
|
||||||
#else
|
|
||||||
[l addEvent: (void*)(gsaddr)descriptor
|
[l addEvent: (void*)(gsaddr)descriptor
|
||||||
type: ET_WDESC
|
type: ET_WDESC
|
||||||
watcher: self
|
watcher: self
|
||||||
forMode: NSDefaultRunLoopMode];
|
forMode: NSDefaultRunLoopMode];
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2115,18 +1885,10 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
if (operation == NSFileHandleConnectionAcceptedNotification)
|
if (operation == NSFileHandleConnectionAcceptedNotification)
|
||||||
{
|
{
|
||||||
struct sockaddr_in buf;
|
struct sockaddr_in buf;
|
||||||
#if defined(__MINGW32__)
|
|
||||||
SOCKET desc;
|
|
||||||
#else
|
|
||||||
int desc;
|
int desc;
|
||||||
#endif
|
|
||||||
unsigned int blen = sizeof(buf);
|
unsigned int blen = sizeof(buf);
|
||||||
|
|
||||||
#if defined(__MINGW32__)
|
|
||||||
desc = accept((SOCKET)_get_osfhandle(descriptor), (struct sockaddr*)&buf, &blen);
|
|
||||||
#else
|
|
||||||
desc = accept(descriptor, (struct sockaddr*)&buf, &blen);
|
desc = accept(descriptor, (struct sockaddr*)&buf, &blen);
|
||||||
#endif
|
|
||||||
if (desc == INVALID_SOCKET)
|
if (desc == INVALID_SOCKET)
|
||||||
{
|
{
|
||||||
NSString *s;
|
NSString *s;
|
||||||
|
@ -2149,13 +1911,8 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
setsockopt(desc, SOL_SOCKET, SO_KEEPALIVE, (char *)&status,
|
setsockopt(desc, SOL_SOCKET, SO_KEEPALIVE, (char *)&status,
|
||||||
sizeof(status));
|
sizeof(status));
|
||||||
|
|
||||||
#if defined(__MINGW32__)
|
|
||||||
h = [[[self class] alloc] initWithNativeHandle: (void*)desc
|
|
||||||
closeOnDealloc: YES];
|
|
||||||
#else
|
|
||||||
h = [[[self class] alloc] initWithFileDescriptor: desc
|
h = [[[self class] alloc] initWithFileDescriptor: desc
|
||||||
closeOnDealloc: YES];
|
closeOnDealloc: YES];
|
||||||
#endif
|
|
||||||
h->isSocket = YES;
|
h->isSocket = YES;
|
||||||
getpeername(desc, (struct sockaddr*)&sin, &size);
|
getpeername(desc, (struct sockaddr*)&sin, &size);
|
||||||
[h setAddr: &sin];
|
[h setAddr: &sin];
|
||||||
|
@ -2200,12 +1957,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
}
|
}
|
||||||
else if (received < 0)
|
else if (received < 0)
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
if (WSAGetLastError() != WSAEINTR
|
|
||||||
&& WSAGetLastError() != WSAEWOULDBLOCK)
|
|
||||||
#else
|
|
||||||
if (errno != EAGAIN && errno != EINTR)
|
if (errno != EAGAIN && errno != EINTR)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
NSString *s;
|
NSString *s;
|
||||||
|
|
||||||
|
@ -2240,13 +1992,8 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
int result;
|
int result;
|
||||||
unsigned len = sizeof(result);
|
unsigned len = sizeof(result);
|
||||||
|
|
||||||
#if defined(__MINGW32__)
|
|
||||||
if (getsockopt((SOCKET)_get_osfhandle(descriptor), SOL_SOCKET, SO_ERROR,
|
|
||||||
(char*)&result, &len) == 0 && result != 0)
|
|
||||||
#else
|
|
||||||
if (getsockopt(descriptor, SOL_SOCKET, SO_ERROR,
|
if (getsockopt(descriptor, SOL_SOCKET, SO_ERROR,
|
||||||
(char*)&result, &len) == 0 && result != 0)
|
(char*)&result, &len) == 0 && result != 0)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
NSString *s;
|
NSString *s;
|
||||||
|
|
||||||
|
@ -2279,12 +2026,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
length: length-writePos];
|
length: length-writePos];
|
||||||
if (written <= 0)
|
if (written <= 0)
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
if (written < 0 && WSAGetLastError()!= WSAEINTR
|
|
||||||
&& WSAGetLastError()!= WSAEWOULDBLOCK)
|
|
||||||
#else
|
|
||||||
if (written < 0 && errno != EAGAIN && errno != EINTR)
|
if (written < 0 && errno != EAGAIN && errno != EINTR)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
NSString *s;
|
NSString *s;
|
||||||
|
|
||||||
|
@ -2311,78 +2053,12 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
extra: (void*)extra
|
extra: (void*)extra
|
||||||
forMode: (NSString*)mode
|
forMode: (NSString*)mode
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
WSANETWORKEVENTS ocurredEvents;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
NSDebugMLLog(@"NSFileHandle", @"%@ event: %d", self, type);
|
NSDebugMLLog(@"NSFileHandle", @"%@ event: %d", self, type);
|
||||||
|
|
||||||
if (isNonBlocking == NO)
|
if (isNonBlocking == NO)
|
||||||
{
|
{
|
||||||
[self setNonBlocking: YES];
|
[self setNonBlocking: YES];
|
||||||
}
|
}
|
||||||
#if defined(__MINGW32__)
|
|
||||||
if (WSAEnumNetworkEvents((SOCKET)_get_osfhandle(descriptor),
|
|
||||||
event, &ocurredEvents) == SOCKET_ERROR)
|
|
||||||
{
|
|
||||||
NSLog(@"Error getting event type %d", WSAGetLastError());
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
if (ocurredEvents.lNetworkEvents & FD_CONNECT)
|
|
||||||
{
|
|
||||||
NSDebugMLLog(@"NSFileHandle", @"Connect on %x", extra);
|
|
||||||
ocurredEvents.lNetworkEvents ^= FD_CONNECT;
|
|
||||||
[self receivedEventWrite];
|
|
||||||
GSNotifyASAP();
|
|
||||||
}
|
|
||||||
if (ocurredEvents.lNetworkEvents & FD_ACCEPT)
|
|
||||||
{
|
|
||||||
NSDebugMLLog(@"NSFileHandle", @"Accept on %x", extra);
|
|
||||||
ocurredEvents.lNetworkEvents ^= FD_ACCEPT;
|
|
||||||
[self receivedEventRead];
|
|
||||||
GSNotifyASAP();
|
|
||||||
}
|
|
||||||
if (ocurredEvents.lNetworkEvents & FD_WRITE)
|
|
||||||
{
|
|
||||||
NSDebugMLLog(@"NSFileHandle", @"Write on %x", extra);
|
|
||||||
ocurredEvents.lNetworkEvents ^= FD_WRITE;
|
|
||||||
[self receivedEventWrite];
|
|
||||||
GSNotifyASAP();
|
|
||||||
}
|
|
||||||
if (ocurredEvents.lNetworkEvents & FD_READ)
|
|
||||||
{
|
|
||||||
NSDebugMLLog(@"NSFileHandle", @"Read on %x", extra);
|
|
||||||
ocurredEvents.lNetworkEvents ^= FD_READ;
|
|
||||||
[self receivedEventRead];
|
|
||||||
GSNotifyASAP();
|
|
||||||
}
|
|
||||||
if (ocurredEvents.lNetworkEvents & FD_OOB)
|
|
||||||
{
|
|
||||||
NSDebugMLLog(@"NSFileHandle", @"OOB on %x", extra);
|
|
||||||
ocurredEvents.lNetworkEvents ^= FD_OOB;
|
|
||||||
[self receivedEventRead];
|
|
||||||
GSNotifyASAP();
|
|
||||||
}
|
|
||||||
if (ocurredEvents.lNetworkEvents & FD_CLOSE)
|
|
||||||
{
|
|
||||||
NSDebugMLLog(@"NSFileHandle", @"Close on %x", extra);
|
|
||||||
ocurredEvents.lNetworkEvents ^= FD_CLOSE;
|
|
||||||
if ([writeInfo count] > 0)
|
|
||||||
{
|
|
||||||
[self receivedEventWrite];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
[self receivedEventRead];
|
|
||||||
}
|
|
||||||
GSNotifyASAP();
|
|
||||||
}
|
|
||||||
if (ocurredEvents.lNetworkEvents)
|
|
||||||
{
|
|
||||||
NSLog(@"Event not get %d", ocurredEvents.lNetworkEvents);
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (type == ET_RDESC)
|
if (type == ET_RDESC)
|
||||||
{
|
{
|
||||||
[self receivedEventRead];
|
[self receivedEventRead];
|
||||||
|
@ -2391,7 +2067,6 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
{
|
{
|
||||||
[self receivedEventWrite];
|
[self receivedEventWrite];
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSDate*) timedOutEvent: (void*)data
|
- (NSDate*) timedOutEvent: (void*)data
|
||||||
|
@ -2425,37 +2100,6 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if defined(__MINGW32__)
|
|
||||||
unsigned long dummy;
|
|
||||||
|
|
||||||
if (isSocket != YES)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (flag)
|
|
||||||
{
|
|
||||||
dummy = 1;
|
|
||||||
if (ioctlsocket((SOCKET)_get_osfhandle(descriptor), FIONBIO, &dummy)
|
|
||||||
== SOCKET_ERROR)
|
|
||||||
{
|
|
||||||
NSLog(@"unable to set non-blocking mode - %s",
|
|
||||||
GSLastErrorStr(errno));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
isNonBlocking = flag;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dummy = 0;
|
|
||||||
if (ioctlsocket((SOCKET)_get_osfhandle(descriptor), FIONBIO, &dummy)
|
|
||||||
== SOCKET_ERROR)
|
|
||||||
{
|
|
||||||
NSLog(@"unable to set blocking mode - %s",
|
|
||||||
GSLastErrorStr(errno));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
isNonBlocking = flag;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
int e;
|
int e;
|
||||||
|
|
||||||
if ((e = fcntl(descriptor, F_GETFL, 0)) >= 0)
|
if ((e = fcntl(descriptor, F_GETFL, 0)) >= 0)
|
||||||
|
@ -2483,7 +2127,6 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
||||||
NSLog(@"unable to get non-blocking mode for %d - %s",
|
NSLog(@"unable to get non-blocking mode for %d - %s",
|
||||||
descriptor, GSLastErrorStr(errno));
|
descriptor, GSLastErrorStr(errno));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ include ../../config.mak
|
||||||
SUBPROJECT_NAME = win32
|
SUBPROJECT_NAME = win32
|
||||||
|
|
||||||
win32_OBJC_FILES =\
|
win32_OBJC_FILES =\
|
||||||
|
GSFileHandleWin32.m \
|
||||||
GSRunLoopCtxt.m \
|
GSRunLoopCtxt.m \
|
||||||
GSRunLoopWatcher.m \
|
GSRunLoopWatcher.m \
|
||||||
NSMessagePortWin32.m \
|
NSMessagePortWin32.m \
|
||||||
|
|
2302
Source/win32/GSFileHandleWin32.m
Normal file
2302
Source/win32/GSFileHandleWin32.m
Normal file
File diff suppressed because it is too large
Load diff
|
@ -388,10 +388,36 @@ static const NSMapTableValueCallBacks WatcherMapValueCallBacks =
|
||||||
// check wait errors
|
// check wait errors
|
||||||
if (wait_return == WAIT_FAILED)
|
if (wait_return == WAIT_FAILED)
|
||||||
{
|
{
|
||||||
NSLog(@"WaitForMultipleObjects() error in "
|
int i;
|
||||||
@"-acceptInputForMode:beforeDate: '%s'",
|
BOOL found = NO;
|
||||||
|
|
||||||
|
NSDebugMLLog(@"NSRunLoop", @"WaitForMultipleObjects() error in "
|
||||||
|
@"-acceptInputForMode:beforeDate: %s",
|
||||||
GSLastErrorStr(GetLastError()));
|
GSLastErrorStr(GetLastError()));
|
||||||
abort ();
|
/*
|
||||||
|
* Check each handle in turn until either we find one which has an
|
||||||
|
* event signalled, or we find the one which caused the original
|
||||||
|
* wait to fail ... so the callback routine for that handle can
|
||||||
|
* deal with the problem.
|
||||||
|
*/
|
||||||
|
for (i = 0; i < num_handles; i++)
|
||||||
|
{
|
||||||
|
handleArray[0] = handleArray[i];
|
||||||
|
wait_return = WaitForMultipleObjects(1, handleArray, NO, 0);
|
||||||
|
if (wait_return != WAIT_TIMEOUT)
|
||||||
|
{
|
||||||
|
wait_return = WAIT_OBJECT_0;
|
||||||
|
found = YES;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (found == NO)
|
||||||
|
{
|
||||||
|
NSLog(@"WaitForMultipleObjects() error in "
|
||||||
|
@"-acceptInputForMode:beforeDate: %s",
|
||||||
|
GSLastErrorStr(GetLastError()));
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there arent events
|
// if there arent events
|
||||||
|
|
|
@ -211,7 +211,7 @@ int con_data (id prx)
|
||||||
printf(" got %x\n", small.z);
|
printf(" got %x\n", small.z);
|
||||||
[pool release];
|
[pool release];
|
||||||
|
|
||||||
#if !defined(__MINGW32__)
|
#if 1 || !defined(__MINGW32__)
|
||||||
pool = [NSAutoreleasePool new];
|
pool = [NSAutoreleasePool new];
|
||||||
printf("Struct:\n");
|
printf("Struct:\n");
|
||||||
printf(" sending c='%c',d=%g,i=%d,s=%s,l=%ld",
|
printf(" sending c='%c',d=%g,i=%d,s=%s,l=%ld",
|
||||||
|
|
Loading…
Reference in a new issue