This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: HAVE_POLL is not enough - RFA



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?

Thanks

Elena


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>
 > #endif
 > 
 > that is needed a.o. on AIX (See e.g. the sources of bash, screen, mc, uucp,
 > ncurses, inetutils, cvs or emacs)
 > 
 > Philippe

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]