mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
iGet distributed notifications working with NSMessagePort on mingw32
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21987 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8aec641be4
commit
ed4c30c3ac
3 changed files with 26 additions and 8 deletions
|
@ -5,6 +5,8 @@
|
||||||
* Testing/nsconnection_client.m: don't run large structure test on
|
* Testing/nsconnection_client.m: don't run large structure test on
|
||||||
mingw32 at present ... it crashes (something wrong with the invocation
|
mingw32 at present ... it crashes (something wrong with the invocation
|
||||||
stuff for ffcall and some large structures on mingw32)
|
stuff for ffcall and some large structures on mingw32)
|
||||||
|
* Tools/gdnc.m: Obey GSMailslot default on mingw32.
|
||||||
|
* Source/NSDistributedNotificationCenter.m: ditto.
|
||||||
|
|
||||||
2005-11-10 Richard Frith-Macdonald <rfm@gnu.org>
|
2005-11-10 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
|
|
@ -587,7 +587,18 @@ static NSDistributedNotificationCenter *netCenter = nil;
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
if (_type == NSLocalNotificationCenterType)
|
if (_type == NSLocalNotificationCenterType)
|
||||||
{
|
{
|
||||||
ASSIGN(_type, GSPublicNotificationCenterType);
|
if ([[NSUserDefaults standardUserDefaults]
|
||||||
|
boolForKey: @"GSMailslot"] == YES)
|
||||||
|
{
|
||||||
|
host = @"";
|
||||||
|
ns = [NSMessagePortNameServer sharedInstance];
|
||||||
|
service = GDNC_SERVICE;
|
||||||
|
description = @"local host";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ASSIGN(_type, GSPublicNotificationCenterType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (_type == NSLocalNotificationCenterType)
|
if (_type == NSLocalNotificationCenterType)
|
||||||
|
@ -597,9 +608,8 @@ static NSDistributedNotificationCenter *netCenter = nil;
|
||||||
service = GDNC_SERVICE;
|
service = GDNC_SERVICE;
|
||||||
description = @"local host";
|
description = @"local host";
|
||||||
}
|
}
|
||||||
else
|
|
||||||
#endif
|
#endif
|
||||||
if (_type == GSPublicNotificationCenterType)
|
else if (_type == GSPublicNotificationCenterType)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Connect to the NSDistributedNotificationCenter for this host.
|
* Connect to the NSDistributedNotificationCenter for this host.
|
||||||
|
|
16
Tools/gdnc.m
16
Tools/gdnc.m
|
@ -24,7 +24,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#ifdef __MINGW32__
|
#if defined(__MINGW32__)
|
||||||
#include "process.h"
|
#include "process.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -395,8 +395,16 @@ ihandler(int sig)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef __MINGW32__
|
#if defined(__MINGW32__)
|
||||||
isPublic = YES;
|
if ([[NSUserDefaults standardUserDefaults]
|
||||||
|
boolForKey: @"GSMailslot"] == YES)
|
||||||
|
{
|
||||||
|
isLocal = YES;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
isPublic = YES;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
isLocal = YES;
|
isLocal = YES;
|
||||||
#endif
|
#endif
|
||||||
|
@ -425,7 +433,6 @@ ihandler(int sig)
|
||||||
port = (NSPort*)[NSSocketPort port];
|
port = (NSPort*)[NSSocketPort port];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef __MINGW32__
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hostname = @"";
|
hostname = @"";
|
||||||
|
@ -433,7 +440,6 @@ ihandler(int sig)
|
||||||
ns = [NSMessagePortNameServer sharedInstance];
|
ns = [NSMessagePortNameServer sharedInstance];
|
||||||
port = (NSPort*)[NSMessagePort port];
|
port = (NSPort*)[NSMessagePort port];
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
conn = [[NSConnection alloc] initWithReceivePort: port sendPort: nil];
|
conn = [[NSConnection alloc] initWithReceivePort: port sendPort: nil];
|
||||||
[conn setRootObject: self];
|
[conn setRootObject: self];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue