X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=inline;f=src%2Fstdlib%2Fwcstol.c;h=1eeb495fd6eaf2da6b44bae57bfcfd5512b1c838;hb=25e6fee27f4a293728dd15b659170e7b9c7db9bc;hp=3d7c97da6b257ceee089e80241db7061f5b38c87;hpb=400c5e5c8307a2ebe44ef1f203f5a15669f20347;p=musl diff --git a/src/stdlib/wcstol.c b/src/stdlib/wcstol.c index 3d7c97da..1eeb495f 100644 --- 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 +#include +#include +#include /* 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; - 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;