Use message ports if the runtime setting is for MacOS-X compatibility.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@19842 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2004-08-08 14:50:43 +00:00
parent d4564c1581
commit 6d82d060ec
3 changed files with 15 additions and 2 deletions

View file

@ -1,3 +1,12 @@
2004-08-07 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSPort.m (+initialize), Source/NSPortNameServer.m
(systemDefaultPortNameServer): We should be using message ports
when we are supposed to be MacOS-X compatible anyway, so check the
runtime compatibility setting. Maybe we should be thinking about
changing away from the OpenStep behavior as default, and put a
warning into the next release?
2004-08-07 02:26 Alexander Malmberg <alexander@malmberg.org>
* Source/NSPort.m (+initialize), Source/NSPortNameServer.m

View file

@ -34,6 +34,7 @@
#include "Foundation/NSRunLoop.h"
#include "Foundation/NSAutoreleasePool.h"
#include "Foundation/NSUserDefaults.h"
#include "GSPrivate.h"
@class NSMessagePort;
@ -68,7 +69,8 @@ Class NSPort_concrete_class;
NSPort_abstract_class = self;
/* Must be kept in sync with [NSPortNameServer
+systemDefaultPortNameServer]. */
if ([[NSUserDefaults standardUserDefaults]
if (GSUserDefaultsFlag(GSMacOSXCompatible) == YES
|| [[NSUserDefaults standardUserDefaults]
boolForKey: @"NSPortIsMessagePort"])
{
NSPort_concrete_class = [NSMessagePort class];

View file

@ -30,6 +30,7 @@
#include "Foundation/NSPortNameServer.h"
#include "Foundation/NSDebug.h"
#include "Foundation/NSUserDefaults.h"
#include "GSPrivate.h"
/**
@ -64,7 +65,8 @@
+ (id) systemDefaultPortNameServer
{
/* Must be kept in sync with [NSPort +initialize]. */
if ([[NSUserDefaults standardUserDefaults]
if (GSUserDefaultsFlag(GSMacOSXCompatible) == YES
|| [[NSUserDefaults standardUserDefaults]
boolForKey: @"NSPortIsMessagePort"])
{
return [NSMessagePortNameServer sharedInstance];