This is the mail archive of the
mailing list for the newlib project.
Re: Sebastian's Patches Committed
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>, newlib at sourceware dot org
- Cc: joel dot sherrill at oarcorp dot com, chrisj at rtems dot org
- Date: Sat, 26 Oct 2013 15:44:38 +0200
- Subject: Re: Sebastian's Patches Committed
- Authentication-results: sourceware.org; auth=none
- References: <201310252120 dot r9PLKlDJ007163 at ignucius dot se dot axis dot com>
On 10/25/2013 11:20 PM, Hans-Peter Nilsson wrote:
From: Hans-Peter Nilsson<email@example.com>
>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
<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 : firstname.lastname@example.org
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.