diff --git a/ChangeLog b/ChangeLog index 7ce6d5a42..cb75255e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,8 @@ * Testing/nsconnection_client.m: don't run large structure test on mingw32 at present ... it crashes (something wrong with the invocation 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 diff --git a/Source/NSDistributedNotificationCenter.m b/Source/NSDistributedNotificationCenter.m index 248e3bd35..3785d9d7d 100644 --- a/Source/NSDistributedNotificationCenter.m +++ b/Source/NSDistributedNotificationCenter.m @@ -587,7 +587,18 @@ static NSDistributedNotificationCenter *netCenter = nil; #ifdef __MINGW32__ 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 if (_type == NSLocalNotificationCenterType) @@ -597,9 +608,8 @@ static NSDistributedNotificationCenter *netCenter = nil; service = GDNC_SERVICE; description = @"local host"; } - else #endif - if (_type == GSPublicNotificationCenterType) + else if (_type == GSPublicNotificationCenterType) { /* * Connect to the NSDistributedNotificationCenter for this host. diff --git a/Tools/gdnc.m b/Tools/gdnc.m index 9ed8684ba..517d27229 100644 --- a/Tools/gdnc.m +++ b/Tools/gdnc.m @@ -24,7 +24,7 @@ #include #include -#ifdef __MINGW32__ +#if defined(__MINGW32__) #include "process.h" #endif @@ -395,8 +395,16 @@ ihandler(int sig) } else { -#ifdef __MINGW32__ - isPublic = YES; +#if defined(__MINGW32__) + if ([[NSUserDefaults standardUserDefaults] + boolForKey: @"GSMailslot"] == YES) + { + isLocal = YES; + } + else + { + isPublic = YES; + } #else isLocal = YES; #endif @@ -425,7 +433,6 @@ ihandler(int sig) port = (NSPort*)[NSSocketPort port]; } } -#ifndef __MINGW32__ else { hostname = @""; @@ -433,7 +440,6 @@ ihandler(int sig) ns = [NSMessagePortNameServer sharedInstance]; port = (NSPort*)[NSMessagePort port]; } -#endif conn = [[NSConnection alloc] initWithReceivePort: port sendPort: nil]; [conn setRootObject: self];