* fhandler.h: Change Windows 'BOOL's to c++ 'bool's for all variables.

* select.cc (fhandler_base::ready_for_read): Set read_ready to zero prior to
testing it or it will be uninitialized.
* Makefile.in (CFLAGS): Move setting to Makefile.common.
This commit is contained in:
Christopher Faylor 2001-11-02 04:44:06 +00:00
parent 53f0029081
commit 0378d00f52
4 changed files with 21 additions and 12 deletions

View File

@ -1,3 +1,11 @@
2001-11-01 Christopher Faylor <cgf@redhat.com>
* fhandler.h: Change Windows 'BOOL's to c++ 'bool's for all variables.
* select.cc (fhandler_base::ready_for_read): Set read_ready to zero
prior to testing it or it will be uninitialized.
* Makefile.in (CFLAGS): Move setting to Makefile.common.
2001-11-01 Christopher Faylor <cgf@redhat.com> 2001-11-01 Christopher Faylor <cgf@redhat.com>
* cygheap.h (cygheap_fdmanip::isopen): Set appropriate errno if fd not * cygheap.h (cygheap_fdmanip::isopen): Set appropriate errno if fd not

View File

@ -50,7 +50,7 @@ DEFS = @DEFS@
CC:=@CC@ CC:=@CC@
# FIXME: Which is it, CC or CC_FOR_TARGET? # FIXME: Which is it, CC or CC_FOR_TARGET?
CC_FOR_TARGET:=$(CC) CC_FOR_TARGET:=$(CC)
CFLAGS:=@CFLAGS@ -Winline CFLAGS:=@CFLAGS@
CFLAGS+=-MD -fbuiltin CFLAGS+=-MD -fbuiltin
CXX:=@CXX@ CXX:=@CXX@
CXXFLAGS:=@CXXFLAGS@ CXXFLAGS:=@CXXFLAGS@

View File

@ -678,13 +678,13 @@ class fhandler_console: public fhandler_termios
int args_[MAXARGS]; int args_[MAXARGS];
int nargs_; int nargs_;
unsigned rarg; unsigned rarg;
BOOL saw_question_mark; bool saw_question_mark;
char my_title_buf [TITLESIZE + 1]; char my_title_buf [TITLESIZE + 1];
WORD current_win32_attr; WORD current_win32_attr;
ansi_intensity intensity; ansi_intensity intensity;
BOOL underline, blink, reverse; bool underline, blink, reverse;
WORD fg, bg; WORD fg, bg;
/* saved cursor coordinates */ /* saved cursor coordinates */
@ -712,9 +712,9 @@ class fhandler_console: public fhandler_termios
DWORD dwLastButtonState; DWORD dwLastButtonState;
int nModifiers; int nModifiers;
BOOL insert_mode; bool insert_mode;
BOOL use_mouse; bool use_mouse;
BOOL raw_win32_keyboard_mode; bool raw_win32_keyboard_mode;
/* Output calls */ /* Output calls */
void set_default_attr (); void set_default_attr ();
@ -966,7 +966,7 @@ class fhandler_dev_clipboard: public fhandler_base
off_t pos; off_t pos;
void *membuffer; void *membuffer;
size_t msize; size_t msize;
BOOL eof; bool eof;
}; };
class fhandler_windows: public fhandler_base class fhandler_windows: public fhandler_base
@ -1044,10 +1044,10 @@ struct select_record
int fd; int fd;
HANDLE h; HANDLE h;
fhandler_base *fh; fhandler_base *fh;
BOOL saw_error; bool saw_error;
BOOL windows_handle; bool windows_handle;
BOOL read_ready, write_ready, except_ready; bool read_ready, write_ready, except_ready;
BOOL read_selected, write_selected, except_selected; bool read_selected, write_selected, except_selected;
int (*startup) (select_record *me, class select_stuff *stuff); int (*startup) (select_record *me, class select_stuff *stuff);
int (*poll) (select_record *me, fd_set *readfds, fd_set *writefds, int (*poll) (select_record *me, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds); fd_set *exceptfds);
@ -1073,7 +1073,7 @@ class select_stuff
{ {
memset (device_specific, 0, sizeof (device_specific)); memset (device_specific, 0, sizeof (device_specific));
} }
BOOL always_ready, windows_used; bool always_ready, windows_used;
select_record start; select_record start;
void *device_specific[FH_NDEV]; void *device_specific[FH_NDEV];

View File

@ -1074,6 +1074,7 @@ fhandler_base::ready_for_read (int fd, DWORD howlong, int ignra)
{ {
int avail = 0; int avail = 0;
select_record me (this); select_record me (this);
me.read_ready = false;
me.fd = fd; me.fd = fd;
while (!avail) while (!avail)
{ {