This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 3/7] Add stdint.h wrapper for VxWorks.
On 06/12/2012 04:20 PM, Joseph S. Myers wrote:
On Tue, 12 Jun 2012, rbmj wrote:
On 06/12/2012 11:47 AM, Joseph S. Myers wrote:
On Wed, 6 Jun 2012, rbmj wrote:
The stdint.h doesn't have all the typedefs needed for standards
compliance, so add a hack that adds all of the needed typedefs
to be fully compliant to the standard. Fixes broken libstdc++.
If you're touching VxWorks stdint.h perhaps you could also define the
relevant target macros for GCC to have built-in knowledge of the types?
This is needed for the Fortran C bindings to work correctly, at least, and
ensures char16_t and char32_t (C11/C++11) are correct as well. (You could
then set use_gcc_stdint to "wrap" in config.gcc if you want to use GCC's
stdint.h for freestanding compilations.)
I would be happy to, but I'm not aware of what macros those are. If you could
point me to some documentation or explain to me what macros I need to define
I'll update the patch.
<http://gcc.gnu.org/ml/gcc/2009-04/msg00000.html> was my original
announcement for target OS maintainers. You should define the same set of
macros as in gcc/config/glibc-stdint.h (but, obviously, to values
appropriate to VxWorks), plus INTMAX_TYPE and UINTMAX_TYPE if the default
values of those macros are wrong for VxWorks, and make sure all the
c99-stdint-*.c tests pass.
Since u?int.*_t are already defined, would this work? Or should I use
the non-typedef'd versions? Also, I'm not exactly sure how to run the
regression tests with a cross compiler. I'm still new to everything,
bear with me :-)
#define SIG_ATOMIC_TYPE "int"
#define INT8_TYPE "int8_t"
#define INT16_TYPE "int16_t"
#define INT32_TYPE "int32_t"
#define INT64_TYPE "int64_t"
#define UINT8_TYPE "uint8_t"
#define UINT16_TYPE "uint16_t"
#define UINT32_TYPE "uint32_t"
#define UINT64_TYPE "uint64_t"
#define INT_LEAST8_TYPE "int_least8_t"
#define INT_LEAST16_TYPE "int_least16_t"
#define INT_LEAST32_TYPE "int_least32_t"
#define INT_LEAST64_TYPE "int_least64_t"
#define UINT_LEAST8_TYPE "uint_least8_t"
#define UINT_LEAST16_TYPE "uint_least16_t"
#define UINT_LEAST32_TYPE "uint_least32_t"
#define UINT_LEAST64_TYPE "uint_least64_t"
#define INT_FAST8_TYPE "int_fast8_t"
#define INT_FAST16_TYPE "int_fast16_t"
#define INT_FAST32_TYPE "int_fast32_t"
#define INT_FAST64_TYPE "int_fast64_t"
#define UINT_FAST8_TYPE "uint_fast8_t"
#define UINT_FAST16_TYPE "uint_fast16_t"
#define UINT_FAST32_TYPE "uint_fast32_t"
#define UINT_FAST64_TYPE "uint_fast64_t"
#define INTPTR_TYPE "intptr_t"
#define UINTPTR_TYPE "uintptr_t"
Robert