This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH] Update newlib so that it passes libc++'s tests
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: newlib at sourceware dot org
- Date: Tue, 17 Dec 2013 09:01:12 +0100
- Subject: Re: [PATCH] Update newlib so that it passes libc++'s tests
- Authentication-results: sourceware.org; auth=none
- References: <CABdywOcnSpU=r5NGDDzhea4gxALh8LRL4A9vRY31wFjLhtF5zA at mail dot gmail dot com>
On 2013-12-17 01:54, JF Bastien wrote:
Fix issues that LLVM's libc++ test suite finds when setting newlib as
the C library:
- limits.h: define LLONG_MIN, LLONG_MAX and ULLONG_MAX for C++11 too.
- stdint.h: define WCHAR_MIN and WCHAR_MAX according to
__WCHAR_UNSIGNED__ if it is provided, and correct the limit when
unsigned (to 32 all-1 bits, not 31). Make sure stdint.h and wchar.h
are in sync.
- stdint.h: similarly for WINT_MIN and WINT_MAX according to
__WINT_UNSIGNED__.
- stdlib.h: define struct lldiv_t, _Exit, atoll, llabs and lldiv for
C99 and C++11.
- stdlib.h: move wcstold to wchar.h.
- wchar.h: define WCHAR_MIN and WCHAR_MAX according to
__WCHAR_UNSIGNED__ if it is provided, and correct the limit when
unsigned (to 32 all-1 bits, not 31). Make sure stdint.h and wchar.h
are in sync.
- wchar.h: define file as in stdio.h.
- stdlib.h: move wcstold from stdlib.h.
Note that libc++ also needs changes to adapt to newlib's C flavor, I'm
sending a separate patch to thecfe-commits@cs.uiuc.edu mailing list.
Recent GCC have built-in defines:
#define __WCHAR_TYPE__ long int
#define __WCHAR_MAX__ 2147483647L
#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1)
Maybe we can use them if available. Does LLVM also provide such built-in defines?
--
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 : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.