This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Support newlib as libc++'s C library
AbandonedPublic

Authored by jroelofs on Sep 17 2014, 8:47 AM.

Diff Detail

Event Timeline

jroelofs updated this revision to Diff 13788.Sep 17 2014, 8:47 AM
jroelofs retitled this revision from to [libc++] Support newlib as libc++'s C library.
jroelofs updated this object.
jroelofs edited the test plan for this revision. (Show Details)
jroelofs added reviewers: danalbert, jfb.
jroelofs added a reviewer: mclow.lists.
jroelofs added a subscriber: Unknown Object (MLST).
jroelofs added inline comments.Sep 17 2014, 8:58 AM
include/__locale
88

These belong in libcxx/include/support/newlib/xlocale.h

src/locale.cpp
53

These belong in src/support/newlib/locale.cpp

1052

@danalbert and I came to the conclusion earlier that implementing classic_table via newlib's _ctype_ isn't a conforming implementation because the mask it contains is not a simple bitmask, and the way do_is/scan_is are worded in the standard it leads to a contradiction if ctype's mask isn't a simple bitmask. I think we're going to need a separate table just for this that lives in src/support.

thakis added a subscriber: thakis.Sep 17 2014, 10:51 AM
thakis added inline comments.
include/__locale
34

Is it possible to add this in newlib instead?

jfb added inline comments.Sep 17 2014, 10:58 AM
include/__locale
34

These are extensions to C:

http://pubs.opengroup.org/onlinepubs/9699919799/functions/isxdigit.html

I don't think they necessarily belong in newlib, but I didn't try having the conversation upstream. They were receptive to my patches (see ~December 2013), but I talked to Roland McGrath before making changes to make sure someone better versed in C libraries agreed with the changes I was proposing (and what should be fixed in newlib versus libc++).

jroelofs abandoned this revision.Sep 17 2014, 11:04 AM

FYI I'm forking this review 3-ways. Here's the first patch: http://reviews.llvm.org/D5385