This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: Has anyone compiled gdb from CVS on Linux?
- To: Jim Kingdon <kingdon at redhat dot com>, gdb at sourceware dot cygnus dot com
- Subject: Re: Has anyone compiled gdb from CVS on Linux?
- From: Eric Christopher <echristo at cygnus dot com>
- Date: Wed, 09 Feb 2000 16:28:52 -0800
- References: <20000208190825.A17306@lucon.org> <bn1pbnf4d.fsf@rtl.cygnus.com>
The define is in the config.h file that gdb_wait.h needs to include
<sys/wait.h>. It doesn't seem to be included either in linux-thread.c
or gdb_wait.h. I'm guessing it should
be?
from gdb/config.h:
/* Define if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
and gdb/gdb_wait.h
/#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h> /* POSIX */
#else
#ifdef HAVE_WAIT_H
#include <wait.h> /* legacy */
#endif
#endif
-eric
>
> > I cannot compile gdb from CVS on Linux since the merge. For one thing,
> > include/wait.h doesn't have
>
> I got around this by the enclosed patch (all that HAVE_WAIT_H looks
> like pre-POSIX cruft to me). I haven't tried to turn this into an
> official submission (yet, at least).
>
> With this patch, it compiles and runs for me.
>
> Index: lin-thread.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/lin-thread.c,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 lin-thread.c
> --- lin-thread.c 1999/12/22 21:45:07 1.1.1.1
> +++ lin-thread.c 2000/02/09 04:45:14
> @@ -102,13 +102,7 @@
> #include "inferior.h"
> #include "gdbcmd.h"
>
> -#ifdef HAVE_WAIT_H
> -#include <wait.h>
> -#else
> -#ifdef HAVE_SYS_WAIT_H
> #include <sys/wait.h>
> -#endif
> -#endif
>
> /* "wait.h" fills in the gaps left by <wait.h> */
> #include "wait.h"