This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Re: stdint definitions
Tarmo Kuuse wrote:
On 04.08.2010 12:06, Manuel Borchers wrote:
install/include/sys/bsdtypes.h:37: error: redefinition of typedef
âint16_tâ
install/include/stdint.h:109: error: previous declaration of âint16_tâ
was here
I vaguely remember wrestling similar errors a while back. I don't
remember the specifics, but these definitions do clash unless included
within some higher level header. E.g. avoid #including bsdtypes.h; try
network.h instead. Perhaps something similar applies to stdint.h.
Sorry for vague answer, perhaps someone wiser can elaborate.
I have also been wrestling with this issue. To make things worse, my gcc
happens also to have a stdint.h.
I think the solution for this is to have a stdint.h in
isoinfra/current/include/ that defines all appropriate types and limits.
The definitions in bsdtypes.h should be replaced with #include
<stdint.h> -- I think they have no place in a network package (or a
device package or an io package or whatever). This is what I did in my
eCos mirror repository, and I think eCos should provide a workable
solution for the fixed-width integer types.
Concerning network.h: funny you mention that, because I was bitten by
that too. I have another package that also has an include file
network.h, also at its top level. It would be much better if eCos had
its network.h as include/cyg/network.h or whatever, and not in the
top-level include "name space". The same holds for that other package of
course.
Rutger Hofman
VU Amsterdam
http://www.rfidguardian.org
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss