Changes for 64bit clean printf format strings.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36810 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2013-07-03 06:46:41 +00:00
parent a728a03c0c
commit b2d5fd280c
32 changed files with 223 additions and 168 deletions

View file

@ -351,7 +351,8 @@ static Class runLoopClass;
const unsigned char *name;
M_LOCK(myLock);
NSDebugMLLog(@"NSMessagePort", @"Connecting on 0x%x before %@", self, when);
NSDebugMLLog(@"NSMessagePort",
@"Connecting on 0x%"PRIxPTR" before %@", (NSUInteger)self, when);
if (state != GS_H_UNCON)
{
BOOL result;
@ -500,7 +501,8 @@ static Class runLoopClass;
type: ET_WDESC
forMode: nil
all: YES];
NSDebugMLLog(@"NSMessagePort", @"invalidated 0x%x", self);
NSDebugMLLog(@"NSMessagePort",
@"invalidated 0x%"PRIxPTR, (NSUInteger)self);
[[self recvPort] removeHandle: self];
[[self sendPort] removeHandle: self];
}
@ -527,8 +529,8 @@ static Class runLoopClass;
forMode: (NSString*)mode
{
NSDebugMLLog(@"NSMessagePort_details",
@"received %s event on 0x%x",
type != ET_WDESC ? "read" : "write", self);
@"received %s event on 0x%"PRIxPTR,
type != ET_WDESC ? "read" : "write", (NSUInteger)self);
/*
* If we have been invalidated (desc < 0) then we should ignore this
* event and remove ourself from the runloop.
@ -587,7 +589,8 @@ static Class runLoopClass;
{
if (res == 0)
{
NSDebugMLLog(@"NSMessagePort", @"read eof on 0x%x", self);
NSDebugMLLog(@"NSMessagePort",
@"read eof on 0x%"PRIxPTR, (NSUInteger)self);
M_UNLOCK(myLock);
[self invalidate];
return;
@ -603,7 +606,7 @@ static Class runLoopClass;
res = 0; /* Interrupted - continue */
}
NSDebugMLLog(@"NSMessagePort_details",
@"read %d bytes on 0x%x", res, self);
@"read %d bytes on 0x%"PRIxPTR, res, (NSUInteger)self);
rLength += res;
while (valid == YES && rLength >= rWant)
@ -861,7 +864,7 @@ static Class runLoopClass;
rId = 0;
DESTROY(rItems);
NSDebugMLLog(@"NSMessagePort_details",
@"got message %@ on 0x%x", pm, self);
@"got message %@ on 0x%"PRIxPTR, pm, (NSUInteger)self);
IF_NO_GC([rp retain];)
M_UNLOCK(myLock);
NS_DURING
@ -909,7 +912,7 @@ static Class runLoopClass;
if (len == (int)[d length])
{
NSDebugMLLog(@"NSMessagePort_details",
@"wrote %d bytes on 0x%x", len, self);
@"wrote %d bytes on 0x%"PRIxPTR, len, (NSUInteger)self);
state = GS_H_CONNECTED;
}
else
@ -938,7 +941,7 @@ static Class runLoopClass;
}
else
{
// NSLog(@"No messages to write on 0x%x.", self);
// NSLog(@"No messages to write on 0x%"PRIxPTR".", (NSUInteger)self);
M_UNLOCK(myLock);
return;
}
@ -959,7 +962,7 @@ static Class runLoopClass;
else
{
NSDebugMLLog(@"NSMessagePort_details",
@"wrote %d bytes on 0x%x", res, self);
@"wrote %d bytes on 0x%"PRIxPTR, res, (NSUInteger)self);
wLength += res;
if (wLength == l)
{
@ -984,7 +987,8 @@ static Class runLoopClass;
* message completed - remove from list.
*/
NSDebugMLLog(@"NSMessagePort_details",
@"completed 0x%x on 0x%x", components, self);
@"completed 0x%"PRIxPTR" on 0x%"PRIxPTR,
(NSUInteger)components, (NSUInteger)self);
wData = nil;
wItem = 0;
[wMsgs removeObjectAtIndex: 0];
@ -1004,8 +1008,8 @@ static Class runLoopClass;
NSAssert([components count] > 0, NSInternalInconsistencyException);
NSDebugMLLog(@"NSMessagePort_details",
@"Sending message 0x%x %@ on 0x%x(%d) before %@",
components, components, self, desc, when);
@"Sending message 0x%"PRIxPTR" %@ on 0x%"PRIxPTR"(%d) before %@",
(NSUInteger)components, components, (NSUInteger)self, desc, when);
M_LOCK(myLock);
[wMsgs addObject: components];
@ -1046,7 +1050,8 @@ static Class runLoopClass;
}
M_UNLOCK(myLock);
NSDebugMLLog(@"NSMessagePort_details",
@"Message send 0x%x on 0x%x status %d", components, self, sent);
@"Message send 0x%"PRIxPTR" on 0x%"PRIxPTR" status %d",
(NSUInteger)components, (NSUInteger)self, sent);
RELEASE(self);
return sent;
}
@ -1408,7 +1413,8 @@ typedef struct {
- (void) finalize
{
NSDebugMLLog(@"NSMessagePort", @"NSMessagePort 0x%x finalized", self);
NSDebugMLLog(@"NSMessagePort",
@"NSMessagePort 0x%"PRIxPTR" finalized", (NSUInteger)self);
[self invalidate];
if (_internal != 0)
{
@ -1575,12 +1581,13 @@ typedef struct {
if (d == nil)
{
NSDebugMLLog(@"NSMessagePort",
@"No delegate to handle incoming message", 0);
@"%@", @"No delegate to handle incoming message");
return;
}
if ([d respondsToSelector: @selector(handlePortMessage:)] == NO)
{
NSDebugMLLog(@"NSMessagePort", @"delegate doesn't handle messages", 0);
NSDebugMLLog(@"NSMessagePort",
@"%@", @"delegate doesn't handle messages");
return;
}
[d handlePortMessage: m];