This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] ARI fix: Replace sys/wait.h by gdb_wait.h in linux-fork.c
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Pierre Muller <muller at ics dot u-strasbg dot fr>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 5 Oct 2007 13:01:54 -0700
- Subject: Re: [RFC] ARI fix: Replace sys/wait.h by gdb_wait.h in linux-fork.c
- References: <005e01c80723$4ae0dec0$e0a29c40$@u-strasbg.fr>
Hello Pascal,
> 2007-10-04 Pierre Muller <muller@ics.u-strasbg.fr>
>
> * linux-fork.c: ARI fix: include "gdb_wait.h" instead of <sys/wait.h>.
> Makefile.in (linux-fork.o): Add gdb_wait.h dependency.
This patch is OK. I ran it against the regression testsuite just
to double-check.
> 2) Are there rules about the order in which
> the different headers are listed?
There are some rules, like "defs.h" should always be included first.
Usually speaking, in C, I always try to write include files in a way
that the order in which I include them is not important. To the best
or my knowledge, GDB also tries to accomplish that.
> I did put the gdb_wait.h together with other local
> headers, which seems to be a common practice in GDB sources.
That's perfect.
> 3) I also updated the dependency of linux-fork.o in
> Makefile.in, but stumbled on the same problem:
> is there some preferred ordering of the dependency list?
I don't know if there is a prefered ordering. Definitely, the ordering
in the makefile does not matter, but I try to maintain the dependency
list in the same order as the includes. It makes it a lot simpler to
double-check that the list is still accurate. So your change is great.
> trying to reduce ARIs...
Thanks!
--
Joel