mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 17:10:48 +00:00
More sized type tidyups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22293 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bb1ce663a4
commit
8699af99c7
16 changed files with 2889 additions and 1538 deletions
|
@ -18,9 +18,11 @@
|
|||
* Source/win32/GSFileHandleWin32.m:
|
||||
* Source/win32/NSMessagePortWin32.m:
|
||||
Update to use sized datatypes from stdint.h now that almost all
|
||||
operating systems support it. Changes not complete yet though.
|
||||
operating systems support it.
|
||||
* Source/NSCalendarDate.m:
|
||||
Support '%T' and '%t' as supplied by unix date/time locale info.
|
||||
* configure.ac: Ensure uintptr_t and intptr_t exist
|
||||
* configure: regenerate
|
||||
|
||||
2006-01-10 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -128,7 +128,9 @@ typedef @GS_FLT64@ gsf64;
|
|||
/*
|
||||
* Integer type with same size as a pointer
|
||||
*/
|
||||
typedef @GS_ADDR@ gsaddr;
|
||||
typedef @GS_UADDR@ gsuaddr;
|
||||
typedef @GS_SADDR@ gssaddr;
|
||||
typedef gsuaddr gsaddr;
|
||||
|
||||
/*
|
||||
* Do we have real 64-bit and 128-bit integers or are we just pretending.
|
||||
|
@ -157,8 +159,8 @@ typedef @GS_ADDR@ gsaddr;
|
|||
#define GS_WITH_GC 0
|
||||
#endif
|
||||
#if GS_WITH_GC
|
||||
#define GS_GC_HIDE(obj) ((id)(((gsaddr)obj) | 1))
|
||||
#define GS_GC_UNHIDE(obj) ((id)(((gsaddr)obj) & ~1))
|
||||
#define GS_GC_HIDE(obj) ((id)(((uintptr_t)obj) | 1))
|
||||
#define GS_GC_UNHIDE(obj) ((id)(((uintptr_t)obj) & ~1))
|
||||
#else
|
||||
#define GS_GC_HIDE(obj) ((id)obj)
|
||||
#define GS_GC_UNHIDE(obj) ((id)obj)
|
||||
|
@ -181,6 +183,8 @@ typedef @GS_ADDR@ gsaddr;
|
|||
@DEFINE_UINT32_T@
|
||||
@DEFINE_INT64_T@
|
||||
@DEFINE_UINT64_T@
|
||||
@DEFINE_INTPTR_T@
|
||||
@DEFINE_UINTPTR_T@
|
||||
|
||||
/*
|
||||
* Wide unicode character type.
|
||||
|
|
|
@ -1138,12 +1138,12 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
|
||||
- (id) initWithNativeHandle: (void*)hdl
|
||||
{
|
||||
return [self initWithFileDescriptor: (gsaddr)hdl closeOnDealloc: NO];
|
||||
return [self initWithFileDescriptor: (uintptr_t)hdl closeOnDealloc: NO];
|
||||
}
|
||||
|
||||
- (id) initWithNativeHandle: (void*)hdl closeOnDealloc: (BOOL)flag
|
||||
{
|
||||
return [self initWithFileDescriptor: (gsaddr)hdl closeOnDealloc: flag];
|
||||
return [self initWithFileDescriptor: (uintptr_t)hdl closeOnDealloc: flag];
|
||||
}
|
||||
|
||||
- (void) checkAccept
|
||||
|
@ -1752,7 +1752,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
|
||||
for (i = 0; i < [modes count]; i++)
|
||||
{
|
||||
[l removeEvent: (void*)(gsaddr)descriptor
|
||||
[l removeEvent: (void*)(uintptr_t)descriptor
|
||||
type: ET_RDESC
|
||||
forMode: [modes objectAtIndex: i]
|
||||
all: YES];
|
||||
|
@ -1760,7 +1760,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
}
|
||||
else
|
||||
{
|
||||
[l removeEvent: (void*)(gsaddr)descriptor
|
||||
[l removeEvent: (void*)(uintptr_t)descriptor
|
||||
type: ET_RDESC
|
||||
forMode: NSDefaultRunLoopMode
|
||||
all: YES];
|
||||
|
@ -1792,7 +1792,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
|
||||
for (i = 0; i < [modes count]; i++)
|
||||
{
|
||||
[l removeEvent: (void*)(gsaddr)descriptor
|
||||
[l removeEvent: (void*)(uintptr_t)descriptor
|
||||
type: ET_WDESC
|
||||
forMode: [modes objectAtIndex: i]
|
||||
all: YES];
|
||||
|
@ -1800,7 +1800,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
}
|
||||
else
|
||||
{
|
||||
[l removeEvent: (void*)(gsaddr)descriptor
|
||||
[l removeEvent: (void*)(uintptr_t)descriptor
|
||||
type: ET_WDESC
|
||||
forMode: NSDefaultRunLoopMode
|
||||
all: YES];
|
||||
|
@ -1824,7 +1824,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
|
||||
for (i = 0; i < [modes count]; i++)
|
||||
{
|
||||
[l addEvent: (void*)(gsaddr)descriptor
|
||||
[l addEvent: (void*)(uintptr_t)descriptor
|
||||
type: ET_RDESC
|
||||
watcher: self
|
||||
forMode: [modes objectAtIndex: i]];
|
||||
|
@ -1833,7 +1833,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
}
|
||||
else
|
||||
{
|
||||
[l addEvent: (void*)(gsaddr)descriptor
|
||||
[l addEvent: (void*)(uintptr_t)descriptor
|
||||
type: ET_RDESC
|
||||
watcher: self
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
|
@ -1861,7 +1861,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
|
||||
for (i = 0; i < [modes count]; i++)
|
||||
{
|
||||
[l addEvent: (void*)(gsaddr)descriptor
|
||||
[l addEvent: (void*)(uintptr_t)descriptor
|
||||
type: ET_WDESC
|
||||
watcher: self
|
||||
forMode: [modes objectAtIndex: i]];
|
||||
|
@ -1869,7 +1869,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
}
|
||||
else
|
||||
{
|
||||
[l addEvent: (void*)(gsaddr)descriptor
|
||||
[l addEvent: (void*)(uintptr_t)descriptor
|
||||
type: ET_WDESC
|
||||
watcher: self
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
|
|
|
@ -192,7 +192,7 @@
|
|||
hash += val.c[i];
|
||||
return hash;
|
||||
#elif TYPE_ORDER == 2
|
||||
return (unsigned)(gsaddr)data;
|
||||
return (unsigned)(uintptr_t)data;
|
||||
#elif TYPE_ORDER == 3
|
||||
return (data.length ^ data.location);
|
||||
#elif TYPE_ORDER == 4
|
||||
|
|
|
@ -273,7 +273,7 @@ rootObjectForInPort(NSPort *aPort)
|
|||
id rootObject;
|
||||
|
||||
F_LOCK(root_object_map_gate);
|
||||
rootObject = (id)NSMapGet(root_object_map, (void*)(gsaddr)aPort);
|
||||
rootObject = (id)NSMapGet(root_object_map, (void*)(uintptr_t)aPort);
|
||||
F_UNLOCK(root_object_map_gate);
|
||||
return rootObject;
|
||||
}
|
||||
|
@ -285,17 +285,17 @@ setRootObjectForInPort(id anObj, NSPort *aPort)
|
|||
id oldRootObject;
|
||||
|
||||
F_LOCK(root_object_map_gate);
|
||||
oldRootObject = (id)NSMapGet(root_object_map, (void*)(gsaddr)aPort);
|
||||
oldRootObject = (id)NSMapGet(root_object_map, (void*)(uintptr_t)aPort);
|
||||
if (oldRootObject != anObj)
|
||||
{
|
||||
if (anObj != nil)
|
||||
{
|
||||
NSMapInsert(root_object_map, (void*)(gsaddr)aPort,
|
||||
(void*)(gsaddr)anObj);
|
||||
NSMapInsert(root_object_map, (void*)(uintptr_t)aPort,
|
||||
(void*)(uintptr_t)anObj);
|
||||
}
|
||||
else /* anObj == nil && oldRootObject != nil */
|
||||
{
|
||||
NSMapRemove(root_object_map, (void*)(gsaddr)aPort);
|
||||
NSMapRemove(root_object_map, (void*)(uintptr_t)aPort);
|
||||
}
|
||||
}
|
||||
F_UNLOCK(root_object_map_gate);
|
||||
|
@ -699,7 +699,7 @@ static NSLock *cached_proxies_gate = nil;
|
|||
- (NSString*) description
|
||||
{
|
||||
return [NSString stringWithFormat: @"%@ recv: 0x%x send 0x%x",
|
||||
[super description], (gsaddr)[self receivePort], (gsaddr)[self sendPort]];
|
||||
[super description], (uintptr_t)[self receivePort], (uintptr_t)[self sendPort]];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1888,7 +1888,7 @@ static void retEncoder (DOContext *ctxt)
|
|||
[self _sendOutRmc: ctxt.encoder type: METHOD_REQUEST];
|
||||
ctxt.encoder = nil;
|
||||
NSDebugMLLog(@"NSConnection", @"Sent message (%s) to 0x%x",
|
||||
GSNameFromSelector(sel), (gsaddr)self);
|
||||
GSNameFromSelector(sel), (uintptr_t)self);
|
||||
|
||||
if (needsResponse == NO)
|
||||
{
|
||||
|
@ -2013,7 +2013,7 @@ static void retEncoder (DOContext *ctxt)
|
|||
}
|
||||
|
||||
[self _sendOutRmc: op type: METHOD_REQUEST];
|
||||
NSDebugMLLog(@"NSConnection", @"Sent message to 0x%x", (gsaddr)self);
|
||||
NSDebugMLLog(@"NSConnection", @"Sent message to 0x%x", (uintptr_t)self);
|
||||
|
||||
if (needsResponse == NO)
|
||||
{
|
||||
|
@ -2439,7 +2439,7 @@ static void callEncoder (DOContext *ctxt)
|
|||
|
||||
if (debug_connection > 1)
|
||||
{
|
||||
NSLog(@"Handling message from %@", (gsaddr)self);
|
||||
NSLog(@"Handling message from %@", (uintptr_t)self);
|
||||
}
|
||||
_reqInCount++; /* Handling an incoming request. */
|
||||
|
||||
|
@ -3113,7 +3113,7 @@ static void callEncoder (DOContext *ctxt)
|
|||
|
||||
if (debug_connection > 2)
|
||||
NSLog(@"add local object (0x%x) target (0x%x) "
|
||||
@"to connection (%@)", (gsaddr)object, target, self);
|
||||
@"to connection (%@)", (uintptr_t)object, target, self);
|
||||
|
||||
M_UNLOCK(_proxiesGate);
|
||||
}
|
||||
|
@ -3192,7 +3192,7 @@ static void callEncoder (DOContext *ctxt)
|
|||
RELEASE(item);
|
||||
if (debug_connection > 3)
|
||||
NSLog(@"placed local object (0x%x) target (0x%x) in cache",
|
||||
(gsaddr)anObj, target);
|
||||
(uintptr_t)anObj, target);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3208,7 +3208,7 @@ static void callEncoder (DOContext *ctxt)
|
|||
|
||||
if (debug_connection > 2)
|
||||
NSLog(@"removed local object (0x%x) target (0x%x) "
|
||||
@"from connection (%@) (ref %d)", (gsaddr)anObj, target, self, val);
|
||||
@"from connection (%@) (ref %d)", (uintptr_t)anObj, target, self, val);
|
||||
}
|
||||
M_UNLOCK(_proxiesGate);
|
||||
}
|
||||
|
|
|
@ -198,7 +198,7 @@ enum proxyLocation
|
|||
|
||||
if (debug_proxy)
|
||||
NSLog(@"Receiving a proxy for local object 0x%x "
|
||||
@"connection 0x%x\n", target, (gsaddr)decoder_connection);
|
||||
@"connection 0x%x\n", target, (uintptr_t)decoder_connection);
|
||||
|
||||
o = [decoder_connection locateLocalTarget: target];
|
||||
if (o == nil)
|
||||
|
@ -212,7 +212,7 @@ enum proxyLocation
|
|||
if (debug_proxy)
|
||||
{
|
||||
NSLog(@"Local object is 0x%x (0x%x)\n",
|
||||
(gsaddr)o, (gsaddr)o ? ((NSDO*)o)->_object : 0);
|
||||
(uintptr_t)o, (uintptr_t)o ? ((NSDO*)o)->_object : 0);
|
||||
}
|
||||
return RETAIN(((NSDO*)o)->_object);
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ enum proxyLocation
|
|||
at: &target];
|
||||
if (debug_proxy)
|
||||
NSLog(@"Receiving a proxy, was local 0x%x connection 0x%x\n",
|
||||
target, (gsaddr)decoder_connection);
|
||||
target, (uintptr_t)decoder_connection);
|
||||
o = [self initWithTarget: target
|
||||
connection: decoder_connection];
|
||||
return o;
|
||||
|
@ -296,7 +296,7 @@ enum proxyLocation
|
|||
|
||||
if (debug_proxy)
|
||||
NSLog(@"Receiving a triangle-connection proxy 0x%x "
|
||||
@"connection 0x%x\n", target, (gsaddr)proxy_connection);
|
||||
@"connection 0x%x\n", target, (uintptr_t)proxy_connection);
|
||||
|
||||
NSAssert(proxy_connection != decoder_connection,
|
||||
NSInternalInconsistencyException);
|
||||
|
@ -478,7 +478,7 @@ enum proxyLocation
|
|||
|
||||
if (debug_proxy)
|
||||
NSLog(@"Sending a proxy, will be remote 0x%x connection 0x%x\n",
|
||||
proxy_target, (gsaddr)_connection);
|
||||
proxy_target, (uintptr_t)_connection);
|
||||
|
||||
[aRmc encodeValueOfObjCType: @encode(typeof(proxy_tag))
|
||||
at: &proxy_tag];
|
||||
|
@ -499,7 +499,7 @@ enum proxyLocation
|
|||
|
||||
if (debug_proxy)
|
||||
NSLog(@"Sending a proxy, will be local 0x%x connection 0x%x\n",
|
||||
proxy_target, (gsaddr)_connection);
|
||||
proxy_target, (uintptr_t)_connection);
|
||||
|
||||
[aRmc encodeValueOfObjCType: @encode(typeof(proxy_tag))
|
||||
at: &proxy_tag];
|
||||
|
@ -537,8 +537,8 @@ enum proxyLocation
|
|||
if (debug_proxy)
|
||||
NSLog(@"Sending triangle-connection proxy 0x%x "
|
||||
@"proxy-conn 0x%x to-proxy 0x%x to-conn 0x%x\n",
|
||||
localProxy->_handle, (gsaddr)localProxy->_connection,
|
||||
proxy_target, (gsaddr)_connection);
|
||||
localProxy->_handle, (uintptr_t)localProxy->_connection,
|
||||
proxy_target, (uintptr_t)_connection);
|
||||
|
||||
/*
|
||||
* It's remote here, so we need to tell other side where to form
|
||||
|
@ -603,7 +603,7 @@ enum proxyLocation
|
|||
|
||||
if (debug_proxy)
|
||||
NSLog(@"Created new local=0x%x object 0x%x target 0x%x connection 0x%x\n",
|
||||
(gsaddr)self, (gsaddr)_object, _handle, (gsaddr)_connection);
|
||||
(uintptr_t)self, (uintptr_t)_object, _handle, (uintptr_t)_connection);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
@ -629,7 +629,7 @@ enum proxyLocation
|
|||
|
||||
if (debug_proxy)
|
||||
NSLog(@"Created new proxy=0x%x target 0x%x connection 0x%x\n",
|
||||
(gsaddr)self, _handle, (gsaddr)_connection);
|
||||
(uintptr_t)self, _handle, (uintptr_t)_connection);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
@ -824,7 +824,7 @@ enum proxyLocation
|
|||
{
|
||||
if (debug_proxy > 3)
|
||||
NSLog(@"retain count for connection (0x%x) is now %u\n",
|
||||
(gsaddr)_connection, [_connection retainCount]);
|
||||
(uintptr_t)_connection, [_connection retainCount]);
|
||||
/*
|
||||
* A proxy for local object retains its target - so we release it.
|
||||
* For a local object the connection also retains this proxy, so we
|
||||
|
|
|
@ -392,19 +392,19 @@ static Class runLoopClass;
|
|||
|
||||
state = GS_H_TRYCON;
|
||||
l = [NSRunLoop currentRunLoop];
|
||||
[l addEvent: (void*)(gsaddr)desc
|
||||
[l addEvent: (void*)(uintptr_t)desc
|
||||
type: ET_WDESC
|
||||
watcher: self
|
||||
forMode: NSConnectionReplyMode];
|
||||
[l addEvent: (void*)(gsaddr)desc
|
||||
[l addEvent: (void*)(uintptr_t)desc
|
||||
type: ET_EDESC
|
||||
watcher: self
|
||||
forMode: NSConnectionReplyMode];
|
||||
[l addEvent: (void*)(gsaddr)desc
|
||||
[l addEvent: (void*)(uintptr_t)desc
|
||||
type: ET_WDESC
|
||||
watcher: self
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
[l addEvent: (void*)(gsaddr)desc
|
||||
[l addEvent: (void*)(uintptr_t)desc
|
||||
type: ET_EDESC
|
||||
watcher: self
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
|
@ -415,19 +415,19 @@ static Class runLoopClass;
|
|||
[l runMode: NSConnectionReplyMode beforeDate: when];
|
||||
}
|
||||
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_WDESC
|
||||
forMode: NSConnectionReplyMode
|
||||
all: NO];
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_EDESC
|
||||
forMode: NSConnectionReplyMode
|
||||
all: NO];
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_WDESC
|
||||
forMode: NSDefaultRunLoopMode
|
||||
all: NO];
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_EDESC
|
||||
forMode: NSDefaultRunLoopMode
|
||||
all: NO];
|
||||
|
@ -499,15 +499,15 @@ static Class runLoopClass;
|
|||
|
||||
valid = NO;
|
||||
l = [runLoopClass currentRunLoop];
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_RDESC
|
||||
forMode: nil
|
||||
all: YES];
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_WDESC
|
||||
forMode: nil
|
||||
all: YES];
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_EDESC
|
||||
forMode: nil
|
||||
all: YES];
|
||||
|
@ -1023,19 +1023,19 @@ static Class runLoopClass;
|
|||
|
||||
RETAIN(self);
|
||||
|
||||
[l addEvent: (void*)(gsaddr)desc
|
||||
[l addEvent: (void*)(uintptr_t)desc
|
||||
type: ET_WDESC
|
||||
watcher: self
|
||||
forMode: NSConnectionReplyMode];
|
||||
[l addEvent: (void*)(gsaddr)desc
|
||||
[l addEvent: (void*)(uintptr_t)desc
|
||||
type: ET_EDESC
|
||||
watcher: self
|
||||
forMode: NSConnectionReplyMode];
|
||||
[l addEvent: (void*)(gsaddr)desc
|
||||
[l addEvent: (void*)(uintptr_t)desc
|
||||
type: ET_WDESC
|
||||
watcher: self
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
[l addEvent: (void*)(gsaddr)desc
|
||||
[l addEvent: (void*)(uintptr_t)desc
|
||||
type: ET_EDESC
|
||||
watcher: self
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
|
@ -1049,19 +1049,19 @@ static Class runLoopClass;
|
|||
M_LOCK(myLock);
|
||||
}
|
||||
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_WDESC
|
||||
forMode: NSConnectionReplyMode
|
||||
all: NO];
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_EDESC
|
||||
forMode: NSConnectionReplyMode
|
||||
all: NO];
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_WDESC
|
||||
forMode: NSDefaultRunLoopMode
|
||||
all: NO];
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_EDESC
|
||||
forMode: NSDefaultRunLoopMode
|
||||
all: NO];
|
||||
|
@ -1365,7 +1365,7 @@ typedef struct {
|
|||
{
|
||||
handle->recvPort = GS_GC_HIDE(self);
|
||||
}
|
||||
NSMapInsert(handles, (void*)(gsaddr)[handle descriptor], (void*)handle);
|
||||
NSMapInsert(handles, (void*)(uintptr_t)[handle descriptor], (void*)handle);
|
||||
M_UNLOCK(myLock);
|
||||
}
|
||||
|
||||
|
@ -1644,7 +1644,7 @@ typedef struct {
|
|||
extra: (void*)extra
|
||||
forMode: (NSString*)mode
|
||||
{
|
||||
int desc = (int)(gsaddr)extra;
|
||||
int desc = (int)(uintptr_t)extra;
|
||||
GSMessageHandle *handle;
|
||||
|
||||
if (desc == lDesc)
|
||||
|
@ -1679,7 +1679,7 @@ typedef struct {
|
|||
else
|
||||
{
|
||||
M_LOCK(myLock);
|
||||
handle = (GSMessageHandle*)NSMapGet(handles, (void*)(gsaddr)desc);
|
||||
handle = (GSMessageHandle*)NSMapGet(handles, (void*)(uintptr_t)desc);
|
||||
IF_NO_GC(AUTORELEASE(RETAIN(handle)));
|
||||
M_UNLOCK(myLock);
|
||||
if (handle == nil)
|
||||
|
@ -1726,7 +1726,7 @@ typedef struct {
|
|||
{
|
||||
handle->recvPort = nil;
|
||||
}
|
||||
NSMapRemove(handles, (void*)(gsaddr)[handle descriptor]);
|
||||
NSMapRemove(handles, (void*)(uintptr_t)[handle descriptor]);
|
||||
if (lDesc < 0 && NSCountMapTable(handles) == 0)
|
||||
{
|
||||
[self invalidate];
|
||||
|
|
|
@ -152,9 +152,9 @@ static inline unsigned doHash(NSString* key)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
else if (((gsaddr)key) & 1)
|
||||
else if (((uintptr_t)key) & 1)
|
||||
{
|
||||
return (unsigned)(gsaddr)key;
|
||||
return (unsigned)(uintptr_t)key;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -168,7 +168,7 @@ static inline BOOL doEqual(NSString* key1, NSString* key2)
|
|||
{
|
||||
return YES;
|
||||
}
|
||||
else if ((((gsaddr)key1) & 1) || key1 == nil)
|
||||
else if ((((uintptr_t)key1) & 1) || key1 == nil)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ static void obsFree(Observation *o);
|
|||
#include "GNUstepBase/GSIArray.h"
|
||||
|
||||
#define GSI_MAP_RETAIN_KEY(M, X)
|
||||
#define GSI_MAP_RELEASE_KEY(M, X) ({if ((((gsaddr)X.obj) & 1) == 0) \
|
||||
#define GSI_MAP_RELEASE_KEY(M, X) ({if ((((uintptr_t)X.obj) & 1) == 0) \
|
||||
RELEASE(X.obj);})
|
||||
#define GSI_MAP_HASH(M, X) doHash(X.obj)
|
||||
#define GSI_MAP_EQUAL(M, X,Y) doEqual(X.obj, Y.obj)
|
||||
|
@ -535,7 +535,7 @@ purgeMapNode(GSIMapTable map, GSIMapNode node, id observer)
|
|||
* should be treated as objects (notification names) and thise that
|
||||
* should be treated as pointers (notification objects)
|
||||
*/
|
||||
#define CHEATGC(X) (id)(((gsaddr)X) | 1)
|
||||
#define CHEATGC(X) (id)(((uintptr_t)X) | 1)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -569,29 +569,29 @@ static Class runLoopClass;
|
|||
l = [NSRunLoop currentRunLoop];
|
||||
#if defined(__MINGW32__)
|
||||
NSAssert(event != WSA_INVALID_EVENT, @"Socket without win32 event!");
|
||||
[l addEvent: (void*)(gsaddr)event
|
||||
[l addEvent: (void*)(uintptr_t)event
|
||||
type: ET_HANDLE
|
||||
watcher: self
|
||||
forMode: NSConnectionReplyMode];
|
||||
[l addEvent: (void*)(gsaddr)event
|
||||
[l addEvent: (void*)(uintptr_t)event
|
||||
type: ET_HANDLE
|
||||
watcher: self
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
inReplyMode = YES;
|
||||
#else
|
||||
[l addEvent: (void*)(gsaddr)desc
|
||||
[l addEvent: (void*)(uintptr_t)desc
|
||||
type: ET_WDESC
|
||||
watcher: self
|
||||
forMode: NSConnectionReplyMode];
|
||||
[l addEvent: (void*)(gsaddr)desc
|
||||
[l addEvent: (void*)(uintptr_t)desc
|
||||
type: ET_EDESC
|
||||
watcher: self
|
||||
forMode: NSConnectionReplyMode];
|
||||
[l addEvent: (void*)(gsaddr)desc
|
||||
[l addEvent: (void*)(uintptr_t)desc
|
||||
type: ET_WDESC
|
||||
watcher: self
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
[l addEvent: (void*)(gsaddr)desc
|
||||
[l addEvent: (void*)(uintptr_t)desc
|
||||
type: ET_EDESC
|
||||
watcher: self
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
|
@ -606,29 +606,29 @@ static Class runLoopClass;
|
|||
}
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
[l removeEvent: (void*)(gsaddr)event
|
||||
[l removeEvent: (void*)(uintptr_t)event
|
||||
type: ET_HANDLE
|
||||
forMode: NSConnectionReplyMode
|
||||
all: NO];
|
||||
[l removeEvent: (void*)(gsaddr)event
|
||||
[l removeEvent: (void*)(uintptr_t)event
|
||||
type: ET_HANDLE
|
||||
forMode: NSDefaultRunLoopMode
|
||||
all: NO];
|
||||
inReplyMode = NO;
|
||||
#else
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_WDESC
|
||||
forMode: NSConnectionReplyMode
|
||||
all: NO];
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_EDESC
|
||||
forMode: NSConnectionReplyMode
|
||||
all: NO];
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_WDESC
|
||||
forMode: NSDefaultRunLoopMode
|
||||
all: NO];
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_EDESC
|
||||
forMode: NSDefaultRunLoopMode
|
||||
all: NO];
|
||||
|
@ -722,20 +722,20 @@ static Class runLoopClass;
|
|||
valid = NO;
|
||||
l = [runLoopClass currentRunLoop];
|
||||
#if defined(__MINGW32__)
|
||||
[l removeEvent: (void*)(gsaddr)event
|
||||
[l removeEvent: (void*)(uintptr_t)event
|
||||
type: ET_HANDLE
|
||||
forMode: nil
|
||||
all: YES];
|
||||
#else
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_RDESC
|
||||
forMode: nil
|
||||
all: YES];
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_WDESC
|
||||
forMode: nil
|
||||
all: YES];
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_EDESC
|
||||
forMode: nil
|
||||
all: YES];
|
||||
|
@ -1353,29 +1353,29 @@ static Class runLoopClass;
|
|||
|
||||
#if defined(__MINGW32__)
|
||||
NSAssert(event != WSA_INVALID_EVENT, @"Socket without win32 event!");
|
||||
[l addEvent: (void*)(gsaddr)event
|
||||
[l addEvent: (void*)(uintptr_t)event
|
||||
type: ET_HANDLE
|
||||
watcher: self
|
||||
forMode: NSConnectionReplyMode];
|
||||
[l addEvent: (void*)(gsaddr)event
|
||||
[l addEvent: (void*)(uintptr_t)event
|
||||
type: ET_HANDLE
|
||||
watcher: self
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
inReplyMode = YES;
|
||||
#else
|
||||
[l addEvent: (void*)(gsaddr)desc
|
||||
[l addEvent: (void*)(uintptr_t)desc
|
||||
type: ET_WDESC
|
||||
watcher: self
|
||||
forMode: NSConnectionReplyMode];
|
||||
[l addEvent: (void*)(gsaddr)desc
|
||||
[l addEvent: (void*)(uintptr_t)desc
|
||||
type: ET_EDESC
|
||||
watcher: self
|
||||
forMode: NSConnectionReplyMode];
|
||||
[l addEvent: (void*)(gsaddr)desc
|
||||
[l addEvent: (void*)(uintptr_t)desc
|
||||
type: ET_WDESC
|
||||
watcher: self
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
[l addEvent: (void*)(gsaddr)desc
|
||||
[l addEvent: (void*)(uintptr_t)desc
|
||||
type: ET_EDESC
|
||||
watcher: self
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
|
@ -1402,29 +1402,29 @@ static Class runLoopClass;
|
|||
}
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
[l removeEvent: (void*)(gsaddr)event
|
||||
[l removeEvent: (void*)(uintptr_t)event
|
||||
type: ET_HANDLE
|
||||
forMode: NSConnectionReplyMode
|
||||
all: NO];
|
||||
[l removeEvent: (void*)(gsaddr)event
|
||||
[l removeEvent: (void*)(uintptr_t)event
|
||||
type: ET_HANDLE
|
||||
forMode: NSDefaultRunLoopMode
|
||||
all: NO];
|
||||
inReplyMode = NO;
|
||||
#else
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_WDESC
|
||||
forMode: NSConnectionReplyMode
|
||||
all: NO];
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_EDESC
|
||||
forMode: NSConnectionReplyMode
|
||||
all: NO];
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_WDESC
|
||||
forMode: NSDefaultRunLoopMode
|
||||
all: NO];
|
||||
[l removeEvent: (void*)(gsaddr)desc
|
||||
[l removeEvent: (void*)(uintptr_t)desc
|
||||
type: ET_EDESC
|
||||
forMode: NSDefaultRunLoopMode
|
||||
all: NO];
|
||||
|
@ -1522,7 +1522,7 @@ static Class tcpPortClass;
|
|||
/*
|
||||
* Get the map table of ports with the specified number.
|
||||
*/
|
||||
thePorts = (NSMapTable*)NSMapGet(tcpPortMap, (void*)(gsaddr)number);
|
||||
thePorts = (NSMapTable*)NSMapGet(tcpPortMap, (void*)(uintptr_t)number);
|
||||
if (thePorts != 0)
|
||||
{
|
||||
port = (NSSocketPort*)NSMapGet(thePorts, (void*)aHost);
|
||||
|
@ -1578,7 +1578,7 @@ static Class tcpPortClass;
|
|||
/*
|
||||
* First try to find a pre-existing port.
|
||||
*/
|
||||
thePorts = (NSMapTable*)NSMapGet(tcpPortMap, (void*)(gsaddr)number);
|
||||
thePorts = (NSMapTable*)NSMapGet(tcpPortMap, (void*)(uintptr_t)number);
|
||||
if (thePorts != 0)
|
||||
{
|
||||
port = (NSSocketPort*)NSMapGet(thePorts, (void*)aHost);
|
||||
|
@ -1712,7 +1712,7 @@ static Class tcpPortClass;
|
|||
* Make sure we have the map table for this port.
|
||||
*/
|
||||
thePorts = (NSMapTable*)NSMapGet(tcpPortMap,
|
||||
(void*)(gsaddr)port->portNum);
|
||||
(void*)(uintptr_t)port->portNum);
|
||||
if (thePorts == 0)
|
||||
{
|
||||
/*
|
||||
|
@ -1721,7 +1721,7 @@ static Class tcpPortClass;
|
|||
*/
|
||||
thePorts = NSCreateMapTable(NSObjectMapKeyCallBacks,
|
||||
NSNonOwnedPointerMapValueCallBacks, 0);
|
||||
NSMapInsert(tcpPortMap, (void*)(gsaddr)port->portNum,
|
||||
NSMapInsert(tcpPortMap, (void*)(uintptr_t)port->portNum,
|
||||
(void*)thePorts);
|
||||
}
|
||||
/*
|
||||
|
@ -1737,7 +1737,7 @@ static Class tcpPortClass;
|
|||
* Make sure we have the map table for this port.
|
||||
*/
|
||||
port->portNum = number;
|
||||
thePorts = (NSMapTable*)NSMapGet(tcpPortMap, (void*)(gsaddr)number);
|
||||
thePorts = (NSMapTable*)NSMapGet(tcpPortMap, (void*)(uintptr_t)number);
|
||||
if (thePorts == 0)
|
||||
{
|
||||
/*
|
||||
|
@ -1746,7 +1746,7 @@ static Class tcpPortClass;
|
|||
*/
|
||||
thePorts = NSCreateMapTable(NSIntMapKeyCallBacks,
|
||||
NSNonOwnedPointerMapValueCallBacks, 0);
|
||||
NSMapInsert(tcpPortMap, (void*)(gsaddr)number, (void*)thePorts);
|
||||
NSMapInsert(tcpPortMap, (void*)(uintptr_t)number, (void*)thePorts);
|
||||
}
|
||||
/*
|
||||
* Record the port by host.
|
||||
|
@ -1780,10 +1780,10 @@ static Class tcpPortClass;
|
|||
{
|
||||
handle->recvPort = GS_GC_HIDE(self);
|
||||
}
|
||||
NSMapInsert(handles, (void*)(gsaddr)[handle descriptor], (void*)handle);
|
||||
NSMapInsert(handles, (void*)(uintptr_t)[handle descriptor], (void*)handle);
|
||||
#if defined(__MINGW32__)
|
||||
NSMapInsert(events, (void*)(gsaddr)[handle eventHandle],
|
||||
(void*)(gsaddr)[handle descriptor]);
|
||||
NSMapInsert(events, (void*)(uintptr_t)[handle eventHandle],
|
||||
(void*)(uintptr_t)[handle descriptor]);
|
||||
#endif
|
||||
M_UNLOCK(myLock);
|
||||
}
|
||||
|
@ -1857,7 +1857,7 @@ static Class tcpPortClass;
|
|||
*count = 0;
|
||||
if (eventListener != WSA_INVALID_EVENT)
|
||||
{
|
||||
fds[(*count)++] = (gsaddr)eventListener;
|
||||
fds[(*count)++] = (uintptr_t)eventListener;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1868,10 +1868,10 @@ static Class tcpPortClass;
|
|||
me = NSEnumerateMapTable(events);
|
||||
while (NSNextMapEnumeratorPair(&me, &event, (void**)&fd))
|
||||
{
|
||||
handle = (GSTcpHandle*)NSMapGet(handles, (void*)(gsaddr)fd);
|
||||
handle = (GSTcpHandle*)NSMapGet(handles, (void*)(uintptr_t)fd);
|
||||
if (handle->recvPort == recvSelf && handle->inReplyMode == NO)
|
||||
{
|
||||
fds[(*count)++] = (gsaddr)event;
|
||||
fds[(*count)++] = (uintptr_t)event;
|
||||
}
|
||||
}
|
||||
NSEndMapTableEnumeration(&me);
|
||||
|
@ -2066,7 +2066,7 @@ static Class tcpPortClass;
|
|||
unsigned i;
|
||||
|
||||
M_LOCK(tcpPortLock);
|
||||
thePorts = NSMapGet(tcpPortMap, (void*)(gsaddr)portNum);
|
||||
thePorts = NSMapGet(tcpPortMap, (void*)(uintptr_t)portNum);
|
||||
if (thePorts != 0)
|
||||
{
|
||||
if (listener >= 0)
|
||||
|
@ -2148,7 +2148,7 @@ static Class tcpPortClass;
|
|||
WSAEVENT event = (WSAEVENT)extra;
|
||||
SOCKET desc;
|
||||
#else
|
||||
SOCKET desc = (SOCKET)(gsaddr)extra;
|
||||
SOCKET desc = (SOCKET)(uintptr_t)extra;
|
||||
#endif
|
||||
GSTcpHandle *handle;
|
||||
|
||||
|
@ -2197,9 +2197,9 @@ static Class tcpPortClass;
|
|||
{
|
||||
M_LOCK(myLock);
|
||||
#if defined(__MINGW32__)
|
||||
desc = (SOCKET)NSMapGet(events, (void*)(gsaddr)event);
|
||||
desc = (SOCKET)NSMapGet(events, (void*)(uintptr_t)event);
|
||||
#endif
|
||||
handle = (GSTcpHandle*)NSMapGet(handles, (void*)(gsaddr)desc);
|
||||
handle = (GSTcpHandle*)NSMapGet(handles, (void*)(uintptr_t)desc);
|
||||
IF_NO_GC(AUTORELEASE(RETAIN(handle)));
|
||||
M_UNLOCK(myLock);
|
||||
if (handle == nil)
|
||||
|
@ -2255,9 +2255,9 @@ static Class tcpPortClass;
|
|||
{
|
||||
handle->recvPort = nil;
|
||||
}
|
||||
NSMapRemove(handles, (void*)(gsaddr)[handle descriptor]);
|
||||
NSMapRemove(handles, (void*)(uintptr_t)[handle descriptor]);
|
||||
#if defined(__MINGW32__)
|
||||
NSMapRemove(events, (void*)(gsaddr)[handle eventHandle]);
|
||||
NSMapRemove(events, (void*)(uintptr_t)[handle eventHandle]);
|
||||
#endif
|
||||
if (((int) listener) < 0 && NSCountMapTable(handles) == 0)
|
||||
{
|
||||
|
|
|
@ -568,7 +568,7 @@ static NSMapTable *absolutes = 0;
|
|||
{
|
||||
if (zone_mutex != nil)
|
||||
[zone_mutex lock];
|
||||
NSMapRemove(absolutes, (void*)(gsaddr)offset);
|
||||
NSMapRemove(absolutes, (void*)(uintptr_t)offset);
|
||||
if (zone_mutex != nil)
|
||||
[zone_mutex unlock];
|
||||
}
|
||||
|
@ -619,7 +619,7 @@ static NSMapTable *absolutes = 0;
|
|||
{
|
||||
[zone_mutex lock];
|
||||
}
|
||||
z = (GSAbsTimeZone*)NSMapGet(absolutes, (void*)(gsaddr)anOffset);
|
||||
z = (GSAbsTimeZone*)NSMapGet(absolutes, (void*)(uintptr_t)anOffset);
|
||||
if (z != nil)
|
||||
{
|
||||
IF_NO_GC(RETAIN(z));
|
||||
|
@ -650,7 +650,7 @@ static NSMapTable *absolutes = 0;
|
|||
detail = [[GSAbsTimeZoneDetail alloc] initWithTimeZone: self];
|
||||
offset = anOffset;
|
||||
z = self;
|
||||
NSMapInsert(absolutes, (void*)(gsaddr)anOffset, (void*)z);
|
||||
NSMapInsert(absolutes, (void*)(uintptr_t)anOffset, (void*)z);
|
||||
[zoneDictionary setObject: self forKey: (NSString*)name];
|
||||
}
|
||||
if (zone_mutex != nil)
|
||||
|
|
|
@ -441,7 +441,7 @@ static void setPollfd(int fd, int event, GSRunLoopCtxt *ctxt)
|
|||
*/
|
||||
(*watcher->handleEvent)(watcher->receiver,
|
||||
eventSel, watcher->data, watcher->type,
|
||||
(void*)(gsaddr)fd, mode);
|
||||
(void*)(uintptr_t)fd, mode);
|
||||
}
|
||||
GSNotifyASAP();
|
||||
if (completed == YES)
|
||||
|
@ -472,7 +472,7 @@ static void setPollfd(int fd, int event, GSRunLoopCtxt *ctxt)
|
|||
*/
|
||||
(*watcher->handleEvent)(watcher->receiver,
|
||||
eventSel, watcher->data, watcher->type,
|
||||
(void*)(gsaddr)fd, mode);
|
||||
(void*)(uintptr_t)fd, mode);
|
||||
}
|
||||
GSNotifyASAP();
|
||||
if (completed == YES)
|
||||
|
@ -503,7 +503,7 @@ static void setPollfd(int fd, int event, GSRunLoopCtxt *ctxt)
|
|||
*/
|
||||
(*watcher->handleEvent)(watcher->receiver,
|
||||
eventSel, watcher->data, watcher->type,
|
||||
(void*)(gsaddr)fd, mode);
|
||||
(void*)(uintptr_t)fd, mode);
|
||||
}
|
||||
GSNotifyASAP();
|
||||
if (completed == YES)
|
||||
|
@ -755,7 +755,7 @@ static void setPollfd(int fd, int event, GSRunLoopCtxt *ctxt)
|
|||
*/
|
||||
(*watcher->handleEvent)(watcher->receiver,
|
||||
eventSel, watcher->data, watcher->type,
|
||||
(void*)(gsaddr)fdIndex, mode);
|
||||
(void*)(uintptr_t)fdIndex, mode);
|
||||
}
|
||||
GSNotifyASAP();
|
||||
if (completed == YES)
|
||||
|
@ -784,7 +784,7 @@ static void setPollfd(int fd, int event, GSRunLoopCtxt *ctxt)
|
|||
*/
|
||||
(*watcher->handleEvent)(watcher->receiver,
|
||||
eventSel, watcher->data, watcher->type,
|
||||
(void*)(gsaddr)fdIndex, mode);
|
||||
(void*)(uintptr_t)fdIndex, mode);
|
||||
}
|
||||
GSNotifyASAP();
|
||||
if (completed == YES)
|
||||
|
@ -813,7 +813,7 @@ static void setPollfd(int fd, int event, GSRunLoopCtxt *ctxt)
|
|||
*/
|
||||
(*watcher->handleEvent)(watcher->receiver,
|
||||
eventSel, watcher->data, watcher->type,
|
||||
(void*)(gsaddr)fdIndex, mode);
|
||||
(void*)(uintptr_t)fdIndex, mode);
|
||||
}
|
||||
GSNotifyASAP();
|
||||
if (completed == YES)
|
||||
|
|
|
@ -1771,7 +1771,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
|
||||
for (i = 0; i < [modes count]; i++)
|
||||
{
|
||||
[l removeEvent: (void*)(gsaddr)event
|
||||
[l removeEvent: (void*)(uintptr_t)event
|
||||
type: ET_HANDLE
|
||||
forMode: [modes objectAtIndex: i]
|
||||
all: YES];
|
||||
|
@ -1779,7 +1779,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
}
|
||||
else
|
||||
{
|
||||
[l removeEvent: (void*)(gsaddr)event
|
||||
[l removeEvent: (void*)(uintptr_t)event
|
||||
type: ET_HANDLE
|
||||
forMode: NSDefaultRunLoopMode
|
||||
all: YES];
|
||||
|
@ -1811,7 +1811,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
|
||||
for (i = 0; i < [modes count]; i++)
|
||||
{
|
||||
[l removeEvent: (void*)(gsaddr)event
|
||||
[l removeEvent: (void*)(uintptr_t)event
|
||||
type: ET_HANDLE
|
||||
forMode: [modes objectAtIndex: i]
|
||||
all: YES];
|
||||
|
@ -1819,7 +1819,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
}
|
||||
else
|
||||
{
|
||||
[l removeEvent: (void*)(gsaddr)event
|
||||
[l removeEvent: (void*)(uintptr_t)event
|
||||
type: ET_HANDLE
|
||||
forMode: NSDefaultRunLoopMode
|
||||
all: YES];
|
||||
|
@ -1843,7 +1843,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
|
||||
for (i = 0; i < [modes count]; i++)
|
||||
{
|
||||
[l addEvent: (void*)(gsaddr)event
|
||||
[l addEvent: (void*)(uintptr_t)event
|
||||
type: ET_HANDLE
|
||||
watcher: self
|
||||
forMode: [modes objectAtIndex: i]];
|
||||
|
@ -1852,7 +1852,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
}
|
||||
else
|
||||
{
|
||||
[l addEvent: (void*)(gsaddr)event
|
||||
[l addEvent: (void*)(uintptr_t)event
|
||||
type: ET_HANDLE
|
||||
watcher: self
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
|
@ -1880,7 +1880,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
|
||||
for (i = 0; i < [modes count]; i++)
|
||||
{
|
||||
[l addEvent: (void*)(gsaddr)event
|
||||
[l addEvent: (void*)(uintptr_t)event
|
||||
type: ET_HANDLE
|
||||
watcher: self
|
||||
forMode: [modes objectAtIndex: i]];
|
||||
|
@ -1888,7 +1888,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
}
|
||||
else
|
||||
{
|
||||
[l addEvent: (void*)(gsaddr)event
|
||||
[l addEvent: (void*)(uintptr_t)event
|
||||
type: ET_HANDLE
|
||||
watcher: self
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
|
|
|
@ -195,7 +195,7 @@ static const NSMapTableValueCallBacks WatcherMapValueCallBacks =
|
|||
*/
|
||||
(*watcher->handleEvent)(watcher->receiver,
|
||||
eventSel, watcher->data, watcher->type,
|
||||
(void*)(gsaddr)&msg, mode);
|
||||
(void*)(uintptr_t)&msg, mode);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -233,7 +233,7 @@ static const NSMapTableValueCallBacks WatcherMapValueCallBacks =
|
|||
handled = YES;
|
||||
(*watcher->handleEvent)(watcher->receiver,
|
||||
eventSel, watcher->data, watcher->type,
|
||||
(void*)(gsaddr)&msg, mode);
|
||||
(void*)(uintptr_t)&msg, mode);
|
||||
}
|
||||
}
|
||||
num--;
|
||||
|
@ -444,7 +444,7 @@ static const NSMapTableValueCallBacks WatcherMapValueCallBacks =
|
|||
NSDebugMLLog(@"NSRunLoop", @"Event callback found");
|
||||
(*watcher->handleEvent)(watcher->receiver,
|
||||
eventSel, watcher->data, watcher->type,
|
||||
(void*)(gsaddr)handle, mode);
|
||||
(void*)(uintptr_t)handle, mode);
|
||||
}
|
||||
|
||||
GSNotifyASAP();
|
||||
|
|
|
@ -213,7 +213,7 @@ static Class messagePortClass = 0;
|
|||
self, aLoop, aMode);
|
||||
NSAssert(PORT(self)->rHandle != INVALID_HANDLE_VALUE,
|
||||
@"Attempt to listen on send port");
|
||||
[aLoop addEvent: (void*)(gsaddr)PORT(self)->rEvent
|
||||
[aLoop addEvent: (void*)(uintptr_t)PORT(self)->rEvent
|
||||
type: ET_HANDLE
|
||||
watcher: (id<RunLoopEvents>)self
|
||||
forMode: aMode];
|
||||
|
@ -910,7 +910,7 @@ again:
|
|||
{
|
||||
NSDebugMLLog(@"NSMessagePort", @"%@ remove from 0x%x in mode %@",
|
||||
self, aLoop, aMode);
|
||||
[aLoop removeEvent: (void*)(gsaddr)PORT(self)->rEvent
|
||||
[aLoop removeEvent: (void*)(uintptr_t)PORT(self)->rEvent
|
||||
type: ET_HANDLE
|
||||
forMode: aMode
|
||||
all: NO];
|
||||
|
@ -1059,11 +1059,11 @@ again:
|
|||
{
|
||||
NSRunLoop *loop = [NSRunLoop currentRunLoop];
|
||||
|
||||
[loop addEvent: (void*)(gsaddr)this->wEvent
|
||||
[loop addEvent: (void*)(uintptr_t)this->wEvent
|
||||
type: ET_HANDLE
|
||||
watcher: (id<RunLoopEvents>)self
|
||||
forMode: NSConnectionReplyMode];
|
||||
[loop addEvent: (void*)(gsaddr)this->wEvent
|
||||
[loop addEvent: (void*)(uintptr_t)this->wEvent
|
||||
type: ET_HANDLE
|
||||
watcher: (id<RunLoopEvents>)self
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
|
@ -1077,11 +1077,11 @@ again:
|
|||
M_LOCK(this->lock);
|
||||
}
|
||||
|
||||
[loop removeEvent: (void*)(gsaddr)this->wEvent
|
||||
[loop removeEvent: (void*)(uintptr_t)this->wEvent
|
||||
type: ET_HANDLE
|
||||
forMode: NSConnectionReplyMode
|
||||
all: NO];
|
||||
[loop removeEvent: (void*)(gsaddr)this->wEvent
|
||||
[loop removeEvent: (void*)(uintptr_t)this->wEvent
|
||||
type: ET_HANDLE
|
||||
forMode: NSDefaultRunLoopMode
|
||||
all: NO];
|
||||
|
|
18
configure.ac
18
configure.ac
|
@ -434,19 +434,23 @@ AC_SUBST(ac_cv_sizeof_double)
|
|||
|
||||
AC_SUBST(ac_cv_sizeof_voidp)
|
||||
if test $ac_cv_sizeof_voidp = $ac_cv_sizeof_int; then
|
||||
GS_ADDR="unsigned int"
|
||||
GS_SADDR="int"
|
||||
GS_UADDR="unsigned int"
|
||||
else
|
||||
if test $ac_cv_sizeof_voidp = $ac_cv_sizeof_long; then
|
||||
GS_ADDR="unsigned long"
|
||||
GS_SADDR="long"
|
||||
GS_UADDR="unsigned long"
|
||||
else
|
||||
if test $ac_cv_sizeof_voidp = $ac_cv_sizeof_long_long; then
|
||||
GS_ADDR="unsigned long long"
|
||||
GS_SADDR="long long"
|
||||
GS_UADDR="unsigned long long"
|
||||
else
|
||||
AC_MSG_ERROR([Unable to find integer of same size as void*])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(GS_ADDR)
|
||||
AC_SUBST(GS_SADDR)
|
||||
AC_SUBST(GS_UADDR)
|
||||
|
||||
if test $ac_cv_sizeof_short = 2; then
|
||||
GS_SINT16="signed short"
|
||||
|
@ -884,6 +888,8 @@ DEFINE_INT32_T="#define int32_t gss32"
|
|||
DEFINE_UINT32_T="#define uint32_t gsu32"
|
||||
DEFINE_INT64_T="#define int64_t gss64"
|
||||
DEFINE_UINT64_T="#define uint64_t gsu64"
|
||||
DEFINE_INTPTR_T="#define intptr_t gssaddr"
|
||||
DEFINE_UINTPTR_T="#define uintptr_t gsuaddr"
|
||||
else
|
||||
DEFINE_INT8_T=""
|
||||
DEFINE_UINT8_T=""
|
||||
|
@ -893,6 +899,8 @@ DEFINE_INT32_T=""
|
|||
DEFINE_UINT32_T=""
|
||||
DEFINE_INT64_T=""
|
||||
DEFINE_UINT64_T=""
|
||||
DEFINE_INTPTR_T=""
|
||||
DEFINE_UINTPTR_T=""
|
||||
fi
|
||||
|
||||
AC_SUBST(INCLUDE_STDINT)
|
||||
|
@ -904,6 +912,8 @@ AC_SUBST(DEFINE_INT32_T)
|
|||
AC_SUBST(DEFINE_UINT32_T)
|
||||
AC_SUBST(DEFINE_INT64_T)
|
||||
AC_SUBST(DEFINE_UINT64_T)
|
||||
AC_SUBST(DEFINE_INTPTR_T)
|
||||
AC_SUBST(DEFINE_UINTPTR_T)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# These used by GSFileHandle.m and distributed objects
|
||||
|
|
Loading…
Reference in a new issue