projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove LFS64 programming interfaces (macro-only) from _GNU_SOURCE
[musl]
/
src
/
stdlib
/
wcstol.c
diff --git
a/src/stdlib/wcstol.c
b/src/stdlib/wcstol.c
index
3d7c97d
..
1eeb495
100644
(file)
--- a/
src/stdlib/wcstol.c
+++ b/
src/stdlib/wcstol.c
@@
-1,6
+1,10
@@
#include "stdio_impl.h"
#include "intscan.h"
#include "shgetc.h"
#include "stdio_impl.h"
#include "intscan.h"
#include "shgetc.h"
+#include <inttypes.h>
+#include <limits.h>
+#include <wctype.h>
+#include <wchar.h>
/* This read function heavily cheats. It knows:
* (1) len will always be 1
/* This read function heavily cheats. It knows:
* (1) len will always be 1
@@
-31,8
+35,7
@@
static unsigned long long wcstox(const wchar_t *s, wchar_t **p, int base, unsign
unsigned char buf[64];
FILE f = {0};
f.flags = 0;
unsigned char buf[64];
FILE f = {0};
f.flags = 0;
- f.rpos = f.rend = 0;
- f.buf = buf + 4;
+ f.rpos = f.rend = f.buf = buf + 4;
f.buf_size = sizeof buf - 4;
f.lock = -1;
f.read = do_read;
f.buf_size = sizeof buf - 4;
f.lock = -1;
f.read = do_read;