summaryrefslogtreecommitdiffstats
path: root/libc/stdlib
Commit message (Collapse)AuthorAgeFilesLines
* libc: Add canonicalize_file_name functionCarmelo Amoroso2010-09-163-1/+40
| | | | | | | | Add canonicalize_file_name function and its related tests. Required by elfutils and coreutils (readlink). Signed-off-by: Salvatore Cro <salvatore.cro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* malloc: simplify MAP_UNINITIALIZE ifdef logicMike Frysinger2010-07-271-7/+4
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* malloc-simple: Make calloc() return zeroed memorySteven J. Magnani2010-07-271-5/+4
| | | | | | | | | | The 0.9.31 release included a change to malloc-simple to request uninitialized memory from noMMU kernels. Unfortunately, the corresponding calloc() code assumed that memory returned by malloc() was already zeroed, which leads to all kinds of nastiness. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* silence some warnings about missing prototypesBernhard Reutner-Fischer2010-06-111-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* nptl: fix malloc library lockingTimo Teräs2010-04-222-10/+8
| | | | | | | | Update malloc library to use internal uclibc locking primitives to get the libpthread calls correct. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Merge commit 'origin/master' into nptlAustin Foxley2010-04-024-8/+8
|\ | | | | | | | | | | | | | | | | | | | | | | 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>
| * prettify make cleanBernhard Reutner-Fischer2010-03-254-8/+8
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * libc: Fix l64a to return the correct buffer pointerFilippo Arcidiacono2010-02-031-1/+1
| | | | | | | | | | | | | | | | | | l64a was returning the pointer to the end of the internal buffer instead of the start. This caused an infinite loop in passwd application. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* | sparc: disable cancellable system, as it fails in strange ways right nowAustin Foxley2010-02-191-1/+4
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | libc: Fix l64a to return the correct buffer pointerFilippo Arcidiacono2010-02-031-1/+1
| | | | | | | | | | | | | | | | | | l64a was returning the pointer to the end of the internal buffer instead of the start. This caused an infinite loop in passwd application. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* | Fix accidently dropped hunk during last merge from master.Khem Raj2010-02-011-21/+8
| | | | | | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* | Merge commit 'origin/master' into nptlKhem Raj2010-02-011-32/+19
|\| | | | | | | | | | | | | Conflicts: libc/stdlib/Makefile.in Signed-off-by: Khem Raj <raj.khem@gmail.com>
| * convert to foo-y kbuild styleBernhard Reutner-Fischer2010-01-261-54/+27
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | Merge commit 'origin/master' into nptlAustin Foxley2009-12-192-6/+7
|\| | | | | | | | | | | | | | | Conflicts: libc/signal/sigpause.c libc/string/x86_64/memset.S Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * malloc: fix race condition and other bugs in the no-mmu mallocFreeman Wang2009-12-192-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes multiple race conditions on mmb list. This was done by making the mmb_heap_lock into a recursive lock and making the regular heap_lock extend to cover the mmb heap handling. Also move the new_mmb allocation up to before the mmb list is iterated through to find the insertion point. When the mmb_heap also runs out and needs to be extended when the regular heap is just extended, the mmb list could be messed up. Signed-off-by: Freeman Wang <xwang@ubicom.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | Merge remote branch 'origin/master' into nptlAustin Foxley2009-11-283-3/+3
|\| | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * nommu: use MAP_UNINITIALIZE for mallocsMike Frysinger2009-11-233-3/+3
| | | | | | | | | | | | | | | | | | Now that the kernel supports MAP_UNINITIALIZE, have the malloc places use it to get real uninitialized memory on no-mmu systems. This avoids a lot of normally useless overhead involved in zeroing out all of the memory (sometimes multiple times). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | Merge remote branch 'origin/master' into nptl_mergeAustin Foxley2009-11-221-14/+8
|\| | | | | | | | | | | | | | | | | Conflicts: Rules.mak libc/misc/sysvipc/msgq.c test/Rules.mak Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * realpath: SUSv4 compliantBernhard Reutner-Fischer2009-11-141-14/+8
| | | | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | Extend __gen_tempname with mode argumentMikhail Gusarov2009-11-094-4/+7
| | | | | | | | | | | | | | | | | | | | 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>
* | whitespace fixesAustin Foxley2009-10-171-1/+1
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | cancellation support for a large amount of the required syscallsAustin Foxley2009-10-171-0/+201
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | some tweaks under libc/ needed for nptlAustin Foxley2009-10-171-3/+4
|/ | | | | | | | | | * updated kernel-features.h * system is provided by pt-system with nptl * _exit should do exit_group with nptl * tsd tls ptr in libc * rt_sigwaitinfo impl added Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* mktemp does not depend on floatsAustin Foxley2009-10-171-1/+5
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* malloc: handle size overflows in realloc()Mike Frysinger2009-10-151-0/+3
| | | | | | | | | The malloc() code checks the incoming size to make sure the header adjustment doesn't cause overflow in the size storage. Add the same check to realloc() to catch stupid stuff like realloc(..., -1). Reported-by: James Coleman <james.coleman@ubicom.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* remove a few more empty #if/#endif pairsDenys Vlasenko2009-09-191-2/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* convert // comments to /**/; remove empty #if/#endif pairs. no code changesDenys Vlasenko2009-09-183-9/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* trim Experimentally off and uncommented hiddenBernhard Reutner-Fischer2009-09-1848-153/+0
| | | | | | | | 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>
* support building out-of-treeBernhard Reutner-Fischer2009-08-174-0/+8
| | | | | | Handle O= Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* - Add strtouq alias (to strtoul) for 64bitBernhard Reutner-Fischer2009-03-251-0/+3
| | | | | | | | The strtouq alias was only available on 32bit, breaking compilation of stuff using strtouq on 64bit machines. At the same time use the correct return type (u_quad_t). Signed-of-by: Peter Korsgaard <jacmet@sunsite.dk>
* *: remove __UCLIBC_CURLOCALE_DATA, __UCLIBC_CURLOCALE_DATA.xDenis Vlasenko2009-01-211-2/+2
| | | | | | | | | | | | | | | | | | | 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
* libc/stdlib/_strtod.c: add parens around a | bDenis Vlasenko2008-12-291-1/+1
|
* - expand SUSv3_LEGACYBernhard Reutner-Fischer2008-12-291-2/+2
| | | | - SUSv4_LEGACY part #1 (non-networking)
* ctype: remove some trivial macros from ctype.h;Denis Vlasenko2008-12-271-17/+11
| | | | | | | | | | | | remove __tolower and __toupper (they existed only in SOME configs!); remove usages of _tolower (some of them clearly buggy) from uclibc code; add a few more -U<define> options to unifdef pass over installed headers; document it on docs/wchar_and_locale.txt text data bss dec hex filename - 514963 2727 15396 533086 8225e lib/libuClibc-0.9.30-svn.so + 514888 2727 15396 533011 82213 lib/libuClibc-0.9.30-svn.so
* setenv.c: tiny code shrinkDenis Vlasenko2008-12-091-36/+38
| | | | | | | text data bss dec hex filename - 546 0 4 550 226 libc/stdlib/setenv.o + 538 0 4 542 21e libc/stdlib/setenv.o
* setenv.c: further code shrinkDenis Vlasenko2008-12-091-36/+26
| | | | | | | text data bss dec hex filename - 672 0 4 676 2a4 libc/stdlib/setenv.o + 546 0 4 550 226 libc/stdlib/setenv.o
* fix segv on clearenv(); unsetenv("foo"); [was deref'ing NULL],Denis Vlasenko2008-12-091-96/+89
| | | | | | | | | add a few missing ENOMEMs, some code shrinking text data bss dec hex filename - 727 0 4 731 2db libc/stdlib/setenv.o + 672 0 4 676 2a4 libc/stdlib/setenv.o
* hostid: improve extremely unreadable partsDenis Vlasenko2008-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | *: remove checks of sigaction and sigprocmask results in cases where they clearly can't fail: sigaction(known_good_sig) sigprocmask(known_good_how) text data bss dec hex filename - 393 4 0 397 18d libc/pwd_grp/lckpwdf.o + 382 4 0 386 182 libc/pwd_grp/lckpwdf.o - 56 0 0 56 38 libc/signal/sigblock.o + 44 0 0 44 2c libc/signal/sigblock.o - 211 0 0 211 d3 libc/signal/sigset.o + 202 0 0 202 ca libc/signal/sigset.o - 56 0 0 56 38 libc/signal/sigsetmask.o + 44 0 0 44 2c libc/signal/sigsetmask.o - 309 0 0 309 135 libc/unistd/sleep.o + 256 0 0 256 100 libc/unistd/sleep.o
* on Bernd's request, remove commented-out code snippetsDenis Vlasenko2008-12-011-1/+0
|
* l64a: shrink by 13 bytes, and -1 relocDenis Vlasenko2008-12-011-10/+10
|
* random: use smaller data fields where appropriateDenis Vlasenko2008-12-013-18/+6
| | | | | | | | | text data bss dec hex filename - 130 156 0 286 11e libc/stdlib/random.o + 130 148 0 278 116 libc/stdlib/random.o - 586 0 0 586 24a libc/stdlib/random_r.o + 570 0 0 570 23a libc/stdlib/random_r.o
* shring sugnal-relared stuff a bit. BTW why constant memset is not inlined by ↵Denis Vlasenko2008-11-291-5/+6
| | | | | | | | | | | gcc? text data bss dec hex filename - 38015 18096 8636 64747 fceb lib/libpthread-0.9.30-svn.so + 38001 18096 8636 64733 fcdd lib/libpthread-0.9.30-svn.so - 274842 1835 19012 295689 48309 lib/libuClibc-0.9.30-svn.so + 274779 1835 19012 295626 482ca lib/libuClibc-0.9.30-svn.so
* - revert 24148:24151Bernhard Reutner-Fischer2008-11-263-13/+15
|
* - remove some bloat that was added in r23660 and subsequent r23698.Bernhard Reutner-Fischer2008-11-253-15/+13
| | | | The sbrk lock is only needed for LT.old
* - hide __libc_{f,}statfs. Thanks to Peter S. Mazinger for mentioning this fact.Bernhard Reutner-Fischer2008-11-252-2/+0
|
* Last portion of libc_hidden_proto removal.Denis Vlasenko2008-11-2037-86/+86
| | | | | Appears to build fine (several .configs tried)
* next portion of libc_hidden_proto removalDenis Vlasenko2008-11-2018-29/+29
|
* libc_hidden_proto removal, a few more functionsDenis Vlasenko2008-11-184-8/+8
|
* libc_hidden_proto removal, just a few functionsDenis Vlasenko2008-11-185-5/+5
|
* - for !UNIX98PTY_ONLY we have to fallback to old-style pty's.Bernhard Reutner-Fischer2008-11-091-9/+8
| | | | Closes #6024