This is the mail archive of the mailing list for the newlib project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Harmonize stdint.h and _default_types.h

On 2013-12-03 15:38, Hans-Peter Nilsson wrote:
From: Corinna Vinschen <>
Date: Tue, 3 Dec 2013 15:11:15 +0100

this patch looks good to me.  Hans-Peter, would you mind to have a look
as well?

Thanks.  These look odd:

+++ b/newlib/libc/include/stdint.h

+#ifdef INT8_C
+#define INT8_C(x) __INT8_C(x)
+#define UINT8_C(x) __UINT8_C(x)
  #define INT8_C(x)	x
  #if __STDINT_EXP(INT_MAX) > 0x7f
  #define UINT8_C(x)	x
  #define UINT8_C(x)	x##U

It doesn't look like you want to redefine INT8_C (in which case
better #undef it) but rather like you meant "#ifdef __INT8_C"
for the first line.

Oh, thanks for spotting this.  I will update the patch.

Same for the other *_C variants, except for INTMAX_C
(__INTMAX_C) where it is as expected.

Otherwise, nothing suspicious besides the include stdint.h in
libc/sys/rtems/machine/_types.h, but which the comment says is a
conscious choice.

FreeBSD includes <sys/_stdint.h> in <sys/types.h>. Which defines the C99 fixed integer types (only the types, not the MIN/MAX etc. defines) depending on a define guard for every type.

As I first step I added this hack for RTEMS only (it preserves the existing situation). The GCC test suite results are all right on ARM and PowerPC with these patches.

Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  :
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]