This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos 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: redefinition of `cyg_uint32'


On Thu, May 18, 2006 at 04:43:21PM +0200, J?rgen Lambrecht wrote:
> I'm sorry, I confused #define with typedef.
> This is the correct problem description:
> 
> The problem started by using the openbsd package.

Ah, O.K. I've not compiled OpenBSD for a long time. Most people have
swapped to the FreeBSD stack.

> In ecos/packages/net/bsd_tcpip/current/include/sys/bsdtypes.h:
> 
>   typedef	unsigned int		u_int32_t;
>   typedef	unsigned int		 uint32_t;
> 
> But in ecos/packages/compat/linux/current/include/linux/types.h:
> 
> #define uint32_t cyg_uint32
> 
> So apparantly, the compiler replaces in bsdtypes.h the 'uint32_t' with 
> cyg_uint32, which becomes then redefined.
> Apparantly, because it is not possible because the same file bdstypes.h 
> contains also:
> #undef uint32_t
> 
> The compiler complains when compiling jffs2:
>   arm-elf-gcc -c  ... ecos/packages/fs/jffs2/current/src/compr.c
> And compr.h contains
>   #include <linux/types.h>
> 
> What happens when a typedefed "uint32_t" exists, follewed by #define'ing 
> it??
> Could that be the cause of problems?

Yes, this seems reasonable.

So the question is, why is sys/bsdtypes.h being included in compr.h?

   Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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