summaryrefslogtreecommitdiff
path: root/libc/stdio
AgeCommit message (Collapse)Author
2011-03-03make parse_printf_format() depend on UCLIBC_HAS_GLIBC_CUSTOM_PRINTFPeter S. Mazinger
we already remove the printf.h header if this option is disabled Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-02-09*printf: Violation of precision with null stringJones Desougi
When a string format is processed and the argument is NULL, this yields "(null)" regardless of precision. This does not make sense, precision should not be exceeded. A simple test shows that glibc outputs nothing if precision is smaller than six and the attached patch implements this same behaviour. Consider the not uncommon case of strings implemented like this: struct string { int len; char *ptr; }; There is often no nultermination and they may be printed like this: printf("%.*s", string.len, string.ptr); If len is 0 then ptr may be anything, but NULL is a common value. Obviously the empty string would be expected, not "(null)". Signed-off-by: Jones Desougi <jones.desougi@27m.se> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-01-21stdio: fix diagnostic messageBernhard Reutner-Fischer
harmless copy'n paste error in #error Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-01-11__psfs_parse_spec: always use long int for %pBernhard Reutner-Fischer
closes bug #3037 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-10-19vfprintf.c: reduce a chunk of #ifdef forest and remove one goto inside itDenys Vlasenko
No code changes according to objdump. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-19_vfprintf.c: de-obfuscate badly twisted fragment. no code changes.Denys Vlasenko
objdump confirms that I did not mess it up. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-19vfprintf.c: remove endif comments which clog up the source. no code changesDenys Vlasenko
Example: --ppfs->maxposarg; Verified with objdump that no code is changed Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-19vfprintf.c: de-obfuscate if(with nested assignments). no logic changesDenys Vlasenko
God knows this file is hard to read as-is, some readability improvement is in order. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-08-26_uintmaxtostr: fix indentation (spaces->tabs), no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-04-02Merge commit 'origin/master' into nptlAustin Foxley
Conflicts: Makefile.in extra/Configs/Config.in libc/sysdeps/linux/common/bits/kernel-features.h libc/sysdeps/linux/common/poll.c libc/sysdeps/linux/common/sysdep.h libc/sysdeps/linux/sh/sysdep.h Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-03-25prettify make cleanBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-03-17lift printf field width limitMichael Deutschmann
uClibc mishandles printf field width limits larger than 40959, as a result of misguided overflow-protection code. This causes spurious test failures with GNU coreutils, which depends on "%65536s" and "%20000000f" working according to spec. Signed-off-by: Michael Deutschmann <michael@talamasca.ocis.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-09Extend __gen_tempname with mode argumentMikhail Gusarov
sem_open(3) needs to create a temporary file in a way which can't be efficiently implemented in terms of POSIX API. Extend __gen_tempname with mode_t mode argument in order to ease sem_open implementation. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-10-17use *_not_cancel variants to avoid accidental cancellations with nptlAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-10-17rework internal uClibc mutexes to support futex locking, and nptlAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-09-19remove a few more empty #if/#endif pairsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-18convert // comments to /**/; remove empty #if/#endif pairs. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-18trim Experimentally off and uncommented hiddenBernhard Reutner-Fischer
sed -i -e '/Experimentally off - /d' $(grep -rl "Experimentally off - " *) sed -i -e '/^\/\*[[:space:]]*libc_hidden_proto(/d' $(grep -rl "libc_hidden_proto" *) should be a nop Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-09-05remove(): slight readabability tweak, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-17support building out-of-treeBernhard Reutner-Fischer
Handle O= Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-02-15suppress bogus ioctl on fd==INT_MAX when vasprintf() is calledDenis Vlasenko
2009-01-21*: remove __UCLIBC_CURLOCALE_DATA, __UCLIBC_CURLOCALE_DATA.xDenis Vlasenko
is always equivalent to __UCLIBC_CURLOCALE->x. remove typedef __uclibc_locale_t, it used only in a few places, it is lees confusing to use struct __uclibc_locale_struct everywhere. xlocale.h: hide __global_locale back under _LIBC, bug 53 is wrong in claiming it should be exported. Also hide under _LIBC: extern __locale_t __curlocale_var; extern __locale_t __curlocale(void); extern __locale_t __curlocale_set(__locale_t newloc); # define __UCLIBC_CURLOCALE # define __XL_NPP(N) # define __LOCALE_PARAM # define __LOCALE_ARG # define __LOCALE_PTR
2008-12-21more of warning fixes, mostly pointer signedness mismatchesDenis Vlasenko
2008-12-21more of pointer signedness warnings removedDenis Vlasenko
2008-12-21heed multiple warnings of the typeDenis Vlasenko
libc/stdio/_vfprintf.c:1892: warning: passing argument 1 of '_[w]stdio_fwrite' from incompatible pointer type
2008-12-20libc/stdio/_scanf.c: heed lots of warnings about signed/unsigned charsDenis Vlasenko
and such; remove two unneeded static string (inline "str" works better code-size wise).
2008-11-29fix improperly hidden fputc_unlockedDenis Vlasenko
2008-11-29fix improperly hidden fwprintf.Denis Vlasenko
make two data objects static. text data bss dec hex filename - 274779 1835 19012 295626 482ca lib/libuClibc-0.9.30-svn.so + 274693 1835 19012 295540 48274 lib/libuClibc-0.9.30-svn.so
2008-11-22fix some unneeded PLT referencesDenis Vlasenko
2008-11-20Last portion of libc_hidden_proto removal.Denis Vlasenko
Appears to build fine (several .configs tried)
2008-11-20next portion of libc_hidden_proto removalDenis Vlasenko
2008-11-18libc_hidden_proto removal, a few more functionsDenis Vlasenko
2008-11-18libc_hidden_proto removal, just a few functionsDenis Vlasenko
2008-11-07- less verbose make cleanBernhard Reutner-Fischer
2008-11-02- Fix __user_locking with stdio buffers (Carmelo AMOROSO)Bernhard Reutner-Fischer
Closes #5254
2008-09-21Fix up memset() argument ordering in open_memstream(). PreviouslyPaul Mundt
parts of the buffers were not being zeroed out as expected. Reported by Dmytro Gorbunov <dmitro.gorbunov@gmail.com>.
2008-09-09Fix some locale multibyte tests failures ad below:Carmelo Amoroso
libc/stdlib/_strtod.c -> tst_wcstod; libc/stdlib/stdlib.c -> tst_mblen, tst_mbtowc, tst_wctomb; libc/stdio/_scanf.c -> tst_swscanf; libc/string/strncmp.c -> tst_wcsncmp; libc/misc/wchar/wchar.c -> tst_mbrlen, tst_mbrtowc, tst_wcswidth. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2008-09-09Fix problem in vfprintf when assertion are enabled.Carmelo Amoroso
Here follow the output of my analysis: __stdio_fwrite expects at least 1 bytes. fputs_unlocked(S,F) calls fwrite_unlocked and this calls __stdio_fwrite only if bytes to be written are > 0, otherwise simply returs 0 (that is correct). During the parsing of format spec it could happen that __stdio_fwrite is called passing an empty string and with assertion enabled it will abort. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2008-07-23- trim any trailing whitespaceBernhard Reutner-Fischer
2008-06-03Remove __PRINTF_INFO_NO_BITFIELD hack, UCLIBC_INTERNAL can be used instead,Denis Vlasenko
and it's slightly shorter. Also removes stray macros from public <printf.h> header and uses spaces for comment indentation. No code changes (verified with objdump).
2008-06-01suppress a few "might be used uninitialized" warnings. No code growth.Denis Vlasenko
2008-05-30- Avoid warning about undefined preprocessor token. No obj-code changes.Bernhard Reutner-Fischer
2008-05-23- avoid warning about cast from pointer to integer of different sizeBernhard Reutner-Fischer
2008-05-23- for non-threaded, non-macro case we were missing __GI_fputc (for e.g. error.c)Bernhard Reutner-Fischer
2008-05-20replace "if (p) free(p)" by just "free(p)" - free(NULL) is safe.Denis Vlasenko
2008-05-19Moving libc_hidden_proto's into #ifdef UCLIBC_INTERNAL blockDenis Vlasenko
in string.h and strings.h. This caught unguarded string ops in libc/inet/ethers.c __ether_line_w() function. I will wait for fallout reports for a week or so, then continue converting more libc_hidden_proto's.
2008-04-10remove "register" from _vf[w]printf_internal declarations tooDenis Vlasenko
2008-04-10even more fixes for vda-made breakage in vXXXfprintfDenis Vlasenko
(pointed out by Peter S.Mazinger)
2008-04-09fix breakage in old_vfprintf caseDenis Vlasenko
2008-04-09restore erroneously removed hidden_def for vdprintfDenis Vlasenko