7 Commits

Author SHA1 Message Date
Linus Unnebäck
635de63a8a
Fix pointer assignment errors
Without this patch, the following error is emitted when compiling with the latest LLVM/Clang 8.x:

```text
src/stdio/vfwscanf.c:218:9: error: assigning to 'const wchar_t *' (aka 'const unsigned int *') from 'int [1]' converts between pointers to integer types with different sign [-Werror,-Wpointer-sign]
                                set = L"";
                                    ^ ~~~
1 error generated.
```
2018-10-23 22:50:35 +02:00
Rich Felker
835f9f950e clean up stdio_impl.h
this header evolved to facilitate the extremely lazy practice of
omitting explicit includes of the necessary headers in individual
stdio source files; not only was this sloppy, but it also increased
build time.

now, stdio_impl.h is only including the headers it needs for its own
use; any further headers needed by source files are included directly
where needed.
2012-11-08 16:39:41 -05:00
Rich Felker
400c5e5c83 use restrict everywhere it's required by c99 and/or posix 2008
to deal with the fact that the public headers may be used with pre-c99
compilers, __restrict is used in place of restrict, and defined
appropriately for any supported compiler. we also avoid the form
[restrict] since older versions of gcc rejected it due to a bug in the
original c99 standard, and instead use the form *restrict.
2012-09-06 22:44:55 -04:00
Rich Felker
1bf725eda7 further fixes to leading space issue (forgot the wide versions) 2012-04-19 12:56:29 -04:00
Rich Felker
a4310aa2f5 avoid hitting eof in wcstol
shunget cannot unget eof status, causing wcstol to leave endptr
pointing to the wrong place when scanning, for example, L"0x". cheap
fix is to make the read function provide an infinite stream of bogus
characters rather than eof. really this is something of a design flaw
in how the shgetc system is used for strto* and wcsto*; in the long
term, I believe multi-character unget should be scrapped and replaced
with a function that can subtract from the f->shcnt counter.
2012-04-16 17:17:05 -04:00
Rich Felker
96e9773eb7 use the new integer parser (FILE/shgetc based) for strtol, wcstol, etc. 2012-04-16 16:55:24 -04:00
Rich Felker
0b44a0315b initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00