summaryrefslogtreecommitdiff
path: root/libc
AgeCommit message (Collapse)Author
2009-07-08drop missing {INLINE,INTERNAL}_SYSCALL fallback logicMike Frysinger
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>
2009-07-08syscall: unify common syscall definesMike Frysinger
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>
2009-07-06sparc: Update syscalls.h to define INTERNAL_SYSCALLAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-07-05Avoid type-punned pointers that break strict-aliasingRon
Signed-off-by: Ron Lee <ron@debian.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-05Avoid warnings about shifting more bits than we haveRon
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>
2009-07-05Check #if feature test macros are defined where they may not beRon
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>
2009-07-05Provide token prototypes for functions that are external but have no headerRon
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>
2009-07-03i386: store errno value before using __set_errno()Ingo van Lil
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>
2009-07-03uClibc_arch_features: sync defines between portsMike Frysinger
Make sure each arch has the same complete list to make comparing between them easier. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-02sh: add cacheflush syscall wrapperCarmelo Amoroso
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2009-07-01Correct ARM memcpy comments.Joseph Myers
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>
2009-06-30Fix Thumb-2 setjmp.Joseph Myers
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>
2009-06-30Fix Thumb-2 memcpy.Joseph Myers
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>
2009-06-28Add missing CLIBABI variables __aeabi_stdin, __aeabi_stdout, __aeabi_stderr.Joseph Myers
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>
2009-06-28wchar: fix inverted parameters in error messageAndré Goddard Rosa
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>
2009-06-28libc.so: include all output formats in linker scriptSteve Bennett
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>
2009-05-27waitid: linux ABI takes 5 args, not 4Mike Frysinger
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>
2009-05-26Add working pipe implementation for sparcAustin Foxley
Also get rid of warning in sparc sigaction Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-05-20Add a sigaction implementation for sparcAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-05-05Add position independent code for crt1.S.Carmelo Amoroso
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>
2009-04-23libc/string/i386/memset.c: memset 1 byte at a time is a bit grossDenis Vlasenko
2009-04-18libc/inet/resolv.c:Denis Vlasenko
Collapse __length_dotted into __length_question (the sole user of it). Make __length_question and __decode_answer static, they are used only once by only one function. Delete __decode_question, it is unused. All in all, four less .o files in libc.a. Document what __dns_lookup returns (length of the packet). Propagate packet len into __decode_answer, __length_question, __decode_dotted and check that we do not use data past the end of the packet. Rename some variables/parameters to better names (len -> packet_len, data -> packet etc). Add mini-doc how DNS packets look like. Style cleanup.
2009-04-13make sure to block all signals when calling daemon() to prevent delivery ↵Mike Frysinger
while the parent is sharing the stack
2009-04-07implement daemon() using clone() on no-mmu systems as suggested by Jamie LokierMike Frysinger
2009-03-2732/64 bit sparc got unified in 2.6.29 the way x86/x86_64 did in 2.6.28.Rob Landley
The new guard symbol is "__SPARC_POSIX_TYPES_H".
2009-03-25- Add strtouq alias (to strtoul) for 64bitBernhard Reutner-Fischer
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>
2009-03-16enable mprotect() regardless of MMU as some systems have MPUs which allows ↵Mike Frysinger
memory protection
2009-03-16import user.h from the kernel as it is no longer exported by the kernelMike Frysinger
2009-03-16Update copyright header.Khem Raj
2009-03-13add GNU extension for select timeouts where the sub-second field is actually ↵Mike Frysinger
longer than one second
2009-03-10resolver:Denis Vlasenko
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
2009-03-05Define creat in an independent fileKhem Raj
2009-03-03mknod: widen the parameters to match kernelDenis Vlasenko
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
2009-03-02Add EPOLLRDHUP constantDenis Vlasenko
2009-02-27fix breakage in x86_64 defconfigDenis Vlasenko
2009-02-25Reinstate __libc_foo's needed for linuxthreads.old.Denis Vlasenko
Now they are only enabled if linuxthreads.old are selected.
2009-02-23Use gcc built-in defines for detecting SH cores instead ofCarmelo Amoroso
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>
2009-02-20Fix my previous commit to use preprocessor in the right way !Carmelo Amoroso
2009-02-20Fix typo.Carmelo Amoroso
2009-02-20sh: Fix __SH_SYSCALL_TRAP_BASE for SH2A architectureCarmelo Amoroso
Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
2009-02-18mathcalls.h: remove tons of redundant semicolons; better comment about macrosDenis Vlasenko
math.h: make macro machinery a bit more understandable No code changes (verified with objdump)
2009-02-17test/math/compile_test.c: "are long double functions even compile/link?" testDenis Vlasenko
*: fix everything which prevents above from building
2009-02-15suppress bogus ioctl on fd==INT_MAX when vasprintf() is calledDenis Vlasenko
2009-02-13- repair my r25322 that ment to deal with getdomainname()'s visibilityBernhard Reutner-Fischer
2009-02-13- fix comment style to make it compile againBernhard Reutner-Fischer
- add note about "/etc/config/" and the resolver code per se.
2009-02-13- we may need getdomainname internallyBernhard Reutner-Fischer
2009-02-13- fix link failures coming from recently added, misplaced strverscmp.Bernhard Reutner-Fischer
2009-02-13- fix fallout from r24140 and r24160 for !CTYPE_TABLESBernhard Reutner-Fischer
2009-02-13- fix compilation of !UCLIBC_HAS_CTYPE_TABLES by merging duplicate bitsBernhard Reutner-Fischer
into ctype.h
2009-02-13- workaround oddity with position of function attributesBernhard Reutner-Fischer