Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Include "defs.h" before other includes, for vec.c
@ 2006-09-29 20:32 Fred Fish
  2006-09-29 20:57 ` Daniel Jacobowitz
  2006-09-29 21:30 ` Mark Kettenis
  0 siblings, 2 replies; 3+ messages in thread
From: Fred Fish @ 2006-09-29 20:32 UTC (permalink / raw)
  To: GDB Patches

This fixes a problem on solaris, where vec.h causes types.h to be pulled in,
but since _SYSCALL32 hasn't been defined yet (by config.h), off32_t doesn't
get defined.  Then later, defs.h pulls in config.h, which defines _SYSCALL32,
and also causes fcntl.h to be pulled in, which sees _SYSCALL32 and tries
to use off32_t, which isn't defined.


2006-09-29  Fred Fish  <fnf@specifix.com>

	* vec.c: Include defs.h first.  This pulls in config.h which can
	affect other includes.

Index: gdb/gdb/vec.c
===================================================================
RCS file: /services/cvs/cvsroot/latest/gdb/gdb/vec.c,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 vec.c
--- gdb/gdb/vec.c	25 Sep 2006 02:04:53 -0000	1.1.2.1
+++ gdb/gdb/vec.c	29 Sep 2006 20:25:22 -0000
@@ -19,8 +19,8 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.  */
 
-#include "vec.h"
 #include "defs.h"
+#include "vec.h"
 
 struct vec_prefix
 {


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Include "defs.h" before other includes, for vec.c
  2006-09-29 20:32 Include "defs.h" before other includes, for vec.c Fred Fish
@ 2006-09-29 20:57 ` Daniel Jacobowitz
  2006-09-29 21:30 ` Mark Kettenis
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2006-09-29 20:57 UTC (permalink / raw)
  To: Fred Fish; +Cc: GDB Patches

On Fri, Sep 29, 2006 at 01:31:42PM -0700, Fred Fish wrote:
> This fixes a problem on solaris, where vec.h causes types.h to be pulled in,
> but since _SYSCALL32 hasn't been defined yet (by config.h), off32_t doesn't
> get defined.  Then later, defs.h pulls in config.h, which defines _SYSCALL32,
> and also causes fcntl.h to be pulled in, which sees _SYSCALL32 and tries
> to use off32_t, which isn't defined.
> 
> 
> 2006-09-29  Fred Fish  <fnf@specifix.com>
> 
> 	* vec.c: Include defs.h first.  This pulls in config.h which can
> 	affect other includes.

Oops.  OK, and thanks.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Include "defs.h" before other includes, for vec.c
  2006-09-29 20:32 Include "defs.h" before other includes, for vec.c Fred Fish
  2006-09-29 20:57 ` Daniel Jacobowitz
@ 2006-09-29 21:30 ` Mark Kettenis
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Kettenis @ 2006-09-29 21:30 UTC (permalink / raw)
  To: fnf; +Cc: gdb-patches

> From: Fred Fish <fnf@specifix.com>
> Date: Fri, 29 Sep 2006 13:31:42 -0700
> 
> This fixes a problem on solaris, where vec.h causes types.h to be pulled in,
> but since _SYSCALL32 hasn't been defined yet (by config.h), off32_t doesn't
> get defined.  Then later, defs.h pulls in config.h, which defines _SYSCALL32,
> and also causes fcntl.h to be pulled in, which sees _SYSCALL32 and tries
> to use off32_t, which isn't defined.

Heh, I just ran into this today.  please commit if you didn't do so
already.

> 2006-09-29  Fred Fish  <fnf@specifix.com>
> 
> 	* vec.c: Include defs.h first.  This pulls in config.h which can
> 	affect other includes.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-09-29 21:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-29 20:32 Include "defs.h" before other includes, for vec.c Fred Fish
2006-09-29 20:57 ` Daniel Jacobowitz
2006-09-29 21:30 ` Mark Kettenis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox