summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* crypt: build fix. define ARRAY_SIZE macroHEAD0.9.32-alpineNatanael Copa2011-12-231-0/+2
| | | | Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
* Add eventfd support.Jean-Christian de Rivaz2011-12-233-1/+68
| | | | | | | | | | | | | Hello, I whould like to share this simple patch that add the eventfd call to uClibc. Please review so it can be accepted to be merged. Jean-Christian Signed-off-by: Jean-Christian de Rivaz <jc@eclis.ch> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> (cherry picked from commit 9ed163dc0eaebe8734c35b356c406e9eb1c68d76)
* libcrypt: add support for SHA256-CRYPT password hashingWilliam Pitcock2011-12-237-0/+691
| | | | | | | | | | | | | | | This is based on Ulrich Drepper's implementation in GLIBC, but hacked up to work in uClibc. The differences from the GLIBC version are as follows: - b64_from_24bit() has been converted into a macro - Usage of GLIBC-isms (such as libc_freeres_ptr) have been removed It is enabled by the UCLIBC_HAS_SHA256_CRYPT_IMPL configuration symbol. You must have UCLIBC_HAS_CRYPT_IMPL enabled as well. Signed-off-by: William Pitcock <nenolod@dereferenced.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> (cherry picked from commit 3ac5fd7ecaeb6721d812c2b93e446bf9a31acdde)
* libcrypt: add support for SHA512-CRYPT password hashingWilliam Pitcock2011-12-237-0/+737
| | | | | | | | | | | | | | | This is based on Ulrich Drepper's implementation in GLIBC, but hacked up to work in uClibc. The differences from the GLIBC version are as follows: - b64_from_24bit() has been converted into a macro - Usage of GLIBC-isms (such as libc_freeres_ptr) have been removed It is enabled by the UCLIBC_HAS_SHA512_CRYPT_IMPL configuration symbol. You must have UCLIBC_HAS_CRYPT_IMPL enabled as well. Signed-off-by: William Pitcock <nenolod@dereferenced.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> (cherry picked from commit 4c24dabb9cea4c8148d7a7efc7a1df694424c483)
* libcrypt: make crypt() itself more modularWilliam Pitcock2011-12-231-6/+24
| | | | | | | | | By using a function table, we can more cleanly support new crypt implementations, such as SHA256 ($5$) and SHA512 ($6$). Signed-off-by: William Pitcock <nenolod@dereferenced.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> (cherry picked from commit 40c426ae8f032d794d15f4a7fca8dc17cdc9899d)
* libcrypt: do not cast away const of key/saltMike Frysinger2011-12-231-2/+5
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> (cherry picked from commit 4a2b0641a3818ad14b886907368b6f6735615f6d)
* Fix __libc_epoll_pwait compile failure on x86Phil Blundell2011-12-231-2/+3
| | | | | | | | | | | | | | | This prevents "memory input 7 is not directly addressable" errors. | libc/sysdeps/linux/common/epoll.c: In function '__libc_epoll_pwait': | libc/sysdeps/linux/common/epoll.c:71:80: error: memory input 7 is not directly addressable | libc/sysdeps/linux/common/epoll.c:75:86: error: memory input 7 is not directly addressable | make: *** [libc/sysdeps/linux/common/epoll.o] Error 1 | make: *** Waiting for unfinished jobs.... Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Jason Woodward <jason.woodward@timesys.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 8245f3b4638fdff2011c2657af1bb211def704bc)
* libubacktrace: use .so.$(ABI_VERSION)Bernhard Reutner-Fischer2011-12-231-1/+1
| | | | | | | Thanks to William Pitcock for noticing Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> (cherry picked from commit 69cba61dd27f2a9c4c34f596ed9d1b7cd0441f74)
* libm: implement generic cexp(), cexpf() and cexpl().William Pitcock2011-12-232-1/+65
| | | | | | | | | The cexp*() family of functions is defined by the C99 math standard as implementing exponential functions for complex types. Signed-off-by: William Pitcock <nenolod@dereferenced.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> (cherry picked from commit 6471fc450b66dcb1ba16fe6568cd52221ca64cd1)
* libm: add cabsf() and cabsl() functions.William Pitcock2011-12-231-0/+16
| | | | | | Signed-off-by: William Pitcock <nenolod@dereferenced.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> (cherry picked from commit 2086015b9a223586c1a2b8d7f015ad3a38bdf8bc)
* libc/x86: fix stack unwinding and backtrace informationTimo Teräs2011-12-233-75/+28
| | | | | | | | | | | | | | | | | | | | | | | When compiled without framepointer, the DWARF-2 CFI data is required for proper stack unwinding. This patch adds the CFI information to: * syscalls (so we get proper backtrace even for release builds) the ebx hack was removed as it would complicate the CFI generation * new thread stub function (so the backtrace is clean for user created threads) Also pads the signal return trampolines separate from other functions. If CFI info was found for signal return code (which seems to happen if it's located right next a valid function), it will not be recognized as signal trampoline (gcc unwinder and gdb check first CFI info, and only if it does not exists it compares the exact opcode sequence to see if we are at signal return code block). This fixes a real crash if thread is cancelled and the cancellation handler fails to detect the signal return frame. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
* getaddrinfo: allow numeric service without any hintsNatanael Copa2011-12-231-7/+0
| | | | | | | | | | | | | | This appears to correspond to what glibc does and this fixes an issue with iptables-1.4.11 with udp and raw port numbers. (see http://bugzilla.netfilter.org/show_bug.cgi?id=721) This fixes #3841 https://bugs.busybox.net/show_bug.cgi?id=3841 Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> (cherry picked from commit bc3be18145e4d57e7268506f123c0f0f373a15e2)
* time: fix parsing of tzdata files where off_t is 64-bitWilliam Pitcock2011-12-231-1/+1
| | | | | | | | | | lseek takes off_t as the offset type, but gcc will normally pass a 32-bit value unless the number is wider than 16 bits. so we force gcc to pass the constant as off_t type always by casting the constant to off_t. Signed-off-by: William Pitcock <nenolod@dereferenced.org> Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
* malloc-standard: synchronize on forkTimo Teräs2011-12-231-0/+17
| | | | | | | | Otherwise other threads can leave malloc state locked, and the child will hang indefinitely if it tries to malloc something. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
* libdl: rudimentary locking for dlopen/dlsym/dlcloseTimo Teräs2011-12-232-5/+50
| | | | | | | | | | | This implements big-dlfcn lock to allow multithreaded usage of dlopen/dlsym/dlclose. We should really clean up the dl code so we can use more fine grained locking or even RCU where appropriate. But at least we won't crash now. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> (cherry picked from commit f69319d5a7d3a3ccb46b28ee2b0fd9053c6415ac)
* ldso: support RTLD_NOLOADTimo Teräs2011-12-235-20/+29
| | | | | | | | So application query if specified modile is loaded or not with dlopen. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
* stdlib: fix arc4random return type to u_int32_tTimo Teräs2011-12-232-3/+4
| | | | | | | | | | | | | It's documented to be u_int32_t and not uint32_t: http://www.manpagez.com/man/3/arc4random/ This also fixes a major bug that stdlib.h includes stdint.h. Things might go very wrong because stdint.h has conditional defines and if stdlib.h is included before #define's for stdint.h we end up missing things and breaking builds (e.g. openjdk). Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
* ldso: limited support for $ORIGIN in rpathTimo Teräs2011-12-232-39/+59
| | | | | | | | | | | Handle it if it's in the beginning of the rpath entry as it should be. Posted to uclibc ml: http://old.nabble.com/-PATCH-1-3--ldso%3A-limited-support-for-$ORIGIN-in-rpath-td31181219.html Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
* libm/x86_64: implement some fenv functionsNatanael Copa2011-12-236-0/+223
| | | | | | | | | from glibc Posted to uclibc: http://lists.busybox.net/pipermail/uclibc/2010-December/044523.html Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
* resolv: fix resolver to return TRY_AGAIN on timeoutTimo Teräs2011-12-231-46/+49
| | | | | | | | | | | | | | | | | | | | | This fixes the internal __dns_lookup to get a h_errno pointer so it works nicely with the _r variants. Additionally the function is modified to permanent error if the static buffer lengths are not enough. And finally it fixed to return TRY_AGAIN if the nameservers timeout. res_search is fixed to continue searching if we receive TRY_AGAIN. It could be a problem with the specific search domain's server and not necessarily a problem in the recursive resolver we are querying. For same reason, it does not make sense to differentiate timeout or SERVFAIL error reply. The biggest issue this fixes is that we now properly set h_errno to TRY_AGAIN if upstream nameserver(s) timed out. Previously we would have returned NETDB_INTERNAL. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
* resolv: fix memory leakBernhard Reutner-Fischer2011-12-231-0/+2
| | | | | | | | | Timothy Holdener writes: small memory leak in __dns_lookup() when the A record in the DNS answer is preceded by one or more CNAME records. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> (cherry picked from commit bb8d500a75a3050fe3198773ce7b07f669fe8f13)
* resolv: res_query for CNAMEsTimo Teräs2011-12-231-5/+3
| | | | | | | | | | | | | From: http://lists.busybox.net/pipermail/uclibc/2009-June/042583.html I had postfix failing for domains with MX->CNAME->A chain. In glibc it works. I tracked it to be a problem in uclibc res_query. It returns bogus data for CNAME entries, apparently intentionally, which is wrong. glibc return CNAME entries even for CNAME queries and most applications rely on this. So we should do the same in uclibc. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
* Compatible stack protector for non Thread Local storageNatanael Copa2011-12-232-13/+2
| | | | | | | Before we had thread local storage the __stack_chk_guard was a global variable that was referenced to by the older binaries. We since then have changed ABI so this patch can probably go away.
* branch 0.9.32v0.9.32Bernhard Reutner-Fischer2011-06-081-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: fix pregen target (!NPTL with LOCALE)Carmelo Amoroso2011-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When NPTL is not enabled, and LOCALE support is used, compilation fails with the following error: ------------------------------------------------------------------------- MKDIR include/bits GEN include/bits/sysnum.h make[1]: *** No rule to make target `../..//include/bits/uClibc_ctype.h', needed by `../../extra/locale/gen_wc8bit.c'. Stop. make: *** [pregen] Error 2 ------------------------------------------------------------------------- The problem is that "headers" is not listed as prerequisite of pregen. These have been changed multiple times recently: o Austin: order headers before pregen-headers 1f5c73c9f8a98b1d2a35cea868a585c97ab0e436 o Khem: pregen: Fix the parallel build problem in pregen target 046035ecde92262d96eff2192ba3cda716f04909 o Khem: pregen-headers: Add new target which depends on headers. ef18cfe8ebab25f5ef92e81956f50e2dc57df602 o Carmelo: build: Fix infinite loop when no threading support is enabled ff5e4de7088fe8d34812c2a1e604bf04be713606 In all of these commits headers was actually as prerequisite In commit 9381d622e2411a35a5fd73a5a573eb269e2dd9c9 [nptl: fix buildsys] by Bernhard, headers was removed, causing the problem reported above. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* libubacktrace: Fix ASNEEDED emissionBernhard Reutner-Fischer2011-05-311-1/+1
| | | | | | | In master the variable is called SHARED_LIBNAME and not SHARED_MAJORNAME. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* NPTL: Fix CTOR_DTORBernhard Reutner-Fischer2011-05-315-35/+32
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc: make common longjmp usable with NPTLFilippo Arcidiacono2011-05-271-2/+2
| | | | | | | | Call _longjmp_unwind conditionally under NPTL config option, making longjmp usable with NPTL. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* sh: use the common implementation for longjmpFilippo Arcidiacono2011-05-273-62/+2
| | | | | Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* sh: fix build in !NPTL caseFilippo Arcidiacono2011-05-272-1/+5
| | | | | | | | | Fix build issue due to missing symbols in !NPTL case: - vfork - _longjmp_unwind Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Correct a bug when remapping textrel segments on nommuAlan Davis2011-05-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From: Alan Davis <adavis@ti.com> On C6X, when trying to execute a program that has a textrel DSO, it fails to load. The telltale line in the LD_DEBUG output is: _dl_get_ready_to_run:779: file=''; needed by './a.out' The corresponding DT_NEEDED entry has 'libc.so.0', but here the filename is empty. This is what is happening in _dl_elf_shared_library(): First, map all segments according to their permissions. Text gets initially mapped read-only. Then, parse the dynamic information. The dynamic table is in RW but some of the tags may point to RO. For example, DT_NEEDED points to a string in .dynstr which is in RO. These pointers get computed according to the loadmap from the original mapping. Then, in response to a DT_TEXTREL tag, the RO segment gets remapped, thereby invaliding anything that points to it, in particular certain dynamic tags such as DT_NEEDED. The following patch re-parses the dynamic info after the remapping so as to re-compute any invalid pointers. Signed-off-by: Alan Davis <adavis@ti.com> Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
* unwind.h: Move to libc/sysdeps from nptl sysdepsKhem Raj2011-05-132-0/+0
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* epoll: redo cancellation to match masterBernhard Reutner-Fischer2011-05-131-15/+32
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* epoll.c: add cancellation to epoll_[p]wait()Peter S. Mazinger2011-05-132-4/+34
| | | | | | | While there, fix epoll_pwait syscall, it takes 6 arguments Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libm: fix building out-of-treeBernhard Reutner-Fischer2011-05-121-1/+1
| | | | | | Thanks to Thierry Reding for noticing! Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* wordexp: fix mishandled return value of pipe callBernhard Reutner-Fischer2011-05-121-7/+18
| | | | | | and use pipe2 if available while at it. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* linux_specific: handle accept4 and pipe2Bernhard Reutner-Fischer2011-05-124-4/+4
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* NPTL: needs madvise internallyBernhard Reutner-Fischer2011-05-121-4/+3
| | | | | | | This fixes 8d09a50a044638fde2ed3e1a1c4d3c7c5a3cce5c since NPTL also uses madvise internally. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* socket: fix stubsBernhard Reutner-Fischer2011-05-121-19/+19
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* commentary typo fixBernhard Reutner-Fischer2011-05-113-3/+3
| | | | | | s/decriptor/descriptor/ Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* epoll: unify epoll.hBernhard Reutner-Fischer2011-05-112-146/+24
|
* commentary typo fixBernhard Reutner-Fischer2011-05-117-10/+10
| | | | | | use cancellation (with two 'l') uniformly. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Implement epoll_create1 and epoll_pwait system calls.Thierry Reding2011-05-113-5/+87
| | | | | | | Note: TODO: This lacks cancellation support. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: document UCLIBC_EXTRA_CPPFLAGSBernhard Reutner-Fischer2011-05-112-2/+3
| | | | | Rename EXTRA_CPPFLAGS to UCLIBC_EXTRA_CPPFLAGS and make them override previous flags (by appending - not prepending - them to the other flags).
* lll: avoid shadow warningsBernhard Reutner-Fischer2011-05-113-80/+80
| | | | | | use __ret uniformly to avoid shadow warnings as seen on x86_64. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* x86_64: add TODO for R_X86_64_RELATIVEBernhard Reutner-Fischer2011-05-111-0/+3
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libubacktrace: mv unwind.h to includeBernhard Reutner-Fischer2011-05-111-0/+0
| | | | | | | Fixes compilation if NPTL is off. I hope this doesn't break ARM EABI but cannot check ATM. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Revert "libubacktrace: fix config-symbol handling"Bernhard Reutner-Fischer2011-05-111-1/+1
| | | | | | This reverts commit 7a080cd149c7b25d415d76506510d55b34819fc2. This symbol is in fact different (as it is set no 'n').
* add pipe2()Bernhard Reutner-Fischer2011-05-116-2/+48
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* socketcalls: add stubsBernhard Reutner-Fischer2011-05-111-0/+94
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>