summaryrefslogtreecommitdiff
path: root/libc
AgeCommit message (Collapse)Author
2013-01-17socket.h: pull socket_type.h from eglibcBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-01-16buildsys: link libgcc_eh if DODEBUGBernhard Reutner-Fischer
with -O0 we (e.g. lockf) might end up with references to _Unwind_Resume, so pull in gcc_eh in this case.. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-01-16getpwnam: hide relocationBernhard Reutner-Fischer
The non-reentrant version of getpwnam is used in the RPC code (for !HAS_REENTRANT_RPC) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-01-14LT.old: reinstate buildBernhard Reutner-Fischer
As noted by Florian Fainelli: LD libpthread-0.9.34-git.so libpthread/linuxthreads.old/libpthread_so.a(wrapsyscall.oS): In function `fcntl64': wrapsyscall.c:(.text+0xd8): undefined reference to `__libc_fcntl64' libpthread/linuxthreads.old/libpthread_so.a(wrapsyscall.oS): In function `lseek64': wrapsyscall.c:(.text+0x190): undefined reference to `__libc_lseek64' libpthread/linuxthreads.old/libpthread_so.a(wrapsyscall.oS): In function `pread64': wrapsyscall.c:(.text+0x39c): undefined reference to `__libc_pread64' Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-01-14buildsys: use kbuild style, fix omissionBernhard Reutner-Fischer
forgot this hunk in d0234b16d61f06b2a3fd6241eff8c81250283a60 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-01-10buildsys: use kbuild styleBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-01-10libc: add {get,set,swap,make}context user context manipulation functionsFlorian Fainelli
Add the obsolescent SUSv3 family of user context manipulating functions for arm, i386, mips, x86_64. Signed-off-by: Timon ter Braak <timonterbraak@gmail.com> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-01-08libc: handle sync_file_rangeBernhard Reutner-Fischer
Add cancellation and support arm, ppc64, mips32. Compile-tested. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-12-11arm: clone: restore stack pointer just after return from syscallFilippo Arcidiacono
If the syscall returns with an error the stack pointer and r4 register are not restored because the instruction 'ldmnefd sp!, {r4}' is executed after branching to '__error' label. This bug has been spotted out by running './utstest clone 5' from LTP built with -fstack-protector-all compiler flag as log below: root@cortex-a9:/usr/tests/ltp/testcases/bin# ./utstest clone 5 stack smashing detected: ./utstest terminated() Regression introduced by commit e58798e107d652644629a1daaa95d76430808d53 Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Giuseppe Di Giore <giuseppe.di-giore@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2012-12-05xtensa: fix setjmp that didn't save all registers correctlyChris Zankel
Setjmp was only saving the lower order of registers (a0-a3) correctly, but not the higher ones (a4-a8/a12). The change also includes additional information, and renames many of the registers, so that setjmp and longjmp look more like the inverse of each other. Signed-off-by: Chris Zankel <chris@zankel.net>
2012-12-03sched.h: include stdlib.h for malloc/freeBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-12-01update ptrace.h to latest from glibcJames Hogan
Update libc/sysdeps/linux/common/sys/ptrace.h to latest from glibc's sysdeps/unix/sysv/linux/sys/ptrace.h. This adds definitions for operations: - PTRACE_GETREGSET - PTRACE_SETREGSET - PTRACE_SEIZE - PTRACE_INTERRUPT - PTRACE_LISTEN And adds flags: - PTRACE_SEIZE_DEVEL And adds event codes: - PTRACE_EVENT_SECCOMP This is to allow access to the generic interface for accessing architecture specific regsets using the corresponding NT_* types, required for new Linux kernel architecture ports. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-29libc/stdlib: localize __unix_grantptMike Frysinger
When ASSUME_DEVPTS is disabled, we end up exporting __unix_grantpt and get a reloc to it from grantpt. Mark it static to fix all of that. Reported-by: Michael Deutschmann <michael@talamasca.ocis.net> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-18drop support for pre ISO-C compilersMike Frysinger
This drops __signed, __volatile, and __const. Only the latter was used in the code base, and for uClibc, not consistently. Much of the code used plain "const" which meant "__const" was useless. Really, the point of this is to stay in sync with what glibc did. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-18Replace FSF snail mail address with URLsMike Frysinger
This matches a similar change made to glibc. No functional changes here. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-18AVR32: declare missing result variableFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-17string/microblaze: fix preprocessor styleMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-17libc/sysdeps: dup3: check for __NR_dup3 since older kernels/arches lack itMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-14libc/stdlib: add mkostemp helpersMike Frysinger
Some projects (like udev) are starting to use this. Imported from glibc. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-14libc/sysdeps: add dup3 syscall wrapperMike Frysinger
Some projects (like udev) are starting to use this. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-12string/microblaze: Fix for little-endianSteve Bennett
Fix the asm-optimised memcpy and memmove so they work for little-endian as well as big-endian. Testing has shown no issues, but I am not a microblaze asm expert so YMMV. Signed-off-by: Steve Bennett <steveb@workware.net.au> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-11-12microblaze/bits/setjmp.h: Fix stray #endifSteve Bennett
Introduced in c53099f7 Signed-off-by: Steve Bennett <steveb@workware.net.au> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-11-03xtensa: add missing atomic intrinsicsChris Zankel
Add more atomic intrinsics. These are mostly non 32-bit versions, which are not support by Xtensa. This file needs some more clean-up and consolidation. Signed-off-by: Chris Zankel <chris@zankel.net>
2012-11-03xtensa: sysdep.h needs to include sys/syscall.hChris Zankel
The Xtensa version of sysdep.h didn't include sys/syscall.h. This header file is, for example, needed by not-cancel.h, which uses the INTERNAL_SYSCALL macro. Signed-off-by: Chris Zankel <chris@zankel.net>
2012-11-03xtensa: add a stub user.h fileChris Zankel
Xtensa only supports the ELF binary format, so the user.h file isn't needed. However, it's included by other files, so provide a stub user.h. Signed-off-by: Chris Zankel <chris@zankel.net>
2012-11-03xtensa: fix a misnumbered register in sigsetjmpChris Zankel
Signed-off-by: Chris Zankel <chris@zankel.net>
2012-11-03xtensa: add a set of atomic intrinsicsChris Zankel
Add a new file that provides various atomic intrinsics, which use the conditional store instruction. Signed-off-by: Chris Zankel <chris@zankel.net>
2012-11-03xtensa: add sigcontext.hChris Zankel
Signed-off-by: Chris Zankel <chris@zankel.net>
2012-10-31_scanf.c: Implement 'm' modifier for 'c' and '[' conversions.Will Newton
The current code implements the 'm' modifier only for 's' conversions and would cause a segfault if it was used for 'c' or '[' conversions. This patch extends the code to cover these cases too. Signed-off-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-10-31__uclibc_main: remove stray trailing spaceBernhard Reutner-Fischer
test post-receive hook Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-10-02libc/sysdeps: add __kernel_long and __kernel_ulongChris Packham
Linux 3.4 added __kernel_long_t and __kernel_ulong_t and various exported header files were updated to use these new types. Add the definitions for __kernel_long_t and __kernel_ulong_t to the relevant kernel_types.h headers. This change was automated with the following scriptlet git grep --name-only 'typedef.*__kernel_old_dev_t' \ | xargs sed -i '/typedef.*__kernel_old_dev_t/ a\ typedef long\t\t__kernel_long_t;\ typedef unsigned long\t__kernel_ulong_t;' Whitespace in arm, avr32, hppa, sparc was then manually fixed up. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> -- Here's a cleaned up patch which should get the whitespace right. I'm a bit iffy about the sparc changes they make sense to me but it's not a platform I have access to. I can break this up per arch or per maintainer if requested. libc/sysdeps/linux/alpha/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/arm/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/avr32/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/bfin/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/c6x/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/cris/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/e1/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/h8300/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/hppa/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/i386/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/ia64/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/m68k/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/microblaze/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/mips/bits/kernel_types.h | 4 ++++ libc/sysdeps/linux/nios2/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/powerpc/bits/kernel_types.h | 4 ++++ libc/sysdeps/linux/sh/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/sh64/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/sparc/bits/kernel_types.h | 4 ++++ libc/sysdeps/linux/v850/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/x86_64/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/xtensa/bits/kernel_types.h | 2 ++ 22 files changed, 50 insertions(+) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-08-04i386/bits/syscalls.h: allow immediate values as 6th syscall argNatanael Copa
Allow use of immedate values as the 6th syscall argument. Otherwise we must store the arg on memory. This gives gcc more options to optimize better. This also works around an issue with posix_fallocate. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-08-04bits/time.h: sync with glibc 2.16Peter Korsgaard
CLOCK_MONOTONIC_RAW is available since 2.6.28 (2d42244ae71d: clocksource: introduce CLOCK_MONOTONIC_RAW), and CLOCK_*_COARSE since 2.6.32 (da15cfdae033: time: Introduce CLOCK_REALTIME_COARSE). Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-08-04libc/inet/resolv.c: Use IE model for TLS data.Will Newton
All other TLS data in uClibc is explicitly using the IE model, so use it for __resp too. This generates smaller and faster code. Signed-off-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-08-04libc/inet/resolv.c: Remove obsolete comment.Will Newton
The definition of __resp has been hidden for some years (commit 22de495d). Remove the comment suggesting that it is not. Signed-off-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-07-24Accept either __NR__lseek or __NR_lseekBernd Schmidt
In llseek.c, we already allow both variants; the same needs to be done here to avoid duplicate definitions of lseek64_nocancel. Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
2012-06-18Revert: buildsys: clean up libubacktrace linker script handlingKevin Cernekee
Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15libubacktrace: temporarily workaround link issueBernhard Reutner-Fischer
temporarily work around circular dependency in linking that was introduced by 01c125c3bd8f949f8e5711e09152859eecd1b004 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15remove sysdep.h from arch specific string implementationPeter S. Mazinger
Remove hardcoded path from xtensa, we have sysdep.h in path Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15remove cris/fork.c, unusedPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15update arc4random from bug #885Peter S. Mazinger
Add config option to provide arc4random without device access. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15epoll.c: add cancellation to epoll_[p]wait()Peter S. Mazinger
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>
2012-06-15include pthreadP.h for SIGCANCELPeter S. Mazinger
based on a patch from Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15sigset-cvt-mask.h: add a guard to allow including it twicePeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15signal: remove sigblock, siggetmask and sigsetmaskPeter S. Mazinger
rcmd.c uses sigblock and sigsetmask, make the function static and include them directly until a rewrite is done. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15bits/types.h: remove thread types, users should include pthread.hPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15error.c: no need for __error and __error_at_linePeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15fts.c: add a comment about wrong usage of _lfs_64.hPeter S. Mazinger
This file needs anyway some massage (style update), I'll leave the fix to the committer. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15sigqueue.c: rewrite a bitPeter S. Mazinger
Use sizeof(info) instead of sizeof(siginfo_t). stubs.c: add sigqueue stub. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15add posix_madvise.cPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>