Switch to the OpenBSD implementations of the wide scanf functions.

This also gets us the C99 wcstoimax and wcstoumax, and a working fgetwc and
ungetwc, all of which are needed in the implementation.

This also brings several other files closer to upstream.

Change-Id: I23b025a8237a6dbb9aa50d2a96765ea729a85579
This commit is contained in:
Elliott Hughes
2014-04-29 16:28:56 -07:00
parent c6e563c87a
commit 01ae00f317
20 changed files with 1352 additions and 71 deletions

View File

@@ -38,3 +38,11 @@ TEST(inttypes, misc) {
sscanf(buf, "%08" SCNuPTR, &u);
sscanf(buf, "%08" SCNxPTR, &u);
}
TEST(inttypes, wcstoimax) {
ASSERT_EQ(123, wcstoimax(L"123", NULL, 10));
}
TEST(inttypes, wcstoumax) {
ASSERT_EQ(123U, wcstoumax(L"123", NULL, 10));
}