MacOS-X compatibility updates.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26598 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2008-06-06 13:57:06 +00:00
parent 35e907b7ed
commit f1d83b9f14
42 changed files with 827 additions and 13 deletions

View file

@ -647,6 +647,42 @@ static NSLock *cached_proxies_gate = nil;
return AUTORELEASE(proxy);
}
+ (id) serviceConnectionWithName: (NSString *)name
rootObject: (id)root
{
return [self serviceConnectionWithName: name
rootObject: root
usingNameServer: [NSPortNameServer systemDefaultPortNameServer]];
}
+ (id) serviceConnectionWithName: (NSString *)name
rootObject: (id)root
usingNameServer: (NSPortNameServer *)server
{
NSConnection *c;
NSPort *p;
if ([server isKindOfClass: [NSMessagePortNameServer class]] == YES)
{
p = [NSMessagePort port];
}
else if ([server isKindOfClass: [NSSocketPortNameServer class]] == YES)
{
p = [NSSocketPort port];
}
else
{
p = nil;
}
c = [[NSConnection alloc] initWithReceivePort: p sendPort: nil];
if ([c registerName: name withNameServer: server] == NO)
{
DESTROY(c);
}
return AUTORELEASE(c);
}
+ (void) _timeout: (NSTimer*)t
{
NSArray *cached_locals;