Commit 1e5df6a8 authored by Alessandro Rubini's avatar Alessandro Rubini

inttypes.h: fix problems with newer gcc/newlib

When testing with newer compilers and newlib, a mismatch surfaced in
the definition of intptr_t, int32_t, uint32_t.  I don't know why the
library header gets picked up.

This patch, though ugly, fixes the problem by using the "ifdef" names
found in lm32-elf/include/sys/_stdint.h (the offending file).
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 1b0b0dfc
......@@ -3,15 +3,24 @@
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
#ifndef _UINT32_T_DECLARED
typedef unsigned int uint32_t;
#define _UINT32_T_DECLARED
#endif
typedef unsigned long long uint64_t;
typedef signed char int8_t;
typedef signed short int16_t;
#ifndef _INT32_T_DECLARED
typedef signed int int32_t;
#define _INT32_T_DECLARED
#endif
typedef signed long long int64_t;
#ifndef _INTPTR_T_DECLARED
typedef unsigned long intptr_t;
#define _INTPTR_T_DECLARED
#endif
#define UINT32_MAX 4294967295U
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment