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: Sebastian's Patches Committed

On 10/25/2013 11:20 PM, Hans-Peter Nilsson wrote:
From: Hans-Peter Nilsson<>
>Date: Fri, 25 Oct 2013 21:19:02 +0200
>Maybe make use of those __INT<X>_TYPE__-like macros defined in
>recent gcc when defining the __int<x>_t-line macros in
>_default_types.h.  Perhaps it's even ok to just do that and, as
>a fallback only, cheat and include stdint.h, if
>e.g. __UINT32_TYPE__ isn't defined.;)
No task being too simple, here's a patch to do that.  It also
doesn't define __*int_least*_t types for those optional types
unless they're provided, fixing a further buglet when including
stdint.h which would make a difference only if it's actually
possible to use a non-newlib-stdint.h from within newlib.  A gcc
build of cris-elf succeeds and has passed the earlier gcc
test-suite point of failure.  Assuming no regressions, is this
ok to check in?

Or would you prefer the other way, putting the corresponding
part of libc/include/stdint.h here and making
libc/include/stdint.h include <machine/_default_types.h>?

Yes, I would move the type definitions currently done in Newlib <stdint.h> to
<machine/_default_types.h> and simply use

typedef __XXX_t XXX_t;

in <stdint.h>. The new <machine/_default_types.h> should also use GCCs built-in defines for the standard types.

This helps to clean up <sys/cdefs.h> as well, since it includes currently also <stdint.h>.

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]