Missing datatypes in lib/include/machine/types.h ?
Mike Siers
mikes at poliac.com
Sat Dec 1 03:41:30 UTC 2001
Hi Ralf,
Sorry for the bad return e-mail address (user error with KMail).
The source code is actually including <inttypes.h>. This file
then pulls in <machine/types.h> to get the typedefs (at least
that is how it works under OpenBSD). I did not look into what
RTEMS has defined in <inttypes.h>.
I have added the missing types to the software's code but I just
wanted to check to see if these types should really be defined
in RTEMS.
Thanks for the info,
Mike Siers
-----Original Message-----
From: Ralf Corsepius [mailto:corsepiu at faw.uni-ulm.de]
Sent: Friday, November 30, 2001 7:05 PM
To: Charlie &
Cc: rtems-users at OARcorp.com
Subject: Re: Missing datatypes in lib/include/machine/types.h ?
Am Sam, 2001-12-01 um 00.02 schrieb Charlie &:
>
> Hi,
> I am porting some UNIX C code to work under RTEMS. The software is
> expecting the following typedefs in lib/include/machine/types.h:
>
> typedef unsigned char uint8_t;
> typedef unsigned short uint16_t;
> typedef unsigned int uint32_t;
> typedef unsigned long long uint64_t;
>
> I see that the OpenBSD version of this file does define these values
> but the RTEMS version only has the u_intXX_t versions. Should
> the RTEMS version be updated into include the above typedefs or
> are these not standard datatypes?
AFAIK, these are ISOC99 types and are supposed to be defined in stdint.h
and to be included into sources via stdint.h or inttypes.h (normally
implictly includes stdint.h).
Apparently, newlib is not ISOC99-ready. As a work-around, we could
either provide a stdint.h with RTEMS or try to get it properly
introduced into newlib.
Anyway, if the code your are trying to compile is expecting these typesm
in machine/types.h, it is bugged (machine/*.h should not be accessed
directly and is not standardized at all) or probably relies on a
BSD-proprietary feature.
Ralf
More information about the users
mailing list