This is the mail archive of the
mailing list for the GDB project.
Re: HAVE_POLL is not enough - RFA
- To: "Philippe De Muyter" <phdm at macqel dot be>
- Subject: Re: HAVE_POLL is not enough - RFA
- From: Elena Zannoni <ezannoni at cygnus dot com>
- Date: Mon, 20 Mar 2000 15:07:33 -0500 (EST)
- Cc: eliz at is dot elta dot co dot il, ezannoni at cygnus dot com, ac131313 at cygnus dot com, gdb-patches at sourceware dot cygnus dot com
- References: <200003182226.RAA07052@indy.delorie.com><200003182300.AAA32279@mail.macqel.be>
Philippe, I didn't commit your suggested change below, yet. Can you
submit that as part of your patch, now that Eli's changes are in?
Philippe De Muyter writes:
> Eli Zaretskii wrote :
> > * event-loop.c (top-level) [NO_FD_SET]: Deprecate this branch.
> > Print an error at compile time if we are to use select, but FD_SET
> > is not available.
> > (SELECT_MASK, NBBY, FD_SETSIZE, NFDBITS, MASK_SIZE): Define only
> > if HAVE_POLL is not defined and NO_FD_SET *is* defined.
> > (create_file_handler) [!HAVE_POLL]: Use FD_SET and FD_CLR.
> > (delete_file_handler) [!HAVE_POLL]: Use FD_CLR and FD_ISSET.
> > (gdb_wait_for_event) [!HAVE_POLL]: Copy fd_set sets directly
> > instead of using memcpy and memset. Use FD_ISSET.
> > +#ifdef NO_FD_SET
> > +/* All this stuff below is not required if select is used as God(tm)
> > + intended, with the FD_* macros. Are there any implementations of
> > + select which don't have FD_SET and other standard FD_* macros? I
> > + don't think there are, but if I'm wrong, we need to catch them. */
> > +#error FD_SET must be defined if select function is to be used!
> I agree completely that your change is the right thing, but it misses
> the following sequence :
> #if HAVE_SYS_SELECT_H
> #include <sys/select.h>
> that is needed a.o. on AIX (See e.g. the sources of bash, screen, mc, uucp,
> ncurses, inetutils, cvs or emacs)