Age | Commit message (Collapse) | Author |
|
Printf still needs some performance work done though.
Also some bufferless stdio cleanups.
|
|
Should be standards compliant and with several optional features,
including support for hexadecimal float notation, locale awareness,
glibc-like locale-specific digit grouping with the `'' flag, and
positional arg support. I tested it pretty well (finding several
bugs in glibc's scanf in the process), but it is brand new so be
aware.
The *wprintf functions now support floating point output. Also, a
couple of bugs were squashed. Finally, %a/%A conversions are
now implemented.
Implement the glibc xlocale interface for thread-specific locale
support. Also add the various *_l(args, locale_t loc_arg) funcs.
NOTE!!! setlocale() is NOT threadsafe! NOTE!!!
The strto{floating point} conversion functions are now locale aware.
The also now support hexadecimal floating point notation.
Add the wcsto{floating point} conversion functions.
Fix a bug in mktime() related to dst. Note that unlike glibc's mktime,
uClibc's version always normalizes the struct tm before attempting
to determine the correct dst setting if tm_isdst == -1 on entry.
Add a stub version of the libintl functions. (untested)
Fixed a known memory leak in setlocale() related to the collation data.
Add lots of new config options (which Erik agreed to sort out :-),
including finally exposing some of the stripped down stdio configs.
Be careful with those though, as they haven't been tested in a
long time.
(temporary) GOTCHAs...
The ctype functions are currently incorrect for 8-bit locales. They
will be fixed shortly.
The ctype functions are now table-based, resulting in larger staticly
linked binaries. I'll be adding an option to use the old approach
in the stub locale configuration.
|
|
|
|
to match that of current glibc; i.e. don't do anything and return success.
Apparently, php calls fflush() on a file opened as readonly before trying
to read. Eventually I'll add some config options to flag this and several
other instances of nonportable code.
|
|
%c, %s, and %[ specifiers. Note that scanf is undergoing rewrite so I
didn't bother optimizing this. I did run all my regression tests though.
Set EOF correctly for fmemopen on readonly streams. I really need to
check what glibc behavior is for the various open modes though.
|
|
is built without buffer support.
|
|
seeks to the end of the stream when append mode is set and we are
transitioning to write mode, so that subsequent ftell() return
values are correct.
Also fix _stdio_fopen to support fdopen() with append specified when
the underlying file didn't have O_APPEND set. It now sets the
O_APPEND flag as recommended by SUSv3 and is done by glibc.
|
|
|
|
Also added outdigit support and (legacy) YESSTR/NOSTR support.
|
|
Hopefully locale support will build when cross compiling now. Collation is
still not supported, but that's what I'm currently working on. In the
next couple of days, I'll probably put up a couple of files for download
that will save people the trouble of generating all the glibc locales.
Added *wprintf functions, although they currently don't support floating
point. That will be fixed when I rewrite _dtostr... or possibly before.
Added the wcsto{inttype} functions.
Added iconv() and a mini iconv utility. The require locale support and
only provide for conversions involving the various unicode encodings
{ UCS-4*, UCS-2*, UTF-32*, UTF-16*, UTF-8 }, the 8-bit codesets built
with the locale data, and the internal WCHAR_T.
|
|
comment as an mjn3 only item.
|
|
when the grouping flag "'" is specified. Grouping for floating point values
may wait until I do a rewrite of the floating pt to string code...
|
|
the cookie pointer was set to NULL as a debugging aid. However,
some of the perl 5.8 test rely on being able to close stderr and
still try writing to it. So now, the cookie pointer and handler
function pointers are set to that it is a "normal" file with a
file descriptor of -1.
Note: The cookie pointer is reset to NULL if the FILE struct is
free'd by fclose.
|
|
I think they're fixed now (I've run a few tests).
Note: __fsetlocking() is not threadsafe... but glibc's doesn't appear to
be either.
|
|
needlessly. To do so increases the generated code size with bcc.
Eliminate duplicate define warnings in wstring.c.
Fix potentially broken preprocessor comparisons. The preprocessor
converts integers to maximal signed type, so inequality comparisons
involving UINTMAX_MAX, ULLONG_MAX, and (if no long long) ULONG_MAX
were potentially broken.
|
|
This falls under undefined behavior wrt ANSI/ISO C99, but
SUSv3 seems to treat it as a no-op and it occurs in some apps.
Fixed a problem with _stdio_fwrite() not checking for underlying
write() failures.
Fixed both _stdio_fwrite() and _stdio_fread() to make sure that
the putc and getc macros were disabled if the stream was in
and error state.
The above changes should take care of a problem initially reported
by "Steven J. Hill" <sjhill@realitydiluted.com>.
|
|
|
|
|
|
Implemented unformatted wide i/o functions. (ungetwc still needs testing)
Fix a few bugs in wchar.c.
Modifications for bcc/elks support.
|
|
standards. Temporarily added a utility function to wrap Erik's strerror_r
so that "Unknown error xxx" strings can be generated for errno's which
cause strerror_r to fail. That utility function will eventually be merged
in with the strerror/strerror_r functions when I change over to optionallly
mmap'ing the system error strings to provide for lower mem comsumption on
non-MMU platforms, as well as locale-specific system error messages.
|
|
The writer for the stream returned by open_memstream was supposed to
keep the buffer nul-terminated. I apparently left out a statement.
|
|
auto-transition, we fail the operation. This is different than glibc's
apparent behavior for writing of clearing the read buffer and still
failing the write without setting the stream's error flag.
Also, change a number of "errno = xxx" assignments to use __set_errno().
Also, change setvbuf(file, NULL, _IO{LF}BF, 0) behavior to more closely
match glibc's by keeping the current buffer and only changing the buffering
mode. Update setlinebuf() in the process to match the man page behavior.
|
|
-Erik
|
|
|
|
I successfully managed to blow away all the modeflags for the file
_except_ the one dealing with buffering...
|
|
default static initiailization and forgotten to update _stdio_init().
|
|
in the new printf code.
|
|
fix O_APPEND and O_LARGEFILE handling in _stdio_fopen(). Someone else will
have to check of course...
|
|
|
|
|
|
|
|
|
|
the fcntl interface...
-Erik
|
|
them afterwards. As was, this hosed things up for fds shared with a
parent process. Very bad for shells... Oops.
-Erik
|
|
EINTR [when] the fclose() function was interrupted by a signal". But
looking in the current uClibc stdio.c for some bizarre reason we had a
special case where when errno was EINTR, we would keep on trying
instead. Doh! Fix that,
-Erik
|
|
from abort() and from _exit(), we need to ensure that flushing
will not cause us to block. So use fcntl to set the fd's to
non-block mode...
|
|
unnecessary variable
|
|
undefined which is a valid thing to do)
-Erik
|
|
the config file). I've tested this and it works for me.
-Erik
|
|
|
|
"_stderr", since this is what gcc and libgcc expect...
-Erik
|
|
|
|
|
|
avoid problems with fgets on tty streams. I actually did some testing this
time. ;-)
Note: there is a difference in behavior between glibc and uClibc here
regarding fread() on a tty stream. glibc's fread() seems to return after
reading all _available_ data even if not at end-of-file, while uClibc's
fread() continues reading until all requested or eof or error. The latter
behavior seems correct w.r.t. the standards.
|
|
and pasting while pressed for time. I haven't checked this one either. :-(
|
|
|
|
tested it (lack of time).
|
|
<johan.adolfsson@axis.com>.
|
|
<kili@outback.escape.de>.
|
|
use the unsafe gets, they will get a warning from the linker. muahahaha.
This method will soon be applied to fork() w/o an mmu etc...
-Erik
|