mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
mingw32 improvements
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28755 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c0f76095d1
commit
8e2d2ce1e1
3 changed files with 33 additions and 6 deletions
|
@ -1,6 +1,8 @@
|
|||
2009-09-30 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSLock.m: Fix BOOL methods to return YES or NO.
|
||||
* Source/win32/GSFileHandle.m: Implement nul device handle.
|
||||
* Source/NSTask.m: Try to avoid annoying colsole window with mingw32
|
||||
|
||||
2009-09-27 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -1222,6 +1222,11 @@ quotedFromString(NSString *aString)
|
|||
}
|
||||
hErr = start_info.hStdError;
|
||||
|
||||
/* Tell the system not to show a window for the subtask.
|
||||
*/
|
||||
start_info.wShowWindow = SW_HIDE;
|
||||
start_info.dwFlags |= STARTF_USESHOWWINDOW;
|
||||
|
||||
/* Make the handles inheritable only temporarily while launching the
|
||||
* child task. This section must be lock protected so we don't have
|
||||
* another thread trying to launch at the same time and get handles
|
||||
|
@ -1238,11 +1243,16 @@ quotedFromString(NSString *aString)
|
|||
NULL, /* thread attrs */
|
||||
1, /* inherit handles */
|
||||
0
|
||||
// |CREATE_NO_WINDOW
|
||||
|CREATE_NO_WINDOW
|
||||
/* One would have thought the the CREATE_NO_WINDOW flag should be used,
|
||||
* but apparently this breaks for old 16bit applications/tools on XP.
|
||||
* So maybe we want to leave it out?
|
||||
*/
|
||||
// |DETACHED_PROCESS
|
||||
/* We don't set the DETACHED_PROCESS flag as it actually means that the
|
||||
* child task should get a new Console allocated ... and that means it
|
||||
* will pop up a console window ... which looks really bad.
|
||||
*/
|
||||
|DETACHED_PROCESS
|
||||
|CREATE_UNICODE_ENVIRONMENT,
|
||||
envp, /* env block */
|
||||
(const unichar*)[[self currentDirectoryPath] fileSystemRepresentation],
|
||||
|
|
|
@ -1085,10 +1085,25 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
|
||||
- (id) initWithNullDevice
|
||||
{
|
||||
isNullDevice = YES;
|
||||
isStandardFile = YES;
|
||||
descriptor = -1;
|
||||
return self;
|
||||
int d = _open("NUL", O_RDWR|O_BINARY);
|
||||
|
||||
if (d < 0)
|
||||
{
|
||||
RELEASE(self);
|
||||
return nil;
|
||||
}
|
||||
else
|
||||
{
|
||||
self = [self initWithFileDescriptor: d closeOnDealloc: YES];
|
||||
if (self != nil)
|
||||
{
|
||||
connectOK = NO;
|
||||
acceptOK = NO;
|
||||
isNullDevice = YES;
|
||||
isStandardFile = YES;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
}
|
||||
|
||||
- (id) initWithFileDescriptor: (int)desc closeOnDealloc: (BOOL)flag
|
||||
|
|
Loading…
Reference in a new issue