summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux/common
Commit message (Collapse)AuthorAgeFilesLines
...
* fix a few build errors for the no threads caseAustin Foxley2010-04-281-0/+1
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* enable building __fcntl_nocancel, as it used unconditionally nowAustin Foxley2010-04-251-2/+0
| | | | | | also sync up not-cancel.h headers between all three thread libraries Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* nptl: fix libc internal, dynamically enabled lockingTimo Teräs2010-04-221-12/+5
| | | | | | | | | | | | | | | | | | | | | Final iteration to fix libc internal locking if libpthread is pulled in by dlopen call (directly or indirectly). We cannot really use the weak symbol trick for shared build, since the symbols won't get refreshed if libpthread is pulled in dynamically. In glibc, they have #ifdef SHARED magic to either use pthread_functions table, or weaks. But as we shared object files with both builds, this does not sounds good either. The reintroduces the libc weaks.c, but uses them now only with static build. For dynamic build, we still use the symbols with same name, but provide weaks in forward.c so they end up dereferencing the pthread_functions table indirectly if we are not linked to libpthread. Mutex initialization is hard coded as inline, as it needs to happen even if libpthread is not initially loaded. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* nptl: remove unneeded libc-lock.h includeTimo Teräs2010-04-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | I semi-accidentally added include for libc-lock.h because the intention was to use locking macroes from there. However, we ended up using using the weak alias stuff. This is additionally good since now this can result in compile errors like: In file included from /toolchain/include/bits/uClibc_mutex.h:16, from /toolchain/include/bits/uClibc_stdio.h:107, from /toolchain/include/stdio.h:72, from /work/freetype-2.3.11/include/freetype/config/ftstdlib.h:100, from ./builds/unix/ftconfig.h:43, from builds/unix/ftsystem.c:21: /toolchain/include/bits/libc-lock.h:309: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' Remove the unneeded include causing breakage. Reported-by: Kevin Day <thekevinday@gmail.com> Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* libc: remove libc weak __pthreads_* wrappersTimo Teras2010-04-162-8/+21
| | | | | | | | | | | | | | | | | It is not possible to override for libpthread to override the weak libc definitions. This has never worked in uclibc, and does no longer work in glibc either (unless you use LD_DYNAMIC_WEAK). The proper thing to do is have weak prototypes in libc, and definitions in libpthread only. This way libc runs even if those functions are not defined, but just needs to protect against the NULL values (done by implementing __uclibc_maybe_call). This fix the problems if libc is linked before libpthread or if libpthread is pulled by a dependency library. Signed-off-by: Timo Teras <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* nptl: fix libc sigtimedwaitTimo Teräs2010-04-151-2/+3
| | | | | | | | | | | | | | | | | | It seems that 57e8823548ad6e65d33b2153edeb18fb0edc20e6 removed completely sigtimedwait symbol from libc which is wrong. I hope there is not too many other things like this. Apparently the libc_hidden_* macros actually make previously hidden symbols visible globally (creates alias from __GI_* to *). This is probably ancient confusion from times when gcc did not support visibility attribute and hiding symbols was done using hacks like this. This also adds attribute_hidden to the internal __sigtimedwait for nptl case. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* poll.c: fix incorrect mergeAustin Foxley2010-04-021-3/+1
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Merge commit 'origin/master' into nptlAustin Foxley2010-04-025-6/+15
|\ | | | | | | | | | | | | | | | | | | | | | | 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-251-2/+2
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * pull kernel-features.h from NPTLBernhard Reutner-Fischer2010-03-051-18/+392
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * poll: unavailable on linux < 2.2.0Bernhard Reutner-Fischer2010-03-042-1/+7
| | | | | | | | | | | | fixes bug #253 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * libc: Add a common sysdep headerCarmelo Amoroso2010-02-101-0/+139
| | | | | | | | | | | | | | | | | | | | Add a common header file to provide macros useful in asm code: C_LABEL to construct the asm name for a C symbol cfi_xxx to generate eh_frame unwind information. Ported from NPTL branch. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
| * getdents: Fix mips64 buildAtsushi Nemoto2010-02-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Wed, 27 Jan 2010 07:14:08 +0100, Carmelo AMOROSO <carmelo.amoroso@st.com> wrote: > I would re-write your patch in a simpler way. > > We already have the following > > 136 #if defined __UCLIBC_HAS_LFS__ && ! defined __NR_getdents64 > 137 attribute_hidden strong_alias(__getdents,__getdents64) > 138 #endif > > I think that it's simpler to move in the proper place this statement. Thanks, indeed. If we came into "#elif WORDSIZE == 32" block, above condition never be true. So we can just move this statement out of "#if...#elif...#elif...#endif" block. Here is a revised patch. ------------------------------------------------------ From: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Subject: [PATCH] getdents: Fix mips64 build Some archs (such as mips64) do not have getdents64 syscall but have getdents syscall. Define alias for it. This fixes regression from 0.9.30.1. Backgrounds: This is once done by commit e8b1c674. But after the commit 33bcf733 ("Use getdents syscall if kernel provide supports for this instead of relying upon getdents64."), if __ASSUME_GETDENTS32_D_TYPE was defined the alias for getdents64 is not defined. The macro __ASSUME_GETDENTS32_D_TYPE had been effectively ignored until 0.9.30.1 but the commit 0f0f20ab ("Move kernel-features.h header from the linuxthread directory to a common one...") really enables it. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* | add dwarf defines used in cfi statementsAustin Foxley2010-02-191-0/+19
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | update kernel-features.h with futex featuresAustin Foxley2010-02-191-0/+17
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | fixes to get nptl compiling for x86_64Austin Foxley2010-02-191-1/+1
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | Get new nptl building on SH4Khem Raj2010-02-171-0/+1
| | | | | | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* | Add missing libgcc_s.h header.Khem Raj2010-02-171-0/+2
| | | | | | | | | | | | * Do not include tls.h in aeabi_read_tp.S. Its not needed. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* | Assorted fixed to get nptl compiling on ARMKhem Raj2010-02-172-15/+51
| | | | | | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* | nptl: sysdep headers re-factoringCarmelo Amoroso2010-02-091-0/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch will re-factor and simplify sysdep headers handling for nptl branch. The reason is to use some useful macros in asm code (i.e. ENTRY()) that are available only into nptl branch because are defined in sysdep.h header under the nptl folder even if they are not related to NPTL at all (this was likely due to a bad choice done at the early stage of NPTL porting). This is a required steps for integrating into master branch some asm code available in nptl branch for sh4. The main changes are described below: nptl/sysdeps/generic/sysdep.h (moved) ---> libc/sysdeps/linux/common/sysdep.h nptl/sysdeps/arm/sysdep.h (moved) ---> libc/sysdeps/linux/arm/sysdep.h nptl/sysdeps/sh/sysdep.h ---------------------| nptl/sysdeps/unix/sh/sysdep.h ----------------| nptl/sysdeps/unix/sysv/linux/sh/sysdep.h -----| nptl/sysdeps/unix/sysv/linux/sh/sh4/sysdep.h -| |(merged) ---> libc/sysdeps/linux/sh nptl/sysdeps/unix/sysdep.h (deleted) Similarly the mips and arm sysdep.h should be merged and updated as for sh arch. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* | Merge commit 'origin/master' into nptlAustin Foxley2010-02-055-13/+31
|\| | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * prctl: silence shadow warningsBernhard Reutner-Fischer2010-02-051-1/+1
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * remove two checks for gettimeofday errorDenys Vlasenko2010-02-021-4/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * time,times: stop interpreting negative return values ar errorsDenys Vlasenko2010-02-023-8/+24
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | kernel-features: add __ASSUME_POSIX_CPU_TIMERSBernhard Reutner-Fischer2010-02-051-0/+5
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | Merge branch 'master' into nptlCarmelo Amoroso2010-01-251-1/+3
|\| | | | | | | | | | | | | | | | | | | Conflicts: libc/inet/Makefile.in libc/inet/hostid.c Synchronise nptl branch with master branch @ c4b750195714ec7c10aa4de15610c5aae0751c1c Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
| * silence warning about implicit decl of sysctlBernhard Reutner-Fischer2010-01-221-1/+3
| | | | | | | | | | | | ... and reinstate comment explaining the gory details Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * futimens: add missing local prototypeBernhard Reutner-Fischer2010-01-161-0/+1
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | futimens: add missing local prototypeBernhard Reutner-Fischer2010-01-211-0/+1
| | | | | | | | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> (cherry picked from commit d0a8b14169c6f01dadd07f6b4e14cc335a62f234) Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* | Merge commit 'origin/master' into nptlAustin Foxley2009-12-191-2/+1
|\| | | | | | | | | | | | | | | Conflicts: libc/signal/sigpause.c libc/string/x86_64/memset.S Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * x86_64: fix multiple definition of chk functionsAustin Foxley2009-12-191-2/+1
| | | | | | | | | | | | also enable __chk_fail and only try to call it when SSP is on Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * uClibc_ctype.h: fix inverted check for susv4 macroAustin Foxley2009-11-301-1/+1
| | | | | | | | | | | | Was causing build failures if ctype tables were disabled and susv4 was on Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | x86_64: no waitpid syscall exists, so use wait4Austin Foxley2009-12-161-3/+5
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | uClibc_ctype.h: fix inverted check for susv4 macroAustin Foxley2009-11-301-1/+1
| | | | | | | | | | | | Was causing build failures if ctype tables were disabled and susv4 was on Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | Merge remote branch 'origin/master' into nptlAustin Foxley2009-11-286-115/+220
|\| | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * sync confname, environments with glibcBernhard Reutner-Fischer2009-11-262-17/+102
| | | | | | | | | | | | | | Plus related synch. Add a testcase for the sysconf variables based on the one from glibc Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * in6_{pktinfo,mtuinfo}: provide type if IPV6 is onBernhard Reutner-Fischer2009-11-251-0/+2
| | | | | | | | | | | | Disable some IPv6 header defines if IPv6 is off. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * bits/mmap.h: unify ala linux asm-generic effortsMike Frysinger2009-11-232-97/+110
| | | | | | | | | | | | | | | | | | | | Most ports have the same exact mman bit defines, so let's unify things like the linux kernel has with the asm-generic efforts. A few ports are left behind as they are non-trivial to merge -- the arch maintainers can tackle it if they care. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * futimens: Ducument why we need manual hidden_protoBernhard Reutner-Fischer2009-11-231-1/+6
| | | | | | | | | | | | | | Also, remove unneeded __need_timespec (It cuts off a tiny bit of work for CPP but is of course not strictly needed). Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | Merge remote branch 'origin/master' into nptl_mergeAustin Foxley2009-11-226-3/+32
|\| | | | | | | | | | | | | | | | | Conflicts: Rules.mak libc/misc/sysvipc/msgq.c test/Rules.mak Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * futimens: add functionBernhard Reutner-Fischer2009-11-202-0/+25
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * ppoll: get NULL from stddef.hBernhard Reutner-Fischer2009-11-201-3/+2
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * SUSv4: disable isascii, toascii, _toupper, _tolowerBernhard Reutner-Fischer2009-11-191-0/+2
| | | | | | | | | | | | | | [__]isascii need to be defined all the time for the build. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * DO_XSI_MATH: add config knobBernhard Reutner-Fischer2009-11-191-0/+2
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * _Exit(): add weak alias to _exit() for C99Bernhard Reutner-Fischer2009-11-191-0/+1
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * disable _POSIX_SPAWN defineMike Frysinger2009-10-221-0/+2
| | | | | | | | | | | | | | We don't provide spawn.h let alone any other spawn funcs/types, so don't set up the _POSIX_SPAWN define that some packages (like vlc) check. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * sysctl: avoid inline initializationMike Frysinger2009-10-221-17/+9
| | | | | | | | | | | | | | | | Assign each field one by one rather than stack initialization as gcc will call memset() to zero out the rest of the structure -- which we don't care about as the field is unused and not seen outside of the libc. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | disable _POSIX_SPAWN defineMike Frysinger2009-11-091-0/+2
| | | | | | | | | | | | | | | | We don't provide spawn.h let alone any other spawn funcs/types, so don't set up the _POSIX_SPAWN define that some packages (like vlc) check. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | sysctl: avoid inline initializationMike Frysinger2009-11-091-17/+9
| | | | | | | | | | | | | | | | | | Assign each field one by one rather than stack initialization as gcc will call memset() to zero out the rest of the structure -- which we don't care about as the field is unused and not seen outside of the libc. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | whitespace fixesAustin Foxley2009-10-175-6/+5
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>