summaryrefslogtreecommitdiffstats
path: root/libc
Commit message (Collapse)AuthorAgeFilesLines
...
* _uintmaxtostr: fix indentation (spaces->tabs), no code changesDenys Vlasenko2010-08-261-10/+10
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* resolv: simplify MAXALIAS handlingBernhard Reutner-Fischer2010-08-191-16/+7
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* getserv: fix reading services lines w > 80 charsBernhard Reutner-Fischer2010-08-192-28/+30
| | | | | | e.g. getservbyname() Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* config parser: fix memory corruptionTimo Teräs2010-08-061-2/+2
| | | | | | | | | | | | fgets will happily write over allocated area limits. Adjusted the buffer size according to how much is already read. Also increase the maximum default line length, as 80 is slightly small. It might be better if bb_get_chunk_with_continuation would reallocate the line buffer if it was not user given. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* nptl i686: avoid cpp problems with thunk sectionBernhard Reutner-Fischer2010-08-061-0/+2
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* resolver: switch to config parserBernhard Reutner-Fischer2010-08-051-136/+119
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* getnet: switch to config parserBernhard Reutner-Fischer2010-08-055-222/+218
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* getproto: switch to config parserBernhard Reutner-Fischer2010-08-051-212/+137
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* usershell: switch to config parserBernhard Reutner-Fischer2010-08-051-116/+56
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* switch getservice to config parserBernhard Reutner-Fischer2010-08-051-212/+139
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* sysconf: implement _SC_NPROCESSORS_CONF, _SC_NPROCESSORS_ONLNBernhard Reutner-Fischer2010-08-051-8/+72
| | | | | | perusing the config parser Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* add config parserBernhard Reutner-Fischer2010-08-052-3/+273
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* math: isnan is a C99 featureHenning Heinold2010-08-051-6/+5
| | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de>
* nptl: _POSIX_IPV6 depends on UCLIBC_HAS_IPV6Bernhard Reutner-Fischer2010-08-021-0/+8
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Immediately try next nameserver on recv() failureIngo van Lil2010-07-281-1/+3
| | | | | | | | | | | | If there is a problem communicating with a nameserver the __dns_lookup() function will not immediately advance to the next nameserver but instead continue waiting until the timeout expires. This will cause a 30 second delay even if no nameserver is configured in resolv.conf and no DNS is running on localhost. Signed-off-by: Ingo van Lil <inguin@gmx.de> Acked-by: Roman I Khimov <khimov@altell.ru> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* malloc: simplify MAP_UNINITIALIZE ifdef logicMike Frysinger2010-07-271-7/+4
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* new helper funcs for alloca/malloc with mmu/nommuMike Frysinger2010-07-274-52/+54
| | | | | | | | | | | | | The rpc rcmd code has some ugly ifdef mazes to handle mmu/nommu differences just to select alloca or malloc. Unify those with some helper macros in a new header, and then convert the rcmd code over to it. This is all geared towards fixing the getdents helper functions which only use alloca() atm. Now that we have helper functions, convert the getdents functions over too. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reviewed-by: Steven J. Magnani <steve@digidescorp.com>
* remove trailing comma in enumBernhard Reutner-Fischer2010-07-271-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* silence warning about incompatible types with _dl_init_static_tlsBernhard Reutner-Fischer2010-07-271-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* 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>
* lutimes: add lutimes supportVladimir Zapolskiy2010-07-271-0/+38
| | | | | | | This patch adds lutimes library call support. Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Fix ctime() standard compliance bugDavid A Ramos2010-07-271-0/+1
| | | | | | | | | | | | | | | | | | | | | fixes issue2209: ctime() was updated in 0.9.31 to call localtime_r() instead of localtime() to avoid using a static buffer. Unfortunately, this change replaces the static buffer (which is zeroed out on initialization) with an uninitialized local buffer. In the common case, this has no effect. However, with a sufficiently large time_t value, the value returned differs from that returned by asctime(localtime(t)), and thus violates the ANSI/ISO standard. An example input is (on a 64-bit machine): time_t t = 0x7ffffffffff6c600; Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* daemon: drop cruft incorrectly re-introduced by nptl mergeMike Frysinger2010-07-261-7/+0
| | | | | | This likes to break nommu systems. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* bfin: pull in common/sysdep.hMike Frysinger2010-07-261-1/+1
| | | | | | Fixes random build errors in linux/common/. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* msync: skip if syscall is missingMike Frysinger2010-07-261-0/+4
| | | | | | | Some arches skip the msync syscall as it is useless (like nommu). So don't require it to build. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* nommu: fix building of fork.c when stubs are disabledMike Frysinger2010-07-261-1/+2
| | | | | | | We scrub the fork() prototype for nommu/no stubs, so attempting to get its type isn't going to work. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* bfin: add exec stack markings to assembly filesMike Frysinger2010-07-265-0/+10
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* arm/crt1.S: Avoid dependency on PC+4 or PC+8Khem Raj2010-07-211-8/+3
| | | | | | | * fix a problem with Thumb PIE binaries, where the GOT was located incorrectly because of an offset 8 Signed-off-by: Khem Raj <raj.khem@gmail.com>
* arm: Macros in sysdeps/linux/arm also needed to be changed to accept _a1 to ↵Khem Raj2010-07-151-9/+9
| | | | | | __a1 renaming. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* silence shadow warningsBernhard Reutner-Fischer2010-07-143-48/+48
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* include/param.h: Dont use ARG_MAX from kernel headersKhem Raj2010-07-092-2/+23
| | | | | | | * Use getrlimit for ARG_MAX in sysconf on nptl. * Define NCARGS directly instead of ARG_MAX Signed-off-by: Khem Raj <raj.khem@gmail.com>
* arm: Silence warning about shadow declarationsKhem Raj2010-07-072-26/+26
| | | | | | | | | libc/inet/socketcalls.c: In function ‘__libc_recvfrom’: libc/inet/socketcalls.c:229:1: warning: declaration of ‘_sys_result’ shadows a previous local libc/inet/socketcalls.c:229:1: warning: shadowed declaration is here Signed-off-by: Khem Raj <raj.khem@gmail.com>
* nptl: fix buildsysBernhard Reutner-Fischer2010-07-063-7/+7
| | | | | | | | | Now automatically picks the correct (arch and subarch specific) impls in favour of generic impls. make O=/tmp/objs PREFIX=/my/sysroot -j works now as expected (both out-of-tree as well as parallel-safe). Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Revert "don't make __errno_location / __h_errno_location hidden"Austin Foxley2010-07-064-0/+8
| | | | | | | | This reverts commit 0d6ee549bc86fd330672a79d9a87d2c3825eea67. We need to find a solution that will work in shared and static libraries Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* don't make __errno_location / __h_errno_location hiddenPeter Korsgaard2010-07-054-8/+0
| | | | | | | | | | | | | Closes #2089 (https://bugs.busybox.net/show_bug.cgi?id=2089) __errno_location / __h_errno_location access has to go through the PLT like malloc/free, so the linuxthread variants gets used instead when compiling with -pthread. Based on http://github.com/mat-c/uClibc/commit/328d392c54aa5dc2b8e7f398a419087de497de2b Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* remove extra comma in lock macroAustin Foxley2010-07-031-1/+1
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* more workarounds for GCC PR32219Timo Teräs2010-06-301-2/+2
| | | | | | | | | | Commit 2e53dd645d5348f207cec7f8595969dc566c5a55 workarounds GCC bug when accessing _locale_init and _stdio_init. We need the same fix for __errno_location and __h_errno_location otherwise we crash calling null with static and non-threaded builds. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* mips/syscall-error: Choose the correct version for setting up errno.Khem Raj2010-06-302-5/+8
| | | | | | | | | | | * Current function is a C protype and PSEUDO macro does not transfer syscall return parameters to correct argument registers for a C function. This causes problem with syscalls setting wrong value for errno when they encounter an error. * Fixes PR/2089 for mips/nptl Signed-off-by: Khem Raj <raj.khem@gmail.com>
* nptl/errno: Use a separate __errno_location for libpthread.Khem Raj2010-06-301-1/+5
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* remove redundant args to do_lnBernhard Reutner-Fischer2010-06-291-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* use uniform form of C99 keywordsBernhard Reutner-Fischer2010-06-249-39/+39
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc: silence warnings about undefined cpp tokensBernhard Reutner-Fischer2010-06-244-5/+5
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* fix race condition when generating linker scriptsBernhard Reutner-Fischer2010-06-241-4/+5
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* MIPS: Fix build error with linuxthreads.oldAbdoulaye Walsimou Gaye2010-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch avoid the following build error: AS libc/sysdeps/linux/mips/vfork.os In file included from libc/sysdeps/linux/mips/vfork.S:22: ./libc/sysdeps/linux/mips/sysdep.h:41:20: error: regdef.h: No such file or directory libc/sysdeps/linux/mips/vfork.S: Assembler messages: libc/sysdeps/linux/mips/vfork.S:40: Warning: Unrecognized register name `sp' libc/sysdeps/linux/mips/vfork.S:40: Warning: Bad .frame directive libc/sysdeps/linux/mips/vfork.S:40: Error: junk at end of line, first unrecognized character is `s' libc/sysdeps/linux/mips/vfork.S:44: Error: illegal operands `dsubu sp,FRAMESZ' libc/sysdeps/linux/mips/vfork.S:45: Error: bad or irreducible absolute expression libc/sysdeps/linux/mips/vfork.S:65: Error: illegal operands `daddu sp,FRAMESZ' libc/sysdeps/linux/mips/vfork.S:69: Error: illegal operands `li a0,0x4112' libc/sysdeps/linux/mips/vfork.S:70: Error: illegal operands `move a1,sp' libc/sysdeps/linux/mips/vfork.S:73: Error: illegal operands `li v0,(5000+55)' libc/sysdeps/linux/mips/vfork.S:78: Error: illegal operands `bnez a3,.Lerror' libc/sysdeps/linux/mips/vfork.S:88: Error: illegal operands `dla t9,__syscall_error' libc/sysdeps/linux/mips/vfork.S:90: Error: illegal operands `jr t9' Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* libc: define cfi_personality and cfi_lsdaBernhard Reutner-Fischer2010-06-171-0/+11
| | | | | | required for proper, current subarch handling Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc: Fix non-NPTL threads buildCarmelo Amoroso2010-06-171-1/+3
| | | | | | | | This patch fixes some issues building uclibc with linuxthreads, that seem to have been introduced by the NPTL changes. Signed-off-by: Andrew Stubbs <ams@codesourcery.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* sh4: Fixes for SH-4 without an FPUCarmelo Amoroso2010-06-143-3/+7
| | | | | | | | This patch disables SH-4 optimizations that rely on the FPU when building for variants that don't have an FPU, such as SH-4AL. Signed-off-by: Andrew Stubbs <ams@codesourcery.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* hcreate_r: silence warning in helper funcBernhard Reutner-Fischer2010-06-111-4/+4
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* wordexp: silence warningBernhard Reutner-Fischer2010-06-111-1/+2
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* silence some warnings about missing prototypesBernhard Reutner-Fischer2010-06-115-4/+6
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>