public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Jurgen Lambrecht <Jurgen.Lambrecht@tiscali.be>
To: Andrew Lunn <andrew@lunn.ch>
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] redefinition of `cyg_uint32'
Date: Thu, 18 May 2006 21:40:00 -0000	[thread overview]
Message-ID: <446CE91A.20105@tiscali.be> (raw)
In-Reply-To: <20060518145419.GD11223@lunn.ch>

Andrew Lunn wrote:
> 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.
>   
I just need a ftp server, LWIP does not have it. I will also swap to 
FreeBSD.
>   
>> 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
>   
I followed the compiler trace, and this is the answer:

  #if !defined(_POSIX_SOURCE)
  # if CYGINT_ISO_BSDTYPES
  #  ifdef CYGBLD_ISO_BSDTYPES_HEADER
  #   include CYGBLD_ISO_BSDTYPES_HEADER
  #  endif
  # endif
  #endif // !defined(_POSIX_SOURCE)

 From isoinfra/current/include/sys/types.h:112

This is the trace:

In file included from 
/ecos-c/version/vcs/c/ims/std_ims/build/ecos_ims/install/include/sys/bsdtypes.h:80,
->net/bsd_tcpip/current/include/sys/bsdtypes.h
                 from 
/ecos-c/version/vcs/c/ims/std_ims/build/ecos_ims/install/include/sys/types.h:112,
->isoinfra/current/include/sys/types.h
                 from 
/ecos-c/version/vcs/c/ims/std_ims/build/ecos_ims/install/include/sys/stat.h:69,
->isoinfra/current/include/sys/stat.h
                 from 
/ecos-c/version/vcs/c/ims/std_ims/build/ecos_ims/install/include/linux/stat.h:5,
->compat/linux/current/include/linux/stat.h
                 from 
/ecos-c/version/vcs/c/ims/std_ims/build/ecos_ims/install/include/linux/fs.h:4,
->compat/linux/current/include/linux/fs.h
                 from 
/ecos-c/version/vcs/c/ims/std_ims/ecos/packages/fs/jffs2/current/src/compr.h:24,
->fs/jffs2/current/src/compr.h
                 from 
/ecos-c/version/vcs/c/ims/std_ims/ecos/packages/fs/jffs2/current/src/compr.c:16:
/ecos-c/version/vcs/c/ims/std_ims/build/ecos_ims/install/include/machine/types.h:41: 
redefinition of `cyg_int8'
/ecos-c/version/vcs/c/ims/std_ims/build/ecos_ims/install/include/cyg/infra/cyg_type.h:203: 
`cyg_int8' previously declared here

Kind regards,
Juergen Lambrecht


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

  reply	other threads:[~2006-05-18 21:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-17 15:07 Juergen Lambrecht
2006-05-17 15:58 ` Andrew Lunn
2006-05-18  2:59   ` [ECOS] error building ecos application for LEON Agus Ariffianto
2006-05-18 14:45   ` [ECOS] redefinition of `cyg_uint32' Jürgen Lambrecht
2006-05-18 14:54     ` Andrew Lunn
2006-05-18 21:40       ` Jurgen Lambrecht [this message]
2006-05-23  8:23       ` [ECOS] Patch for " Juergen Lambrecht
2006-05-23  8:25         ` [ECOS] " Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=446CE91A.20105@tiscali.be \
    --to=jurgen.lambrecht@tiscali.be \
    --cc=andrew@lunn.ch \
    --cc=ecos-discuss@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).