summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps
Commit message (Collapse)AuthorAgeFilesLines
* lstat/stat/fstat: Use 64bit version of syscall if availablemasterKhem Raj2012-02-053-13/+42
| | | | | | | | | | | | This is needed for stat'ing loop devices > 255 since otherwise kernel returns EOVERFLOW becasue it needs st_rdev/st_dev to be larger than 16bits but in kernel it uses __old_kernel_stat for stat syscall which has st_rdev/st_dev as unsigned short Add a testcase Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Declare __err and pass it to INTERNAL_SYSCALL_NCS so subsequent macros can ↵Khem Raj2012-02-051-2/+2
| | | | | | use it Signed-off-by: Khem Raj <raj.khem@gmail.com>
* tmpnam, tempnam are obsolete in SUSV4Bernhard Reutner-Fischer2012-01-292-1/+5
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* *: if !HAS_THREADS strong alias sigactionBernhard Reutner-Fischer2012-01-288-2/+45
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: fixup sigaction handlingBernhard Reutner-Fischer2012-01-285-19/+5
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc_arm: avoid multiple version of __aeabi_unwind_cpp_pr dummy codeCarmelo Amoroso2012-01-271-2/+1
| | | | | | | | | Do not pollute libraries with its own implementation of __aeabi_unwind_cpp_pr1 code. Just add it to uclibc_nonshared.a archive and share it. This fixes build issue with static linking of application due to multiple symbol definition in libgcc_eh-a and libpthread.a or librt.a Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* *: silence some warningsBernhard Reutner-Fischer2012-01-2618-68/+111
| | | | | | warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* syscall: flag ia64 syscall error path as unlikelyBernhard Reutner-Fischer2012-01-261-2/+2
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* arm: tweak commentBernhard Reutner-Fischer2012-01-261-2/+2
| | | | | | harmless copy'n paste error Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* i386/sigaction.c: slightly more readable form of [rt_]sigreturn definitionsDenys Vlasenko2012-01-181-5/+4
| | | | | | No code changes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* stubs: mark stubs as usedBernhard Reutner-Fischer2012-01-181-0/+1
| | | | | | | Avoids warning from -Wunused-function about the alias target that is only used at link-time. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* mips/dlfcn.h: Disable RTLD_DEEPBINDKhem Raj2012-01-161-0/+2
| | | | | | RTLD_DEEPBIND is not supported in uclibc Signed-off-by: Khem Raj <raj.khem@gmail.com>
* x86_64: add PLT bypass for __sigsetjmpMike Frysinger2011-12-033-2/+7
| | | | | | | | | | | | | The current x86_64 setjmp helpers incur a reloc, so fix that up. $ readelf -r lib/libc.so.0 ... Relocation section '.rela.plt' at offset 0xb058 contains 10 entries: Offset Info Type Sym. Value Sym. Name + Addend 000000236010 02a400000007 R_X86_64_JUMP_SLO 000000000000b3c4 __sigsetjmp + 0 ... Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* buildsys: s/CROSS/CROSS_COMPILE/gCarmelo Amoroso2011-11-251-3/+3
| | | | | | | | Use CROSS_COMPILE instead of CROSS as other projects are doing (i.e. kernel, busybox, buildroot). CROSS is still supported for backward compatibility only Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* libc: do not rely upon ulimit kernel syscall.Carmelo Amoroso2011-11-231-8/+0
| | | | | | | | | | | | On several architectures __NR_ulimit syscall number is currently defined but it is remapped onto sys_ni_syscall, while on other architectures they are not longer defined. So use {get,set}rlimit only to implement ulimit interface. It fixes LTP ulimit01 test case. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> Acked-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Add a C6X-specific ipc.h.Bernd Schmidt2011-11-141-0/+55
| | | | Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
* libc: flesh out linux scheduler functionsHenning Heinold2011-11-079-17/+277
| | | | | | | Most stuff was taken from the eglibc. Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* ldso: support RTLD_NOLOADTimo Teräs2011-11-071-2/+2
| | | | | | | | So application query if specified module is loaded or not with dlopen. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* powerpc: Fix typo in clone()Bernhard Reutner-Fischer2011-11-041-1/+1
| | | | | | Thanks to strauman at slac stanford edu for noticing Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Add stub for eventfd.Jean-Christian de Rivaz2011-11-041-0/+4
| | | | | | | Warn if the enventfd() function is not implemented. Signed-off-by: Jean-Christian de Rivaz <jc@eclis.ch> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libm: implement a generic sincos().William Pitcock2011-11-041-1/+1
| | | | | | | We already provide sincos() on some archs, so we should ship a generic version. Signed-off-by: William Pitcock <nenolod@dereferenced.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* setegid: use setresgid conditionallyBernhard Reutner-Fischer2011-11-021-0/+6
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* stubs: remove leftover undefsBernhard Reutner-Fischer2011-11-021-61/+0
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* stubs: handle linux module functionsBernhard Reutner-Fischer2011-11-022-4/+5
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* stubs: handle linux-specificBernhard Reutner-Fischer2011-11-022-19/+184
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* stubs: fix inverted socket logicBernhard Reutner-Fischer2011-11-021-19/+19
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* stubs: undef linux specific unless they were asked forBernhard Reutner-Fischer2011-11-021-0/+34
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Add eventfd support.Jean-Christian de Rivaz2011-10-313-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>
* sparc: fix build for linuxthreads.oldRob Landley2011-10-271-1/+1
| | | | | | | | | sparc target has assembly implementations of clone.S that doesn't get used, and thus the build breaks. Also, sparc is missing a header file in pthreads.old that exists in pthreads.new. Signed-off-by: Rob Landley <rob@landley.net> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* sh: fix build for SH in !NPTL caseRob Landley2011-10-271-1/+1
| | | | | Signed-off-by: Rob Landley <rob@landley.net> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* microblaze mmu/elf/shared lib supportRyan Flux2011-10-063-1/+40
| | | | | | | | | microblaze can either be with mmu or without If with, use elf rather than flat, and support shared libs Signed-off-by: Ryan Flux <ryan.flux@emsolutions.com.au> Signed-off-by: Steve Bennett <steveb@workware.net.au> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* microblaze linux has no SDA supportSteve Bennett2011-10-062-8/+0
| | | | | | | | | The linker does not set up the Small Data Area symbols, _SDA_BASE_ and _SDA2_BASE_ so don't try to resolve them Signed-off-by: Ryan Flux <ryan.flux@emsolutions.com.au> Signed-off-by: Steve Bennett <steveb@workware.net.au> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* microblaze can be either big or little endianSteve Bennett2011-10-061-1/+8
| | | | | Signed-off-by: Steve Bennett <steveb@workware.net.au> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Use the generic bits/select.h for microblazeSteve Bennett2011-10-061-58/+0
| | | | | | | This avoids warnings about type-punned pointers Signed-off-by: Steve Bennett <steveb@workware.net.au> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* ctor/dtor nptl: Fix init and fini function compilationKhem Raj2011-06-131-15/+0
| | | | | | | | | | | | We need to define the rules for .S files so it gets the include paths some architectures like mips include headers Some architectures e.g. SH have their own version of pt-initfini.c so look for that first before resorting to generic version of pt-initfini.c Signed-off-by: Khem Raj <raj.khem@gmail.com>
* ARM: remove EABI/OABI selectionYann E. MORIN2011-06-112-4/+9
| | | | | | | | | | | | | | Rely on the compiler to be properly setup for the default ABI. When installing-headers, there are two cases: - NPTL: no issue, a cross-compiler is already expected - LinuxThreads: no issue, EABI/OABI has no impact on installed headers. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> Cc: Khem Raj <raj.khem@gmail.com> Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Cc: Carmelo AMOROSO <carmelo.amoroso@st.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* ARM: detect BX availibility at build timeYann E. MORIN2011-06-111-1/+8
| | | | | | | | | | | | | | | The "use BX" option is now a suggestion that BX be used if available. Use a macro to detect if BX is available at build time. If so, and the user requested it be used, then use it. Otherwise, error out. Macro courtesy Khem RAJ: http://lists.uclibc.org/pipermail/uclibc/2009-April/042301.html Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> Cc: Khem Raj <raj.khem@gmail.com> Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Cc: Carmelo AMOROSO <carmelo.amoroso@st.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* ARM: #include <bits/arm_asm.h> where __USE_BX__ is usedYann E. MORIN2011-06-111-0/+1
| | | | | | | | | | | The check for __USE_BX__ will be available in bits/arm_asm.h, so the latter must be included wherever the former is used. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> Cc: Khem Raj <raj.khem@gmail.com> Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Cc: Carmelo AMOROSO <carmelo.amoroso@st.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Fix __libc_epoll_pwait compile failure on x86Phil Blundell2011-06-101-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>
* 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>
* unwind.h: Move to libc/sysdeps from nptl sysdepsKhem Raj2011-05-132-0/+499
| | | | 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-131-4/+21
| | | | | | | 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>
* 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>
* epoll: unify epoll.hBernhard Reutner-Fischer2011-05-112-146/+24
|
* commentary typo fixBernhard Reutner-Fischer2011-05-111-3/+3
| | | | | | 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>