minor mingw32 fixups

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22616 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2006-03-08 06:25:44 +00:00
parent 37fdb1f4f7
commit 172bfc67ef
3 changed files with 26 additions and 6 deletions

View file

@ -380,8 +380,23 @@ static const NSMapTableValueCallBacks WatcherMapValueCallBacks =
wait_timeout = 0; // Processed something ... no need to wait.
}
wait_return = MsgWaitForMultipleObjects(num_handles, handleArray,
NO, wait_timeout, QS_ALLINPUT);
if (num_winMsgs > 0)
{
/*
* Wait for signalled events or window messages.
*/
wait_return = MsgWaitForMultipleObjects(num_handles, handleArray,
NO, wait_timeout, QS_ALLINPUT);
}
else
{
/*
* We are not interested in windows messages ... just wait for
* signalled events.
*/
wait_return = WaitForMultipleObjects(num_handles, handleArray,
NO, wait_timeout);
}
NSDebugMLLog(@"NSRunLoop", @"wait returned %d", wait_return);
// if there are windows message

View file

@ -295,8 +295,7 @@ static void setNonblocking(SOCKET fd)
{
int fd;
fd = _wopen((unichar*)[_path cStringUsingEncoding: NSUnicodeStringEncoding],
O_RDONLY|O_BINARY);
fd = _wopen([_path fileSystemRepresentation], O_RDONLY|O_BINARY);
if (fd < 0)
{
[self _recordError];
@ -790,8 +789,7 @@ static void setNonblocking(SOCKET fd)
flag = flag | O_APPEND;
else
flag = flag | O_TRUNC;
fd = _wopen((unichar*)[_path cStringUsingEncoding: NSUnicodeStringEncoding],
flag, mode);
fd = _wopen([_path fileSystemRepresentation], flag, mode);
if (fd < 0)
{ // make an error
[self _recordError];