summaryrefslogtreecommitdiffstats
path: root/libc
Commit message (Collapse)AuthorAgeFilesLines
* futimens: add functionBernhard Reutner-Fischer2009-11-222-0/+25
| | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* ppoll: get NULL from stddef.hBernhard Reutner-Fischer2009-11-221-3/+2
| | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* __assert: include unistd.h for smallintBernhard Reutner-Fischer2009-11-221-2/+1
| | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* msgrcv is of type ssize_tAustin Foxley2009-11-221-2/+2
| | | | | | | | | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Conflicts: libc/misc/sysvipc/msgq.c Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* sync some headers and disable unused prototypesPeter S. Mazinger2009-11-221-0/+1
| | | | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* SUSv4: disable isascii, toascii, _toupper, _tolowerBernhard Reutner-Fischer2009-11-221-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* assert: make linenumber unsignedPeter S. Mazinger2009-11-221-4/+3
| | | | | | | | Move attribute_noreturn to header. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* DO_XSI_MATH: add config knobBernhard Reutner-Fischer2009-11-221-0/+2
| | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* _Exit(): add weak alias to _exit() for C99Bernhard Reutner-Fischer2009-11-221-0/+1
| | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* realpath: SUSv4 compliantBernhard Reutner-Fischer2009-11-221-14/+8
| | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* include string.h for memset()Bernhard Reutner-Fischer2009-11-171-0/+2
| | | | | | This avoids a warnings about implicit declaration of function 'memset'. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* 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>
* regex: call memcpy() ourselvesMike Frysinger2009-11-091-1/+2
| | | | | | | | Call the hidden memcpy() ourselves otherwise gcc will emit a call to the public memcpy() which goes through the PLT. 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>
* inet_ntop4: avoid inline initializationMike Frysinger2009-11-091-1/+3
| | | | | | | | We only need to set the first byte to 0, but gcc likes to zero out the rest of the string with memset() when using this initialization style. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* sparc: use fputs to write to stderrMike Frysinger2009-11-091-1/+1
| | | | | | | | This also has the advantage of fputs() having a hidden alias while puts does not. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* sparc: use HIDDEN_JUMPTARGET for errnoMike Frysinger2009-11-093-3/+3
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* make the sem_open changes actually compileAustin Foxley2009-11-092-2/+2
| | | | | | __gen_tempname now needs to not be hidden so libpthread can get at it Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Extend __gen_tempname with mode argumentMikhail Gusarov2009-11-0911-17/+22
| | | | | | | | | | sem_open(3) needs to create a temporary file in a way which can't be efficiently implemented in terms of POSIX API. Extend __gen_tempname with mode_t mode argument in order to ease sem_open implementation. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* whitespace fixesAustin Foxley2009-10-1716-60/+57
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* mips: do not save variables in "hi" or "lo" across system callsDaniel Jacobowitz2009-10-171-2/+2
| | | | | | | | | | The kernel does not save these registers across system calls. GCC 4.4 has gotten more aggressive about using them for temporary variables, so this shows up as intermittent crashes if you use a recent compiler. Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* mktemp does not depend on floatsAustin Foxley2009-10-171-1/+4
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* sync a few trivial changes back to masterAustin Foxley2009-10-172-5/+5
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* hostid: style fixes to match masterAustin Foxley2009-10-171-6/+8
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* i386: use common INTERNAL_SYSCALL_ERROR_PMike Frysinger2009-10-161-3/+0
| | | | | | | The common define has the same behavior, just formatted differently. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Fix SH bits/kernel_types.h for new kernel headers.Joseph Myers2009-10-161-1/+2
| | | | | | | | | Recent SH kernel headers merge 32-bit and 64-bit headers, changing the include guards on asm/posix_types.h in the process; update uClibc code depending on those include guards. Signed-off-by: Joseph Myers <joseph@codesourcery.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* check stat("/etc/resolv.conf") for errorsDenys Vlasenko2009-10-161-1/+2
| | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* libc/inet/resolv.c: reread resolv.conf if its mtime was changedBernhard Reutner-Fischer2009-10-161-6/+9
| | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* drop __BCC__ cruft from string codeMike Frysinger2009-10-1614-131/+11
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* utime() is obsolescent in SUSv4Bernhard Reutner-Fischer2009-10-163-1/+5
| | | | | | | LEGACY was removed for utimes() in SUSv4 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* ftw() is obsolescent in SUSv4Bernhard Reutner-Fischer2009-10-162-2/+5
| | | | | | | Apps should switch to nftw() Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* link-time warning for obsolescent/removed network funcsBernhard Reutner-Fischer2009-10-161-0/+4
| | | | | Signed-off-by: aldot <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* clean up O_CLOEXEC handlingMike Frysinger2009-10-1622-47/+32
| | | | | | | | Drop the "#ifndef O_CLOEXEC" cruft, enable O_CLOEXEC in most fcntl.h headers, and import __ASSUME_O_CLOEXEC from glibc. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* malloc: handle size overflows in realloc()Mike Frysinger2009-10-161-0/+3
| | | | | | | | | | The malloc() code checks the incoming size to make sure the header adjustment doesn't cause overflow in the size storage. Add the same check to realloc() to catch stupid stuff like realloc(..., -1). Reported-by: James Coleman <james.coleman@ubicom.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* sparc qops: unify & shrinkMike Frysinger2009-10-161-51/+40
| | | | | | | | | | We don't really need to know the exact symbol that caused a failure as long as we know where to start looking. So unify the duplicate code between all funcs and between the sparc variants. This gives us a nice code shrink of ~95%. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* fcntl.h: drop unused/dead O_STREAMINGMike Frysinger2009-10-1610-10/+0
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* sparc: add stubs for more of the _Q* opsAustin Foxley2009-10-161-0/+12
| | | | | | Thanks to Jason Woodward <jason.woodward@timesys.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* descriptive error messageBernhard Reutner-Fischer2009-10-161-1/+1
| | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* sh: Align sh clone implementation with glibcCarmelo Amoroso2009-10-101-8/+7
| | | | | | | | | Align sh clone implementation with glibc one that incorporated time ago a patch provided by me slightly modified. The glibc code indeed avoids to load the r3 register if the 2nd function argument is NULL (r5). No functional change. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* sh4: Reorder code in memmove.cCarmelo Amoroso2009-10-101-32/+30
| | | | | | | Remove forward declaration for service routine. Reorder code and keep hidden_def right after the respective function. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Fix building arm EABIBernhard Reutner-Fischer2009-10-082-1/+2
| | | | | | | | | | | | | | | The syscall() impl on aeabi comes from syscall-eabi.S thus we do not need the generic syscall() impl. Fixes: AS libc/sysdeps/linux/arm/syscall-eabi.os CC libc/sysdeps/linux/common/syscall.os libc/libc_so.a(syscall.os): In function `syscall': syscall.c:(.text+0x0): multiple definition of `syscall' libc/libc_so.a(syscall-eabi.os):(.text+0x0): first defined here Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* mips nptl: Cleanup up _ABI64 warningsAustin Foxley2009-09-271-0/+2
| | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com> Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
* sh: Add new optimisation to the SH4 memcpyGiuseppe Cavallaro2009-09-271-2/+107
| | | | | | | | | | | | | | | | | | This optimization is based on prefetching and 64bit data transfer via FPU (only for the little endianess) Tests shows that: ---------------------------------------- Memory bandwidth | Gain | sh4-300 | sh4-200 ---------------------------------------- 512 bytes to 16KiB | ~20% | ~25% from 32KiB to 16MiB | ~190% | ~5% ---------------------------------------- Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* sh: add assembly strcpy and strncpyGiuseppe Cavallaro2009-09-272-0/+71
| | | | | | | | | | | | | | | | | This patch adds the strcpy and strncpy assembly routines. Benchmarks showed the following gains: ~7% for strcpy ~30% for strncpy Note: uClibc string tests pass without any failures. These functions have been only tested on SH4, for this reason I've voluntarily added them within the sh4 sub-folder. If somebody would like to test them on other SH CPUs, these can be moved on sh common folder. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* sh: add assembly strlen from KernelGiuseppe Cavallaro2009-09-271-0/+75
| | | | | | | | Faster assembly implementation of strlen taken from Linux kernel. Adapted to uClibc. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* sh: add assembly memchr from KernelGiuseppe Cavallaro2009-09-271-0/+30
| | | | | | | | Faster assembly implementation of memchr taken from Linux kernel. Adapted to uClibc. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* sh: add a new memmove optimised for SH4Giuseppe Cavallaro2009-09-271-0/+119
| | | | | | | | | | | | | | | This patch adds the memmove fuction for SH4. By default, it used the generic implementation. This new code uses the memcpy for BWD copies and implements FWD copy when required (see comment within the code itself). The idea behind is to get advantage of using the optimised memcpy for SH4 and use the FPU for FWD copies (for big sizes) as well. LMBench bw_mem test showed a significant improvement on uClibc because bcopy invokes memmove, directly. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* sh: add assembly memset from Kernel and optimise it for SH4Giuseppe Cavallaro2009-09-271-0/+146
| | | | | | | | | | | This patch adds the SH memset assembly implementation currenlty included into the Kernel. It also adds, only for little endian mode, the 64bit data transfer via FPU (using single paired precision mode). Tests shows that on SH4-300 we gain ~100% for size greater than 1KiB. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* build C files within arch subfolders.Giuseppe Cavallaro2009-09-271-1/+4
| | | | | Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Revert part of ecd7069ac6Austin Foxley2009-09-251-0/+2
| | | | | | This seemingly harmless warning fix causes mutex use in libc to crash... Signed-off-by: Austin Foxley <austinf@cetoncorp.com>