On Fri, Apr 12, 2002 at 12:12:12PM -0400, Mike Barcroft wrote: > Ruslan Ermilov <[EMAIL PROTECTED]> writes: > > I see the same breakage here. > > > > The breakage has nothing to do with -Werror. Recent commit by > > Mike Barcroft to sys/*/endian.h is the culprit. > > > > But the actual problem is with gdb. After a lot of experimenting > > I've found that contrib/gdb.291/gdb/defs.h includes "nm.h" > > (gnu/usr.bin/binutils/gdb/${MACHINE_ARCH}/nm.h) which are too > > different between i386 and alpha. In the i386 case, "nm.h" > > includes <sys/types.h> which exposes __BSD_VISIBLE (see how > > these affect the *_ENDIAN macros in sys/*/endian.h). But not > > in the alpha case. Applying this patch exposes the same bug > > on i386: > > > [...] > > David added <sys/types.h> to src/gnu/usr.bin/binutils/gdb/alpha/nm.h > 19 hours ago, so the problem should no longer exist. I won't know for > another three hours (when my alpha is finished buildworld). > Heh, while I started looking at it, there was no this commit message in my mailbox yet. :-)
I'm sure you realize that this commit fixed the breakage as a side effect, and now the defs.h bug is hidden the same way as for i386. > > The solution is to fix defs.h: > > > > %%% > > Index: defs.h > > =================================================================== > > RCS file: /home/ncvs/src/contrib/gdb.291/gdb/defs.h,v > > retrieving revision 1.3 > > diff -u -p -r1.3 defs.h > > --- defs.h 11 Apr 2001 16:15:19 -0000 1.3 > > +++ defs.h 12 Apr 2002 13:53:37 -0000 > > @@ -841,6 +841,8 @@ extern void free (); > > > > #ifdef HAVE_ENDIAN_H > > #include <endian.h> > > +#else > > +#include <sys/types.h> > > #endif > > > > #if !defined (BIG_ENDIAN) > > %%% > > I think <machine/endian.h> would be better here. It may not have > worked because of the missing <sys/cdefs.h> issue. > Yes, definitely this is better, now that you've fixed endian.h's. The optimal solution IMO is to introduce HAVE_MACHINE_ENDIAN_N. <endian.h> is pretty non-standard. Cheers, -- Ruslan Ermilov Sysadmin and DBA, [EMAIL PROTECTED] Sunbay Software AG, [EMAIL PROTECTED] FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age
msg37187/pgp00000.pgp
Description: PGP signature