Correct the comment telling what headers have the declarations of some

2003-01-02  Tor Lillqvist  <tml@iki.fi>

	* glib/gwin32.h: Correct the comment telling what headers have
	the declarations of some POSIXish functions.

	* glib/giowin32.c (g_io_win32_fd_get_flags_internal): Fix braino:
	The checks for readability/writeability were backwards.
This commit is contained in:
Tor Lillqvist 2003-01-02 00:30:22 +00:00 committed by Tor Lillqvist
parent 05a8c34fb8
commit 54cadf4528
8 changed files with 58 additions and 9 deletions

View File

@ -1,3 +1,11 @@
2003-01-02 Tor Lillqvist <tml@iki.fi>
* glib/gwin32.h: Correct the comment telling what headers have
the declarations of some POSIXish functions.
* glib/giowin32.c (g_io_win32_fd_get_flags_internal): Fix braino:
The checks for readability/writeability were backwards.
2003-01-01 Tor Lillqvist <tml@iki.fi> 2003-01-01 Tor Lillqvist <tml@iki.fi>
* glib/gmessages.c (ensure_stderr_valid): New function, parallel * glib/gmessages.c (ensure_stderr_valid): New function, parallel

View File

@ -1,3 +1,11 @@
2003-01-02 Tor Lillqvist <tml@iki.fi>
* glib/gwin32.h: Correct the comment telling what headers have
the declarations of some POSIXish functions.
* glib/giowin32.c (g_io_win32_fd_get_flags_internal): Fix braino:
The checks for readability/writeability were backwards.
2003-01-01 Tor Lillqvist <tml@iki.fi> 2003-01-01 Tor Lillqvist <tml@iki.fi>
* glib/gmessages.c (ensure_stderr_valid): New function, parallel * glib/gmessages.c (ensure_stderr_valid): New function, parallel

View File

@ -1,3 +1,11 @@
2003-01-02 Tor Lillqvist <tml@iki.fi>
* glib/gwin32.h: Correct the comment telling what headers have
the declarations of some POSIXish functions.
* glib/giowin32.c (g_io_win32_fd_get_flags_internal): Fix braino:
The checks for readability/writeability were backwards.
2003-01-01 Tor Lillqvist <tml@iki.fi> 2003-01-01 Tor Lillqvist <tml@iki.fi>
* glib/gmessages.c (ensure_stderr_valid): New function, parallel * glib/gmessages.c (ensure_stderr_valid): New function, parallel

View File

@ -1,3 +1,11 @@
2003-01-02 Tor Lillqvist <tml@iki.fi>
* glib/gwin32.h: Correct the comment telling what headers have
the declarations of some POSIXish functions.
* glib/giowin32.c (g_io_win32_fd_get_flags_internal): Fix braino:
The checks for readability/writeability were backwards.
2003-01-01 Tor Lillqvist <tml@iki.fi> 2003-01-01 Tor Lillqvist <tml@iki.fi>
* glib/gmessages.c (ensure_stderr_valid): New function, parallel * glib/gmessages.c (ensure_stderr_valid): New function, parallel

View File

@ -1,3 +1,11 @@
2003-01-02 Tor Lillqvist <tml@iki.fi>
* glib/gwin32.h: Correct the comment telling what headers have
the declarations of some POSIXish functions.
* glib/giowin32.c (g_io_win32_fd_get_flags_internal): Fix braino:
The checks for readability/writeability were backwards.
2003-01-01 Tor Lillqvist <tml@iki.fi> 2003-01-01 Tor Lillqvist <tml@iki.fi>
* glib/gmessages.c (ensure_stderr_valid): New function, parallel * glib/gmessages.c (ensure_stderr_valid): New function, parallel

View File

@ -1,3 +1,11 @@
2003-01-02 Tor Lillqvist <tml@iki.fi>
* glib/gwin32.h: Correct the comment telling what headers have
the declarations of some POSIXish functions.
* glib/giowin32.c (g_io_win32_fd_get_flags_internal): Fix braino:
The checks for readability/writeability were backwards.
2003-01-01 Tor Lillqvist <tml@iki.fi> 2003-01-01 Tor Lillqvist <tml@iki.fi>
* glib/gmessages.c (ensure_stderr_valid): New function, parallel * glib/gmessages.c (ensure_stderr_valid): New function, parallel

View File

@ -1297,9 +1297,9 @@ g_io_win32_fd_get_flags_internal (GIOChannel *channel,
if (st->st_mode & _S_IFIFO) if (st->st_mode & _S_IFIFO)
{ {
channel->is_readable = channel->is_readable =
(PeekNamedPipe ((HANDLE) _get_osfhandle (win32_channel->fd), &c, 0, &count, NULL, NULL) == 0); (PeekNamedPipe ((HANDLE) _get_osfhandle (win32_channel->fd), &c, 0, &count, NULL, NULL) != 0);
channel->is_writeable = channel->is_writeable =
(WriteFile ((HANDLE) _get_osfhandle (win32_channel->fd), &c, 0, &count, NULL) == 0); (WriteFile ((HANDLE) _get_osfhandle (win32_channel->fd), &c, 0, &count, NULL) != 0);
channel->is_seekable = FALSE; channel->is_seekable = FALSE;
} }
else if (st->st_mode & _S_IFCHR) else if (st->st_mode & _S_IFCHR)
@ -1311,19 +1311,20 @@ g_io_win32_fd_get_flags_internal (GIOChannel *channel,
channel->is_readable = !!(st->st_mode & _S_IREAD); channel->is_readable = !!(st->st_mode & _S_IREAD);
channel->is_writeable = channel->is_writeable =
(WriteFile ((HANDLE) _get_osfhandle (win32_channel->fd), &c, 0, &count, NULL) == 0); (WriteFile ((HANDLE) _get_osfhandle (win32_channel->fd), &c, 0, &count, NULL) != 0);
/* XXX What about devices that actually *are* seekable? But those would probably /* XXX What about devices that actually *are* seekable? But
* not be handled using the C runtime anyway, but using Windows-specific code. * those would probably not be handled using the C runtime
* anyway, but using Windows-specific code.
*/ */
channel->is_seekable = FALSE; channel->is_seekable = FALSE;
} }
else else
{ {
channel->is_readable = channel->is_readable =
(ReadFile ((HANDLE) _get_osfhandle (win32_channel->fd), &c, 0, &count, NULL) == 0); (ReadFile ((HANDLE) _get_osfhandle (win32_channel->fd), &c, 0, &count, NULL) != 0);
channel->is_writeable = channel->is_writeable =
(WriteFile ((HANDLE) _get_osfhandle (win32_channel->fd), &c, 0, &count, NULL) == 0); (WriteFile ((HANDLE) _get_osfhandle (win32_channel->fd), &c, 0, &count, NULL) != 0);
channel->is_seekable = TRUE; channel->is_seekable = TRUE;
} }

View File

@ -56,8 +56,8 @@ typedef int pid_t;
* access: <io.h> * access: <io.h>
* unlink: <stdio.h> or <io.h> * unlink: <stdio.h> or <io.h>
* open, read, write, lseek, close: <io.h> * open, read, write, lseek, close: <io.h>
* rmdir: <direct.h> * rmdir: <io.h>
* pipe: <direct.h> * pipe: <io.h>
*/ */
/* pipe is not in OLDNAMES.LIB or -lmoldname-msvc. */ /* pipe is not in OLDNAMES.LIB or -lmoldname-msvc. */