This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: gdb5.0 on i586-pc-linux-gnulibc1: no <poll.h>, but <sys/poll.h>
- To: Hans-Bernhard Broeker <broeker at physik dot rwth-aachen dot de>
- Subject: Re: gdb5.0 on i586-pc-linux-gnulibc1: no <poll.h>, but <sys/poll.h>
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 05 Jul 2000 20:18:24 +1000
- CC: gdb-patches at sourceware dot cygnus dot com
- References: <Pine.LNX.4.10.10005251840290.23601-100000@acp3bf>
Hans-Bernhard Broeker wrote:
>
> Hello, everyone.
>
> System: i586-cp-linux-gnulibc1 (libc5 5.4.33, linux 2.0.32)
> gdb version: gdb-5.0 (final release)
>
> I just found a minor glitch in building gdb5.0: it did (correctly)
> determine that this machine I build on does have the poll() function. But
> there's no check as to where the appropriate header file might be: it's
> hardwired to #include <poll.h> whenever HAVE_POLL is set. On the
> admittedly outdated system Linux mentioned, it should #include
> <sys/poll.h>. Changing that the brute-force way gave me a working
> gdb...
FYI,
I've committed the attatched. (well I will once a re-config / re-build
has finished :-).
Andrew
Wed Jul 5 20:09:41 2000 Andrew Cagney <cagney@b1.cygnus.com>
* event-loop.c: Include either <poll.h> or <sys/poll.h>.
* configure.in (targ_archs): Check for <poll.h> and <sys/poll.h>.
* configure, config.in: Re-generate.
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.37
diff -p -r1.37 configure.in
*** configure.in 2000/06/12 06:09:04 1.37
--- configure.in 2000/07/05 10:14:19
*************** AC_CHECK_HEADERS(ctype.h endian.h link.h
*** 123,129 ****
wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
time.h sys/ioctl.h sys/user.h \
dirent.h sys/ndir.h sys/dir.h ndir.h \
! curses.h ncurses.h)
AC_HEADER_STAT
AC_C_CONST
--- 123,130 ----
wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
time.h sys/ioctl.h sys/user.h \
dirent.h sys/ndir.h sys/dir.h ndir.h \
! curses.h ncurses.h \
! poll.h sys/poll.h)
AC_HEADER_STAT
AC_C_CONST
Index: event-loop.c
===================================================================
RCS file: /cvs/src/src/gdb/event-loop.c,v
retrieving revision 1.6
diff -p -r1.6 event-loop.c
*** event-loop.c 2000/03/23 03:48:13 1.6
--- event-loop.c 2000/07/05 10:14:24
***************
*** 23,31 ****
--- 23,37 ----
#include "top.h"
#include "event-loop.h"
#include "event-top.h"
+
#ifdef HAVE_POLL
+ #if defined (HAVE_POLL_H)
#include <poll.h>
+ #elif defined (HAVE_SYS_POLL_H)
+ #include <sys/poll.h>
#endif
+ #endif
+
#include <sys/types.h>
#include <string.h>
#include <errno.h>