* [RFA] ARI fix: Replace dirent.h by gdb_dirent.h in linux-fork.c
@ 2007-10-08 12:34 Pierre Muller
2007-10-08 13:27 ` Mark Kettenis
0 siblings, 1 reply; 10+ messages in thread
From: Pierre Muller @ 2007-10-08 12:34 UTC (permalink / raw)
To: gdb-patches
This one is almost like the previous that fixed the wait header.
OK to commit?
Pierre Muller
ChangeLog entry:
2007-10-08 Pierre Muller <muller@ics.u-strasbg.fr>
* linux-fork.c: ARI fix: include "gdb_dirent.h" instead of
<dirent.h>.
Makefile.in (linux-fork.o): Add gdb_dirent.h dependency.
Index: linux-fork.c
===================================================================
RCS file: /cvs/src/src/gdb/linux-fork.c,v
retrieving revision 1.13
diff -u -p -r1.13 linux-fork.c
--- linux-fork.c 8 Oct 2007 07:43:42 -0000 1.13
+++ linux-fork.c 8 Oct 2007 12:27:45 -0000
@@ -27,10 +27,10 @@
#include "linux-fork.h"
#include "linux-nat.h"
#include "gdb_wait.h"
+#include "gdb_dirent.h"
#include <sys/ptrace.h>
#include <sys/param.h>
-#include <dirent.h>
#include <ctype.h>
struct fork_info *fork_list;
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.940
diff -u -p -r1.940 Makefile.in
--- Makefile.in 8 Oct 2007 07:43:42 -0000 1.940
+++ Makefile.in 8 Oct 2007 12:27:46 -0000
@@ -2236,7 +2236,7 @@ linespec.o: linespec.c $(defs_h) $(symta
$(objc_lang_h) $(linespec_h) $(exceptions_h) $(language_h)
linux-fork.o: linux-fork.c $(defs_h) $(inferior_h) $(regcache_h)
$(gdbcmd_h) \
$(infcall_h) $(gdb_assert_h) $(gdb_string_h) $(linux_fork_h) \
- $(linux_nat_h) $(gdb_wait_h)
+ $(linux_nat_h) $(gdb_wait_h) $(gdb_dirent_h)
linux-nat.o: linux-nat.c $(defs_h) $(inferior_h) $(target_h)
$(gdb_string_h) \
$(gdb_wait_h) $(gdb_assert_h) $(linux_nat_h) $(gdbthread_h) \
$(gdbcmd_h) $(regcache_h) $(regset_h) $(inf_ptrace_h) $(auxv_h) \
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA] ARI fix: Replace dirent.h by gdb_dirent.h in linux-fork.c
2007-10-08 12:34 [RFA] ARI fix: Replace dirent.h by gdb_dirent.h in linux-fork.c Pierre Muller
@ 2007-10-08 13:27 ` Mark Kettenis
2007-10-08 13:48 ` Pierre Muller
0 siblings, 1 reply; 10+ messages in thread
From: Mark Kettenis @ 2007-10-08 13:27 UTC (permalink / raw)
To: muller; +Cc: gdb-patches
> From: "Pierre Muller" <muller@ics.u-strasbg.fr>
> Date: Mon, 8 Oct 2007 14:35:01 +0200
>
> This one is almost like the previous that fixed the wait header.
>
> OK to commit?
It probably doesn't matter on Linux, but in general it is better to
leave the headers in the same order when replacing <xxx.h> with
"gdb_xxx.h".
Mark
> ChangeLog entry:
>
> 2007-10-08 Pierre Muller <muller@ics.u-strasbg.fr>
>
> * linux-fork.c: ARI fix: include "gdb_dirent.h" instead of
> <dirent.h>.
> Makefile.in (linux-fork.o): Add gdb_dirent.h dependency.
>
>
>
> Index: linux-fork.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/linux-fork.c,v
> retrieving revision 1.13
> diff -u -p -r1.13 linux-fork.c
> --- linux-fork.c 8 Oct 2007 07:43:42 -0000 1.13
> +++ linux-fork.c 8 Oct 2007 12:27:45 -0000
> @@ -27,10 +27,10 @@
> #include "linux-fork.h"
> #include "linux-nat.h"
> #include "gdb_wait.h"
> +#include "gdb_dirent.h"
>
> #include <sys/ptrace.h>
> #include <sys/param.h>
> -#include <dirent.h>
> #include <ctype.h>
>
> struct fork_info *fork_list;
> Index: Makefile.in
> ===================================================================
> RCS file: /cvs/src/src/gdb/Makefile.in,v
> retrieving revision 1.940
> diff -u -p -r1.940 Makefile.in
> --- Makefile.in 8 Oct 2007 07:43:42 -0000 1.940
> +++ Makefile.in 8 Oct 2007 12:27:46 -0000
> @@ -2236,7 +2236,7 @@ linespec.o: linespec.c $(defs_h) $(symta
> $(objc_lang_h) $(linespec_h) $(exceptions_h) $(language_h)
> linux-fork.o: linux-fork.c $(defs_h) $(inferior_h) $(regcache_h)
> $(gdbcmd_h) \
> $(infcall_h) $(gdb_assert_h) $(gdb_string_h) $(linux_fork_h) \
> - $(linux_nat_h) $(gdb_wait_h)
> + $(linux_nat_h) $(gdb_wait_h) $(gdb_dirent_h)
> linux-nat.o: linux-nat.c $(defs_h) $(inferior_h) $(target_h)
> $(gdb_string_h) \
> $(gdb_wait_h) $(gdb_assert_h) $(linux_nat_h) $(gdbthread_h) \
> $(gdbcmd_h) $(regcache_h) $(regset_h) $(inf_ptrace_h) $(auxv_h) \
>
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [RFA] ARI fix: Replace dirent.h by gdb_dirent.h in linux-fork.c
2007-10-08 13:27 ` Mark Kettenis
@ 2007-10-08 13:48 ` Pierre Muller
2007-10-08 13:59 ` Joel Brobecker
0 siblings, 1 reply; 10+ messages in thread
From: Pierre Muller @ 2007-10-08 13:48 UTC (permalink / raw)
To: 'Mark Kettenis'; +Cc: gdb-patches
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Mark Kettenis
> Sent: Monday, October 08, 2007 3:27 PM
> To: muller@ics.u-strasbg.fr
> Cc: gdb-patches@sourceware.org
> Subject: Re: [RFA] ARI fix: Replace dirent.h by gdb_dirent.h in linux-
> fork.c
>
> > From: "Pierre Muller" <muller@ics.u-strasbg.fr>
> > Date: Mon, 8 Oct 2007 14:35:01 +0200
> >
> > This one is almost like the previous that fixed the wait header.
> >
> > OK to commit?
>
> It probably doesn't matter on Linux, but in general it is better to
> leave the headers in the same order when replacing <xxx.h> with
> "gdb_xxx.h".
Maybe, but in my latest commit to linux-fork.c I did exactly
the same operation for the wait header, and moved it up from
the system <header.h> includes to the local "header.h" includes,
and Joel told me that this was the right thing to do...
See the
http://sourceware.org/ml/gdb-patches/2007-10/msg00044.html
thread.
Pierre
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA] ARI fix: Replace dirent.h by gdb_dirent.h in linux-fork.c
2007-10-08 13:48 ` Pierre Muller
@ 2007-10-08 13:59 ` Joel Brobecker
2007-10-08 14:12 ` Pierre Muller
0 siblings, 1 reply; 10+ messages in thread
From: Joel Brobecker @ 2007-10-08 13:59 UTC (permalink / raw)
To: Pierre Muller; +Cc: 'Mark Kettenis', gdb-patches
> Maybe, but in my latest commit to linux-fork.c I did exactly
> the same operation for the wait header, and moved it up from
> the system <header.h> includes to the local "header.h" includes,
> and Joel told me that this was the right thing to do...
Maybe I was wrong :-o. Seriously, the reason why I said yes at the time
is because I didn't think it would make a difference. I don't think
it will make a difference here either, but Mark's approach is less
prone to cause unexpected behavior changes.
--
Joel
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [RFA] ARI fix: Replace dirent.h by gdb_dirent.h in linux-fork.c
2007-10-08 13:59 ` Joel Brobecker
@ 2007-10-08 14:12 ` Pierre Muller
2007-10-08 14:31 ` Mark Kettenis
0 siblings, 1 reply; 10+ messages in thread
From: Pierre Muller @ 2007-10-08 14:12 UTC (permalink / raw)
To: 'Joel Brobecker'; +Cc: 'Mark Kettenis', gdb-patches
The include ordering stuff seems completely
opaque to me anyhow.
<ctype.h> is included as last in linux-fork.c,
but right after "defs.h" in breakpoint.c.
Is there any rational for this?
Anyhow, if you also agree, it is probably best to leave
the ordering exactly as it was, just to stay on the
safe side.
Should I move the gdb_wait.h include back to where wait.h was?
Pierre
> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Joel Brobecker
> Sent: Monday, October 08, 2007 3:59 PM
> To: Pierre Muller
> Cc: 'Mark Kettenis'; gdb-patches@sourceware.org
> Subject: Re: [RFA] ARI fix: Replace dirent.h by gdb_dirent.h in linux-
> fork.c
>
> > Maybe, but in my latest commit to linux-fork.c I did exactly
> > the same operation for the wait header, and moved it up from
> > the system <header.h> includes to the local "header.h" includes,
> > and Joel told me that this was the right thing to do...
>
> Maybe I was wrong :-o. Seriously, the reason why I said yes at the time
> is because I didn't think it would make a difference. I don't think
> it will make a difference here either, but Mark's approach is less
> prone to cause unexpected behavior changes.
>
> --
> Joel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA] ARI fix: Replace dirent.h by gdb_dirent.h in linux-fork.c
2007-10-08 14:12 ` Pierre Muller
@ 2007-10-08 14:31 ` Mark Kettenis
2007-10-08 14:41 ` Pierre Muller
2007-10-08 14:47 ` [RFA-v2] " Pierre Muller
0 siblings, 2 replies; 10+ messages in thread
From: Mark Kettenis @ 2007-10-08 14:31 UTC (permalink / raw)
To: muller; +Cc: brobecker, gdb-patches
> From: "Pierre Muller" <muller@ics.u-strasbg.fr>
> Date: Mon, 8 Oct 2007 16:12:45 +0200
>
> The include ordering stuff seems completely
> opaque to me anyhow.
> <ctype.h> is included as last in linux-fork.c,
> but right after "defs.h" in breakpoint.c.
> Is there any rational for this?
Other than that people have been sloppy in the past? No I don't think
so.
> Anyhow, if you also agree, it is probably best to leave
> the ordering exactly as it was, just to stay on the
> safe side.
>
> Should I move the gdb_wait.h include back to where wait.h was?
I'd prefer that; consider a patch that does that pre-approved.
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [RFA] ARI fix: Replace dirent.h by gdb_dirent.h in linux-fork.c
2007-10-08 14:31 ` Mark Kettenis
@ 2007-10-08 14:41 ` Pierre Muller
2007-10-08 14:59 ` Mark Kettenis
2007-10-08 14:47 ` [RFA-v2] " Pierre Muller
1 sibling, 1 reply; 10+ messages in thread
From: Pierre Muller @ 2007-10-08 14:41 UTC (permalink / raw)
To: 'Mark Kettenis'; +Cc: brobecker, gdb-patches
Thanks, I committed this:
ChangeLog entry:
2007-10-08 Pierre Muller <muller@ics.u-strasbg.fr>
* linux-fork.c: Move "gdb_wait.h" include back to the position of
<sys/wait.h> include before last commit.
Index: linux-fork.c
===================================================================
RCS file: /cvs/src/src/gdb/linux-fork.c,v
retrieving revision 1.13
diff -u -p -r1.13 linux-fork.c
--- linux-fork.c 8 Oct 2007 07:43:42 -0000 1.13
+++ linux-fork.c 8 Oct 2007 14:37:57 -0000
@@ -26,9 +26,9 @@
#include "gdb_string.h"
#include "linux-fork.h"
#include "linux-nat.h"
-#include "gdb_wait.h"
#include <sys/ptrace.h>
+#include "gdb_wait.h"
#include <sys/param.h>
#include <dirent.h>
#include <ctype.h>
> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Mark Kettenis
> Sent: Monday, October 08, 2007 4:30 PM
> To: muller@ics.u-strasbg.fr
> Cc: brobecker@adacore.com; gdb-patches@sourceware.org
> Subject: Re: [RFA] ARI fix: Replace dirent.h by gdb_dirent.h in linux-
> fork.c
>
> > From: "Pierre Muller" <muller@ics.u-strasbg.fr>
> > Date: Mon, 8 Oct 2007 16:12:45 +0200
> >
> > The include ordering stuff seems completely
> > opaque to me anyhow.
> > <ctype.h> is included as last in linux-fork.c,
> > but right after "defs.h" in breakpoint.c.
> > Is there any rational for this?
>
> Other than that people have been sloppy in the past? No I don't think
> so.
>
> > Anyhow, if you also agree, it is probably best to leave
> > the ordering exactly as it was, just to stay on the
> > safe side.
> >
> > Should I move the gdb_wait.h include back to where wait.h was?
>
> I'd prefer that; consider a patch that does that pre-approved.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [RFA-v2] ARI fix: Replace dirent.h by gdb_dirent.h in linux-fork.c
2007-10-08 14:31 ` Mark Kettenis
2007-10-08 14:41 ` Pierre Muller
@ 2007-10-08 14:47 ` Pierre Muller
1 sibling, 0 replies; 10+ messages in thread
From: Pierre Muller @ 2007-10-08 14:47 UTC (permalink / raw)
To: 'Mark Kettenis'; +Cc: brobecker, gdb-patches
Following Mark's remarks about the dangers of changing the order
of the include files, I resubmit the patch without changing the order
of includes.
Ok to commit?
Pierre
ChangeLog entry:
2007-10-08 Pierre Muller <muller@ics.u-strasbg.fr>
* linux-fork.c: ARI fix: include "gdb_dirent.h" instead of
<dirent.h>.
Makefile.in (linux-fork.o): Add gdb_dirent.h dependency.
Index: linux-fork.c
===================================================================
RCS file: /cvs/src/src/gdb/linux-fork.c,v
retrieving revision 1.14
diff -u -p -r1.14 linux-fork.c
--- linux-fork.c 8 Oct 2007 14:40:42 -0000 1.14
+++ linux-fork.c 8 Oct 2007 14:42:49 -0000
@@ -30,7 +30,7 @@
#include <sys/ptrace.h>
#include "gdb_wait.h"
#include <sys/param.h>
-#include <dirent.h>
+#include "gdb_dirent.h"
#include <ctype.h>
struct fork_info *fork_list;
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.940
diff -u -p -r1.940 Makefile.in
--- Makefile.in 8 Oct 2007 07:43:42 -0000 1.940
+++ Makefile.in 8 Oct 2007 14:42:50 -0000
@@ -2236,7 +2236,7 @@ linespec.o: linespec.c $(defs_h) $(symta
$(objc_lang_h) $(linespec_h) $(exceptions_h) $(language_h)
linux-fork.o: linux-fork.c $(defs_h) $(inferior_h) $(regcache_h)
$(gdbcmd_h) \
$(infcall_h) $(gdb_assert_h) $(gdb_string_h) $(linux_fork_h) \
- $(linux_nat_h) $(gdb_wait_h)
+ $(linux_nat_h) $(gdb_wait_h) $(gdb_dirent_h)
linux-nat.o: linux-nat.c $(defs_h) $(inferior_h) $(target_h)
$(gdb_string_h) \
$(gdb_wait_h) $(gdb_assert_h) $(linux_nat_h) $(gdbthread_h) \
$(gdbcmd_h) $(regcache_h) $(regset_h) $(inf_ptrace_h) $(auxv_h) \
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA] ARI fix: Replace dirent.h by gdb_dirent.h in linux-fork.c
2007-10-08 14:41 ` Pierre Muller
@ 2007-10-08 14:59 ` Mark Kettenis
2007-10-08 15:10 ` Pierre Muller
0 siblings, 1 reply; 10+ messages in thread
From: Mark Kettenis @ 2007-10-08 14:59 UTC (permalink / raw)
To: muller; +Cc: brobecker, gdb-patches
> From: "Pierre Muller" <muller@ics.u-strasbg.fr>
> Date: Mon, 8 Oct 2007 16:41:35 +0200
>
> Thanks, I committed this:
>
> ChangeLog entry:
> 2007-10-08 Pierre Muller <muller@ics.u-strasbg.fr>
>
> * linux-fork.c: Move "gdb_wait.h" include back to the position of
> <sys/wait.h> include before last commit.
Thanks!
Oh, and changing <dirent.h> into "gdb_dirent.h" is ok too.
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [RFA] ARI fix: Replace dirent.h by gdb_dirent.h in linux-fork.c
2007-10-08 14:59 ` Mark Kettenis
@ 2007-10-08 15:10 ` Pierre Muller
0 siblings, 0 replies; 10+ messages in thread
From: Pierre Muller @ 2007-10-08 15:10 UTC (permalink / raw)
To: 'Mark Kettenis'; +Cc: brobecker, gdb-patches
Thanks,
with your approval, I committed version2 of the patch.
http://sourceware.org/ml/gdb-patches/2007-10/msg00156.html
Pierre
> -----Original Message-----
> From: Mark Kettenis [mailto:mark.kettenis@xs4all.nl]
> Sent: Monday, October 08, 2007 4:59 PM
> To: muller@ics.u-strasbg.fr
> Cc: brobecker@adacore.com; gdb-patches@sourceware.org
> Subject: Re: [RFA] ARI fix: Replace dirent.h by gdb_dirent.h in linux-
> fork.c
>
> > From: "Pierre Muller" <muller@ics.u-strasbg.fr>
> > Date: Mon, 8 Oct 2007 16:41:35 +0200
> >
> > Thanks, I committed this:
> >
> > ChangeLog entry:
> > 2007-10-08 Pierre Muller <muller@ics.u-strasbg.fr>
> >
> > * linux-fork.c: Move "gdb_wait.h" include back to the
> position of
> > <sys/wait.h> include before last commit.
>
> Thanks!
>
> Oh, and changing <dirent.h> into "gdb_dirent.h" is ok too.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-10-08 15:10 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-08 12:34 [RFA] ARI fix: Replace dirent.h by gdb_dirent.h in linux-fork.c Pierre Muller
2007-10-08 13:27 ` Mark Kettenis
2007-10-08 13:48 ` Pierre Muller
2007-10-08 13:59 ` Joel Brobecker
2007-10-08 14:12 ` Pierre Muller
2007-10-08 14:31 ` Mark Kettenis
2007-10-08 14:41 ` Pierre Muller
2007-10-08 14:59 ` Mark Kettenis
2007-10-08 15:10 ` Pierre Muller
2007-10-08 14:47 ` [RFA-v2] " Pierre Muller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox