summaryrefslogtreecommitdiffstats
path: root/libc
Commit message (Collapse)AuthorAgeFilesLines
...
* build: Include Makefile.commonarch from common Makefile.inCarmelo Amoroso2009-07-2920-38/+1
| | | | | | | | Avoid including akefile.commonarch in each Makefile.arch. Include it instead from Makefile.in just after the arch specific Makefile.arch Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* sh: Fix up optimized SH-4 memcpy on big endian.Giuseppe Cavallaro2009-07-141-12/+12
| | | | | | | | | | Signed-off-by: Hideo Saito <saito@densan.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> See Linux Kernel commit: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e08b954c9a140f2062649faec72514eb505f18c3 Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Readd the thread local version of __res_stateAustin Foxley2009-07-101-3/+51
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Sync nptl branch to masterAustin Foxley2009-07-092-1527/+2007
| | | | | | | | | | | | | | Cherry picked these commits: afdfa59588: Do not install libc-XXX.h files fb863f7592: Make HARDWIRED_ABSPATH a config option e0c8160a38: Allow people to run hostutils targets without .config e0da861a29: Don't rely on features.h ac1087a727: Denis's resolv.c cleanup Pulled out the thread local __res_state in resolv. Will reapply it in a future commit. Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* syscall(): create a common version based on INLINE_SYSCALL_NCS()Mike Frysinger2009-07-095-78/+14
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* syscall: unify part 2: NCS varietyMike Frysinger2009-07-0914-78/+40
| | | | | | | | Declare common NCS (non-constant syscall) variants and convert the existing ports over to this. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* drop missing {INLINE,INTERNAL}_SYSCALL fallback logicMike Frysinger2009-07-098-102/+0
| | | | | | | | Ports missing INLINE_SYSCALL() support need to get fixed, so drop the cruft keeping them alive since it no longer works with the unification. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* syscall: unify common syscall definesMike Frysinger2009-07-0914-1061/+316
| | | | | | | | | | Unify all the common syscall defines in syscalls-common.h and scrub all the duplicated code from relevant ports. This should also make converting existing ports to INLINE_SYSCALL() much easier as they don't have to get lost in all the unrelated noise, as well as creating new ports. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Avoid type-punned pointers that break strict-aliasingRon2009-07-091-3/+6
| | | | | | Signed-off-by: Ron Lee <ron@debian.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Avoid warnings about shifting more bits than we haveRon2009-07-091-2/+4
| | | | | | | | | | The test here is a constant expression and will compile out. For platforms that don't need the shift the code gets slightly smaller and simpler, for those that do the result is unchanged. Signed-off-by: Ron Lee <ron@debian.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Check #if feature test macros are defined where they may not beRon2009-07-091-1/+1
| | | | | | | | | | Once again all of these reduce the noise from gcc-4.4. Replaces a few more (USE_TLS && HAVE___THREAD) with USE___THREAD while we need to mess with them for this anyhow. Signed-off-by: Ron Lee <ron@debian.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Provide token prototypes for functions that are external but have no headerRon2009-07-0911-31/+26
| | | | | | | | This cuts down on a lot of noise from gcc-4.4 Signed-off-by: Ron Lee <ron@debian.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* i386: store errno value before using __set_errno()Ingo van Lil2009-07-091-4/+3
| | | | | | | | | | | | The __syscall_error() function stores the errno value in the edx register before invoking the __set_errno() macro. When using the pthread library this macro calls thread_self() to determine the errno location, which might clobber the edx register. The errno value must be stored in a "real" variable so the compiler can take care of saving/restoring it if necessary. Signed-off-by: Ingo van Lil <inguin@gmx.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* uClibc_arch_features: sync defines between portsMike Frysinger2009-07-0926-5/+205
| | | | | | | | Make sure each arch has the same complete list to make comparing between them easier. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Correct ARM memcpy comments.Joseph Myers2009-07-091-1/+2
| | | | | | | | | The comments on register usage in ARM memcpy had dest and src the wrong way round; this patch (originally from Mark Shinwell) corrects this and adds a note on the return value. Signed-off-by: Joseph Myers <joseph@codesourcery.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Fix Thumb-2 setjmp.Joseph Myers2009-07-091-1/+1
| | | | | | | | | Many Thumb-2 instructions cannot use sp or pc as operands, and the assembler now diagnoses these. setjmp had one such instruction, movs; this patch changes it to mov. Signed-off-by: Joseph Myers <joseph@codesourcery.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Fix Thumb-2 memcpy.Joseph Myers2009-07-091-1/+1
| | | | | | | | | | When an IT block was changed from having two instructions to having one, the IT instruction at the start of the block was not updated, causing memcpy to fail to assemble for Thumb-2; this patch makes the obvious fix. Signed-off-by: Joseph Myers <joseph@codesourcery.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Add missing CLIBABI variables __aeabi_stdin, __aeabi_stdout, __aeabi_stderr.Joseph Myers2009-07-091-0/+15
| | | | | | | | | | | | The ARM EABI has a document CLIBABI specifying various __aeabi_* functions and variables to be provided for the use of portable objects that can be linked with different EABI-conforming C libraries. __aeabi_stdin, __aeabi_stdout and __aeabi_stderr were missing in uClibc; this patch (originally from Nathan Froyd and for glibc) adds them. Signed-off-by: Joseph Myers <joseph@codesourcery.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* wchar: fix inverted parameters in error messageAndré Goddard Rosa2009-07-091-1/+1
| | | | | | | | | | | The error message should output "fromcode -> tocode" rather than "tocode -> fromcode". Seems to be a typo due to the order of the func called: iconv_t iconv_open(const char *tocode, const char *fromcode); Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* libc.so: include all output formats in linker scriptSteve Bennett2009-07-091-2/+2
| | | | | | | | | | | Rather than ripping out the default output format from the linker, include the big/little endian alternatives for the people who link with bi-endian toolchains. URL: http://lists.uclibc.org/pipermail/uclibc/2009-June/042595.html Signed-off-by: Steve Bennett <steveb@workware.net.au> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* sh: Add licensing statement to cacheflush.cCarmelo Amoroso2009-07-021-0/+2
| | | | Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* sh: add cacheflush syscall wrapperGiuseppe Cavallaro2009-07-022-1/+14
| | | | | Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* waitid: linux ABI takes 5 args, not 4Mike Frysinger2009-06-051-5/+52
| | | | | | | | | The POSIX waitid() takes 4 args, but the Linux one takes 5 args, so make sure we stuff the 5th arg with a NULL. Otherwise garbage gets randomly passed up and considering this is a pointer, that's baaaad. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Add working pipe implementation for sparcAustin Foxley2009-05-263-3/+69
| | | | | | Also get rid of warning in sparc sigaction Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Fix whitespaceAustin Foxley2009-05-261-2/+2
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Get sparc64 nptl compilingAustin Foxley2009-05-211-0/+102
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Adjust build of sigaction for the nptl caseAustin Foxley2009-05-201-1/+5
| | | | | | This brings sparc inline with other archs with nptl support Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Add a sigaction implementation for sparcAustin Foxley2009-05-202-1/+95
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Only use fstat64 when LFS is enabledAustin Foxley2009-05-201-1/+9
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Add position independent code for crt1.S.Carmelo Amoroso2009-05-051-0/+45
| | | | | | | | | This will generate a Scrt1.o that is linked to executabled when compiled as PIE code (position independent executable) without requiring relocation in .text section (not allowed on uclibc/sh4). Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk> Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
* libc/string/i386/memset.c: memset 1 byte at a time is a bit grossDenis Vlasenko2009-04-231-9/+56
|
* Merged revisions 26046,26062,26066,26078 via svnmerge from Khem Raj2009-04-141-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://kraj@svn.uclibc.org/svn/trunk/uClibc ........ r26046 | aldot | 2009-04-09 10:48:17 -0700 (Thu, 09 Apr 2009) | 2 lines - fix typo ........ r26062 | austinf | 2009-04-10 17:08:47 -0700 (Fri, 10 Apr 2009) | 4 lines sparc also needs CONSTANT_STRING_GOT_FIXUP for doing debug printing in ldso Signed-off-by: Austin Foxley <austinf@cetoncorp.com> ........ r26066 | austinf | 2009-04-11 12:30:04 -0700 (Sat, 11 Apr 2009) | 5 lines for sparc v8 MAGIC1 was defined incorrectly Signed-off-by: Austin Foxley <austinf@cetoncorp.com> ........ r26078 | vapier | 2009-04-12 17:06:40 -0700 (Sun, 12 Apr 2009) | 1 line make sure to block all signals when calling daemon() to prevent delivery while the parent is sharing the stack ........
* Merged revisions 25971,26002 via svnmerge from Khem Raj2009-04-072-10/+26
| | | | | | | | | | | | | | svn+ssh://svn.uclibc.org/svn/trunk/uClibc ........ r25971 | vapier | 2009-04-05 23:40:57 -0700 (Sun, 05 Apr 2009) | 1 line apply getline() fix from linux kernel ........ r26002 | vapier | 2009-04-06 22:52:48 -0700 (Mon, 06 Apr 2009) | 1 line implement daemon() using clone() on no-mmu systems as suggested by Jamie Lokier ........
* Merged revisions 25821,25823-25824,25836 via svnmerge from Khem Raj2009-03-282-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://svn.uclibc.org/svn/trunk/uClibc ........ r25821 | aldot | 2009-03-25 12:27:56 -0700 (Wed, 25 Mar 2009) | 2 lines - do not pass -Wl with -shared in LDFLAGS_NOSTRIP (Peter S. Mazinger) ........ r25823 | aldot | 2009-03-25 13:28:19 -0700 (Wed, 25 Mar 2009) | 8 lines - Add strtouq alias (to strtoul) for 64bit The strtouq alias was only available on 32bit, breaking compilation of stuff using strtouq on 64bit machines. At the same time use the correct return type (u_quad_t). Signed-of-by: Peter Korsgaard <jacmet@sunsite.dk> ........ r25824 | aldot | 2009-03-26 01:51:47 -0700 (Thu, 26 Mar 2009) | 2 lines - ignore objects ........ r25836 | landley | 2009-03-26 21:03:20 -0700 (Thu, 26 Mar 2009) | 3 lines 32/64 bit sparc got unified in 2.6.29 the way x86/x86_64 did in 2.6.28. The new guard symbol is "__SPARC_POSIX_TYPES_H". ........
* sparc atomic.h: resort to v7/v8 atomic operations in the static case, austinf2009-03-211-10/+12
| | | | | since we have no _dl_hwcap to test whether we can use v9 at runtime
* sparc32 nptl functionalaustinf2009-03-196-99/+523
| | | | | | | | | * pulled updated asm and headers from glibc for sparc32 * probably no cancellation support yet * no shared TLS relocs yet, since ldso is hosed on sparc still note: didn't use TARGET_SUBARCH method of includes since that would cause other parts of libc to fail currently. Will need to be fixed later.
* Merged revisions 25669-25670,25673-25674 via svnmerge from Khem Raj2009-03-162-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://svn.uclibc.org/svn/trunk/uClibc ........ r25669 | vapier | 2009-03-15 23:14:34 -0700 (Sun, 15 Mar 2009) | 1 line import user.h from the kernel as it is no longer exported by the kernel ........ r25670 | vapier | 2009-03-15 23:16:15 -0700 (Sun, 15 Mar 2009) | 1 line enable mprotect() regardless of MMU as some systems have MPUs which allows memory protection ........ r25673 | carmelo | 2009-03-16 06:33:27 -0700 (Mon, 16 Mar 2009) | 2 lines Added string.h header for strerr prototype. ........ r25674 | carmelo | 2009-03-16 06:36:39 -0700 (Mon, 16 Mar 2009) | 10 lines Fixed makefiles inclusion flow to pass actual configuration variable values. Test build system modified to be similar to uClibc one: * test custom logic moved from Makefile to a new Makefile.in (to be included by Makefile). * Makefile same for all tests and just used for including all other needed makefiles. Signed-off-by: Salvatore Cro <salvatore.cro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> ........
* Merged revisions 25638,25640,25642,25649-25650,25667-25668 via svnmerge from Khem Raj2009-03-162-9/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://svn.uclibc.org/svn/trunk/uClibc ........ r25638 | vda | 2009-03-12 13:56:59 -0700 (Thu, 12 Mar 2009) | 10 lines linuxthreads fixes from Will Newton (will.newton AT gmail.com): * share Sys V semaphores in order to get appropriate SEM_UNDO semantics. * correct guardaddr in pthread_free() for TLS case * move spinlock unlocking before restart() * When exit was called from a signal handler, the restart from the manager processing the exit request instead restarted the thread in pthread_cond_timedwait. (see http://sources.redhat.com/ml/libc-ports/2006-05/msg00000.html) ........ r25640 | vda | 2009-03-12 16:04:19 -0700 (Thu, 12 Mar 2009) | 3 lines add linuxthreads support for arm. By Will Newton (will.newton AT gmail.com) ........ r25642 | vapier | 2009-03-12 23:17:48 -0700 (Thu, 12 Mar 2009) | 1 line add GNU extension for select timeouts where the sub-second field is actually longer than one second ........ r25649 | vapier | 2009-03-14 04:23:28 -0700 (Sat, 14 Mar 2009) | 1 line force DOPIC for FDPIC ELF targets ........ r25650 | vapier | 2009-03-14 04:30:56 -0700 (Sat, 14 Mar 2009) | 1 line default linux-2.4 module support to off for Blackfin targets ........ r25667 | vda | 2009-03-15 19:56:27 -0700 (Sun, 15 Mar 2009) | 3 lines docs/pthreads_hacking.txt: new file ........ r25668 | kraj | 2009-03-15 23:02:47 -0700 (Sun, 15 Mar 2009) | 2 lines Update copyright header. ........
* resolver:Denis Vlasenko2009-03-101-63/+7
| | | | | | | res_query: do not unconditionally set h_errno to TRY_AGAIN (closes bug 173). cleanups: s/__dn_expand/dn_expand/, remove superfluous dn_expand declaration, remove libc_hidden_proto junk
* Merged revisions 25556 via svnmerge from Khem Raj2009-03-052-5/+15
| | | | | | | | | | svn+ssh://kraj@svn.uclibc.org/svn/trunk/uClibc ........ r25556 | kraj | 2009-03-05 11:07:01 -0800 (Thu, 05 Mar 2009) | 1 line Define creat in an independent file ........
* mknod: widen the parameters to match kernelDenis Vlasenko2009-03-035-18/+21
| | | | | | | | | ustat: same, + remove superfluous "conversion" which does nothing at best, loses high dev bits at worst i386/bits/kernel_stat.h: update to reflect reality (wider dev_t) h8300/bits/kernel_stat.h: same arm/bits/kernel_stat.h: cosmetics to match kernel header to the letter
* Add EPOLLRDHUP constantDenis Vlasenko2009-03-021-0/+2
|
* fix breakage in x86_64 defconfigDenis Vlasenko2009-02-277-57/+13
|
* reinstate __libc_foo for linuxthreads.oldDenis Vlasenko2009-02-257-0/+37
|
* Use gcc built-in defines for detecting SH cores instead ofCarmelo Amoroso2009-02-235-6/+6
| | | | | | | | | | | | | uclibc config option macros (aligning SH to all other archs). Changes applied as below: __CONFIG_SH4__ -> __SH4__ __CONFIG_SH2__ -> __sh2__ __CONFIG_SH2A__ -> __SH2A__ Note: pay attention to capital letters Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Fix my previous commit to use preprocessor in the right way !Carmelo Amoroso2009-02-201-1/+1
|
* Fix typo.Carmelo Amoroso2009-02-201-1/+1
|
* Use __UCLIBC_HAS_TLS__ (now available) as guard for TLS relatedCarmelo Amoroso2009-02-202-3/+3
| | | | | | | | stuff, instead of __UCLIBC_HAS_THREADS_NATIVE__. This is in preparation on trunk merge to make TLS compatible with LT (new) and NPTL. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* sh: Fix __SH_SYSCALL_TRAP_BASE for SH2A architectureCarmelo Amoroso2009-02-201-1/+1
| | | | Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
* Synch kernel_types.h (i386, x86_64) with trunkCarmelo Amoroso2009-02-192-2/+2
|