mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
minor win32 fixups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23953 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
981bd40faf
commit
63f65668f0
6 changed files with 30 additions and 10 deletions
|
@ -266,10 +266,15 @@ static void clean_up_names(void)
|
|||
|
||||
NSDebugLLog(@"NSMessagePort", @"portForName: %@ host: %@", name, host);
|
||||
|
||||
if ([host length] && ![host isEqual: @"*"])
|
||||
if ([host length] > 0)
|
||||
{
|
||||
NSDebugLLog(@"NSMessagePort", @"non-local host");
|
||||
return nil;
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"Attempt to contact a named host using a "
|
||||
@"message port name server. This name server can only be used "
|
||||
@"to contact processes owned by the same user on the local host "
|
||||
@"(host name must be an empty string). To contact processes "
|
||||
@"owned by other users or on other hosts you must use an instance "
|
||||
@"of the NSSocketPortNameServer class."];
|
||||
}
|
||||
|
||||
path = [[self class] _pathForName: name];
|
||||
|
|
|
@ -1198,7 +1198,8 @@ quotedFromString(NSString *aString)
|
|||
NULL, /* proc attrs */
|
||||
NULL, /* thread attrs */
|
||||
1, /* inherit handles */
|
||||
CREATE_NO_WINDOW|DETACHED_PROCESS|CREATE_UNICODE_ENVIRONMENT,
|
||||
// CREATE_NO_WINDOW|DETACHED_PROCESS|CREATE_UNICODE_ENVIRONMENT,
|
||||
CREATE_NO_WINDOW|CREATE_UNICODE_ENVIRONMENT,
|
||||
envp, /* env block */
|
||||
(const unichar*)[[self currentDirectoryPath] fileSystemRepresentation],
|
||||
&start_info,
|
||||
|
|
|
@ -1487,8 +1487,7 @@ static NSMapTable *absolutes = 0;
|
|||
{
|
||||
bufsize--;
|
||||
}
|
||||
localZoneString
|
||||
= [NSString stringWithUTF8String: buf length: bufsize];
|
||||
localZoneString = [NSString stringWithUTF8String: buf];
|
||||
}
|
||||
RegCloseKey(regkey);
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include "Foundation/NSAutoreleasePool.h"
|
||||
#include "Foundation/NSDebug.h"
|
||||
#include "Foundation/NSError.h"
|
||||
#include "Foundation/NSException.h"
|
||||
#include "Foundation/NSLock.h"
|
||||
#include "Foundation/NSMapTable.h"
|
||||
|
@ -39,6 +40,7 @@
|
|||
|
||||
#include "GNUstepBase/GSMime.h"
|
||||
|
||||
#include "../GSPrivate.h"
|
||||
#include "GSPortPrivate.h"
|
||||
|
||||
#define UNISTR(X) \
|
||||
|
@ -242,6 +244,11 @@ OutputDebugStringW(L"");
|
|||
return name;
|
||||
}
|
||||
|
||||
- (NSPort*) portForName: (NSString *)name
|
||||
{
|
||||
return [self portForName: name onHost: @""];
|
||||
}
|
||||
|
||||
- (NSPort*) portForName: (NSString *)name
|
||||
onHost: (NSString *)host
|
||||
{
|
||||
|
@ -250,10 +257,15 @@ OutputDebugStringW(L"");
|
|||
NSDebugLLog(@"NSMessagePortNameServer",
|
||||
@"portForName: %@ host: %@", name, host);
|
||||
|
||||
if ([host length] && ![host isEqual: @"*"])
|
||||
if ([host length] != 0)
|
||||
{
|
||||
NSDebugLLog(@"NSMessagePortNameServer", @"non-local host");
|
||||
return nil;
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"Attempt to contact a named host using a "
|
||||
@"message port name server. This name server can only be used "
|
||||
@"to contact processes owned by the same user on the local host "
|
||||
@"(host name must be an empty string). To contact processes "
|
||||
@"owned by other users or on other hosts you must use an instance "
|
||||
@"of the NSSocketPortNameServer class."];
|
||||
}
|
||||
|
||||
n = [[self class] _query: name];
|
||||
|
@ -312,7 +324,7 @@ OutputDebugStringW(L"");
|
|||
else
|
||||
{
|
||||
NSLog(@"Failed to insert HKEY_CURRENT_USER\\%@\\%@ (%x) %@",
|
||||
registry, n, rc, [_GSPrivate error: rc]);
|
||||
registry, n, rc, [NSError _last]);
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "GNUstepBase/GSLock.h"
|
||||
#include "Foundation/NSArray.h"
|
||||
#include "Foundation/NSNotification.h"
|
||||
#include "Foundation/NSError.h"
|
||||
#include "Foundation/NSException.h"
|
||||
#include "Foundation/NSRunLoop.h"
|
||||
#include "Foundation/NSByteOrder.h"
|
||||
|
@ -43,6 +44,7 @@
|
|||
#include "Foundation/NSFileManager.h"
|
||||
#include "Foundation/NSProcessInfo.h"
|
||||
|
||||
#include "../GSPrivate.h"
|
||||
#include "GSPortPrivate.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include <Foundation/NSDebug.h>
|
||||
|
||||
#include "../GSStream.h"
|
||||
#include "../GSPrivate.h"
|
||||
|
||||
#define BUFFERSIZE (BUFSIZ*64)
|
||||
|
||||
|
|
Loading…
Reference in a new issue