minor mingw32 tweaks

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22454 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2006-02-10 10:06:28 +00:00
parent 87e0726363
commit ac0b87c2a2
4 changed files with 21 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2006-02-10 Richard Frith-Macdonald <rfm@gnu.org>
* Source/win32/GSFileHandleWin32.m: Ignore extraneous write events.
* Source/NSString.m: Don't insert native path separators by default.
2006-02-07 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSFileHandle.m: ([-availabledata])a fix logic of non-blocking

View file

@ -561,8 +561,8 @@ enum {
* character (or a drive specification in windows) then that is used as the
* first element in the array.<br />
* Empty components are removed.<br />
* A trailing path separator (which was not part of the root) is added as the
* last element in the array.
* If a trailing path separator (which was not part of the root) was present,
* it is added as the last element in the array.
*/
- (NSArray*) pathComponents;

View file

@ -223,6 +223,7 @@ pathSepMember(unichar c)
inline static unichar
pathSepChar()
{
#if defined(NATIVEPATHSEP)
#if defined(__MINGW32__)
if (GSPathHandlingUnix() == YES)
{
@ -236,11 +237,15 @@ pathSepChar()
}
return '/';
#endif
#else
return '/';
#endif
}
inline static NSString*
pathSepString()
{
#if defined(NATIVEPATHSEP)
#if defined(__MINGW32__)
if (GSPathHandlingUnix() == YES)
{
@ -254,6 +259,9 @@ pathSepString()
}
return @"/";
#endif
#else
return @"/";
#endif
}
/*
@ -4411,6 +4419,7 @@ static NSFileManager *fm = nil;
{
s = AUTORELEASE([self mutableCopy]);
}
#if defined(NATIVEPATHSEP)
#if defined(__MINGW32__)
if (GSPathHandlingUnix() == YES)
{
@ -4429,6 +4438,7 @@ static NSFileManager *fm = nil;
{
[s replaceString: @"\\" withString: @"/"];
}
#endif
#endif
l = [s length];

View file

@ -2006,6 +2006,10 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
NSString *operation;
NSMutableDictionary *info;
if ([writeInfo count] == 0)
{
return; // Write already completed.
}
info = [writeInfo objectAtIndex: 0];
operation = [info objectForKey: NotificationKey];
if (operation == GSFileHandleConnectCompletionNotification