bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PATCH: fix gcc bug and big-endian issues for GPT


From: Richard Hirst
Subject: Re: PATCH: fix gcc bug and big-endian issues for GPT
Date: Fri, 5 Apr 2002 22:17:37 +0100
User-agent: Mutt/1.3.24i

On Fri, Apr 05, 2002 at 09:39:20AM +0100, Richard Hirst wrote:
> > (BTW: what do you think of the 1.6 implementation?)
> 
> Sorry, apart for noting how different it was, I havn't really looked
> closely yet.  Seems 1.6.0-pre3 was the last version tried by the debian
> buildds on ia64, and that failed to build, as I mentioned before.  Don't
> know if those problems are resolved yet.

Just checked out 1.6.0-pre7, and it still doesn't build on ia64:

> gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include     -D_REENTRANT 
> -D_FILE_OFFSET_BITS=no -DLOCALEDIR="\"/usr/local/share/locale\"" 
> -DLOCALEDIR="\"/usr/local/share/locale\"" -W -Wall -Wno-unused -Wno-switch 
> -Wno-format -Werror -c ui.c
> cc1: warnings being treated as errors
> In file included from /usr/include/asm/fpu.h:9,
>                  from /usr/include/bits/sigcontext.h:27,
>                  from /usr/include/signal.h:307,
>                  from ui.c:24:
> /usr/include/asm/types.h:32: warning: redefinition of `int8_t'
> /usr/include/sys/types.h:190: warning: `int8_t' previously declared here
> /usr/include/asm/types.h:33: warning: redefinition of `u_int8_t'
> /usr/include/sys/types.h:196: warning: `u_int8_t' previously declared here
> /usr/include/asm/types.h:35: warning: redefinition of `int16_t'
> /usr/include/sys/types.h:191: warning: `int16_t' previously declared here
> /usr/include/asm/types.h:36: warning: redefinition of `u_int16_t'
> /usr/include/sys/types.h:197: warning: `u_int16_t' previously declared here
> /usr/include/asm/types.h:38: warning: redefinition of `int32_t'
> /usr/include/sys/types.h:192: warning: `int32_t' previously declared here
> /usr/include/asm/types.h:39: warning: redefinition of `u_int32_t'
> /usr/include/sys/types.h:198: warning: `u_int32_t' previously declared here
> /usr/include/asm/types.h:41: warning: redefinition of `int64_t'
> /usr/include/sys/types.h:193: warning: `int64_t' previously declared here
> /usr/include/asm/types.h:42: warning: redefinition of `u_int64_t'
> /usr/include/sys/types.h:199: warning: `u_int64_t' previously declared here
> make[2]: *** [ui.o] Error 1
> make[2]: Leaving directory `/build/parted/x/parted-1.6.0-pre7/parted'


(doesn't build on anything, due to the /parted-dev/ issue Timshel
pointed out, but I worked round that).

My interpretation of this problem is that configure decides that __s8 is
not defined, so it adds

> #define __s8 int8_t

to config.h.  Now, when asm/types.h gets pulled in, the line

> typedef __signed__ char __s8;

gets pre-processed in to another typedef for int8_t, hence the above error.

On i386 it isn't a problem because asm/types.h never gets pulled in
while building ui.c, but on ia64 it does get pulled in via signal.h.

So, on ia64 I can get the code to build by adding these lines to ui.c,
but that's pretty ugly.

  #include <ctype.h>
+ #undef __s8
+ #undef __u8
+ #undef __s16
+ #undef __u16
+ #undef __s32
+ #undef __u32
+ #undef __s64
+ #undef __u64
  #include <signal.h>


Found the following comment from asm/types.h:

/*
 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
 * header files exported to user space
 */

Implies that perhaps parted shouldn't be defining __xx?  I'm out of my
depth here though, hopefully someone with a better understanding can
comment.  I expected sys/types.h to pull in asm/types.h, but it doesn't.
I have libc 2.2.5-3 on both platforms.

Richard




reply via email to

[Prev in Thread] Current Thread [Next in Thread]