mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +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
887039424c
commit
20f499656f
3 changed files with 33 additions and 6 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue