This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [RFC] ARI fix: Replace sys/wait.h by gdb_wait.h in linux-fork.c


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


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