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
diff --git a/libc/stdio/local.h b/libc/stdio/local.h
index eecfeef..5fb2292 100644
--- a/libc/stdio/local.h
+++ b/libc/stdio/local.h
@@ -32,15 +32,15 @@
* SUCH DAMAGE.
*/
-#include "wcio.h"
-#include "fileext.h"
-
-
/*
* Information local to this implementation of stdio,
* in particular, macros and private variables.
*/
+#include <wchar.h>
+#include "wcio.h"
+#include "fileext.h"
+
int __sflush(FILE *);
int __sflush_locked(FILE *);
FILE *__sfp(void);
@@ -56,7 +56,12 @@
int _fwalk(int (*)(FILE *));
int __swsetup(FILE *);
int __sflags(const char *, int *);
+wint_t __fgetwc_unlock(FILE *);
+wint_t __ungetwc(wint_t, FILE *);
int __vfprintf(FILE *, const char *, __va_list);
+int __svfscanf(FILE * __restrict, const char * __restrict, __va_list);
+int __vfwprintf(FILE * __restrict, const wchar_t * __restrict, __va_list);
+int __vfwscanf(FILE * __restrict, const wchar_t * __restrict, __va_list);
/*
* Function to clean up streams, called from abort() and exit().