summaryrefslogtreecommitdiffstats
path: root/libc
Commit message (Collapse)AuthorAgeFilesLines
* nommu: use MAP_UNINITIALIZE for mallocsMike Frysinger2009-11-239-3/+15
| | | | | | | | | Now that the kernel supports MAP_UNINITIALIZE, have the malloc places use it to get real uninitialized memory on no-mmu systems. This avoids a lot of normally useless overhead involved in zeroing out all of the memory (sometimes multiple times). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* bits/mmap.h: unify ala linux asm-generic effortsMike Frysinger2009-11-2320-1786/+19
| | | | | | | | | | 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>
* 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>
* __assert: include unistd.h for smallintBernhard Reutner-Fischer2009-11-201-2/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* sync some headers and disable unused prototypesPeter S. Mazinger2009-11-191-0/+1
| | | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* msgrcv is of type ssize_tPeter S. Mazinger2009-11-191-2/+2
| | | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> 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>
* assert: make linenumber unsignedPeter S. Mazinger2009-11-191-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>
* 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>
* realpath: SUSv4 compliantBernhard Reutner-Fischer2009-11-141-14/+8
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> 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>
* regex: call memcpy() ourselvesMike Frysinger2009-10-221-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>
* 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>
* inet_ntop4: avoid inline initializationMike Frysinger2009-10-221-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>
* sparc: use fputs to write to stderrMike Frysinger2009-10-221-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>
* sparc: use HIDDEN_JUMPTARGET for errnoMike Frysinger2009-10-223-3/+3
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* mktemp does not depend on floatsAustin Foxley2009-10-171-1/+5
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* malloc: handle size overflows in realloc()Mike Frysinger2009-10-151-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>
* sparc qops: unify & shrinkMike Frysinger2009-10-151-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>
* i386: use common INTERNAL_SYSCALL_ERROR_PMike Frysinger2009-10-151-3/+0
| | | | | | The common define has the same behavior, just formatted differently. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Fix SH bits/kernel_types.h for new kernel headers.Joseph Myers2009-10-141-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>
* check stat("/etc/resolv.conf") for errorsDenys Vlasenko2009-10-141-1/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libc/inet/resolv.c: reread resolv.conf if its mtime was changedBernhard Reutner-Fischer2009-10-131-6/+9
| | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* drop __BCC__ cruft from string codeMike Frysinger2009-10-1014-131/+11
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* utime() is obsolescent in SUSv4Bernhard Reutner-Fischer2009-10-083-1/+5
| | | | | | LEGACY was removed for utimes() in SUSv4 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* ftw() is obsolescent in SUSv4Bernhard Reutner-Fischer2009-10-082-2/+5
| | | | | | Apps should switch to nftw() Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* link-time warning for obsolescent/removed network funcsBernhard Reutner-Fischer2009-10-081-0/+4
| | | | Signed-off-by: aldot <rep.dot.nop@gmail.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>
* clean up O_CLOEXEC handlingMike Frysinger2009-10-0722-43/+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>
* fcntl.h: drop unused/dead O_STREAMINGMike Frysinger2009-10-0710-10/+0
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sparc: add stubs for more of the _Q* opsAustin Foxley2009-10-051-0/+12
| | | | | | Thanks to Jason Woodward <jason.woodward@timesys.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* descriptive error messageBernhard Reutner-Fischer2009-10-051-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* errno.c: add tls versions of errno and h_errnoAustin Foxley2009-09-262-1/+15
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* dl-support.c: add tls supportAustin Foxley2009-09-261-0/+42
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* resolv.c: add support for per thread res_stateAustin Foxley2009-09-263-5/+62
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* mips: do not save variables in "hi" or "lo" across system callsDaniel Jacobowitz2009-09-261-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>
* sparc specific bits/socket.hAustin Foxley2009-09-251-0/+356
| | | | | | | use socketcall for sparc32 since it does not have the individual socket syscalls Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* add timerfd syscall and headerStephan Raue2009-09-213-1/+93
| | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com> Signed-off-by: Stephan Raue <mailinglists@openelec.tv>
* sparc sigaction.c: fix the noted bugs by syncing up with glibcAustin Foxley2009-09-211-30/+16
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* sigpause: remove libc_hidden_proto/defDenys Vlasenko2009-09-192-3/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sigwait: remove __sigwait and __GI_sigwait symbols - they are unusedDenys Vlasenko2009-09-191-6/+5
| | | | | | | | sigwait is not called from any uclibc function, so "hidden symbol" trick is not needed on it. __sigwait also is never used, and it's not clear why it even existed. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* raise: remove unused hidden weak symbol __raiseDenys Vlasenko2009-09-191-6/+2
| | | | | | | It is not used by anybody, otherwise users of dynamically linked uclibc would notice - it is not exported from libuClibc-x.x.x.so Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libc/misc/wctype/_wctype.c: make it more readable. no code changesDenys Vlasenko2009-09-191-211/+183
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* remove a few more empty #if/#endif pairsDenys Vlasenko2009-09-1911-36/+8
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* convert // comments to /**/; remove empty #if/#endif pairs. no code changesDenys Vlasenko2009-09-1852-214/+64
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* trim Experimentally off and uncommented hiddenBernhard Reutner-Fischer2009-09-18482-1837/+7
| | | | | | | | sed -i -e '/Experimentally off - /d' $(grep -rl "Experimentally off - " *) sed -i -e '/^\/\*[[:space:]]*libc_hidden_proto(/d' $(grep -rl "libc_hidden_proto" *) should be a nop Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* fix make {,install_}{,host}utilsBernhard Reutner-Fischer2009-09-181-209/+46
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>