summaryrefslogtreecommitdiffstats
path: root/libc
Commit message (Collapse)AuthorAgeFilesLines
* time,times: stop interpreting negative return values ar errorsDenys Vlasenko2010-02-023-8/+24
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* errno: hide __libc_resp, __libc_errno, and __libc_h_errnoKhem Raj2010-02-012-4/+3
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* convert to foo-y kbuild styleBernhard Reutner-Fischer2010-01-262-67/+35
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* wchar.c: fix indentationDenys Vlasenko2010-01-241-10/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* gethostid: switch to getaddrinfo and shrinkBernhard Reutner-Fischer2010-01-241-41/+26
| | | | | | | | text data bss dec hex filename 382 0 0 382 17e libc/inet/hostid.os.old 326 0 0 326 146 libc/inet/hostid.os Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* getprotoent_r: use correct define for return valueBernhard Reutner-Fischer2010-01-231-1/+1
| | | | | | Doesn't correctly set result=NULL on error or EOF. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* fix typo in previous commitBernhard Reutner-Fischer2010-01-231-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* silence some warnings about unused paramsBernhard Reutner-Fischer2010-01-234-6/+8
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc/inet: mark other odd /etc/conf/ spotBernhard Reutner-Fischer2010-01-231-0/+2
| | | | | | and wrap it in FALLBACK_TO_CONFIG_RESOLVCONF too. -24b Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc/inet: set path to resolver file via CPPBernhard Reutner-Fischer2010-01-2334-33/+34
| | | | | | No objcode changes. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc/inet: convert to foo-y kbuild styleBernhard Reutner-Fischer2010-01-231-33/+19
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.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>
* avr32: add varargs handling of prctl syscallHans-Christian Egtvedt2010-01-212-1/+37
| | | | | | | | prctl is defined to use varargs in the header file, hence it needs varargs specific handling in the source. This patch properly handles the variodic argument before the syscall is passed to the kernel for the AVR32 architecture. Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
* wordexp: silence shadow warningBernhard Reutner-Fischer2010-01-211-18/+18
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* fix typo in version mismatch msgBernhard Reutner-Fischer2010-01-211-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* ether_line: fix build for socket && !ipBernhard Reutner-Fischer2010-01-211-2/+2
| | | | | | The internal __ether_line helper needs ether_ntoa_r() 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>
* include unistd.h for smallintYoshinori Sato2010-01-161-0/+1
| | | | | Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* mips/nptl: Pass correct parameters to dl_find_hash when resolving TLS ↵Khem Raj2010-01-141-33/+13
| | | | | | | | | relocations. Make use of macros from sys/asm.h in crt1.S These two changes are needed for mips nptl to boot once again. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* ctime: do not use static struct tm bufferDenys Vlasenko2010-01-091-3/+17
| | | | | | | | text data bss dec hex filename - 19 0 0 19 13 libc/misc/time/ctime.o + 25 0 0 25 19 libc/misc/time/ctime.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* malloc: fix race condition and other bugs in the no-mmu mallocFreeman Wang2009-12-192-6/+7
| | | | | | | | | | | | | | Fixes multiple race conditions on mmb list. This was done by making the mmb_heap_lock into a recursive lock and making the regular heap_lock extend to cover the mmb heap handling. Also move the new_mmb allocation up to before the mmb list is iterated through to find the insertion point. When the mmb_heap also runs out and needs to be extended when the regular heap is just extended, the mmb list could be messed up. Signed-off-by: Freeman Wang <xwang@ubicom.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* x86_64: fix multiple definition of chk functionsAustin Foxley2009-12-195-3/+8
| | | | | | also enable __chk_fail and only try to call it when SSP is on Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* check if USE_TLS is defined before useHans-Christian Egtvedt2009-12-171-3/+3
| | | | | | | | | | | This patch will convert all the #ifdef USE_TLS and #if USE_TLS to #if defined(USE_TLS) && USE_TLS. By checking if the USE_TLS is defined before checking its value will result in correct behavior for architectures not defining this config symbol. Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Acked-by: Carmelo AMOROSO <carmelo.amoroso@st.com>
* libc: Remove pointless header string.hCarmelo Amoroso2009-12-161-1/+0
| | | | | | It is already include from the internal header sigset-cvt-mask.h Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* libc: Add missing header for memsetCarmelo Amoroso2009-12-164-5/+2
| | | | | | | | | Silence compiler warning by adding the missing string.h header to include memset prototype. Do some code tidy-up removing commented out libc_hidden_proto macros in the meanwhile. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* build: Get rids of PIC macro using compiler flag __PIC__ insteadCarmelo Amoroso2009-12-163-4/+4
| | | | | | | Based on Peter Mazinger's comments on a recent commit, I decided to get rids of all occurrences of PIC changing them to __PIC__ Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* sh: fix endianess and optimise the SH4 memcpyGiuseppe Cavallaro2009-12-141-2/+107
| | | | | | | | | | | | | | | | | | This patch fixes the big-endian code and adds a new optimization only for little endian mode. This optimization is based on prefetching and 64bit data transfer via FPU. 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>
* syslog: use send(MSG_NOSIGNAL) instead of write, thus no need to handle SIGPIPEDenys Vlasenko2009-12-131-7/+6
| | | | | | | | | | | Size changes by this and previous change: text data bss dec hex filename 1151 13 2 1166 48e libc/misc/syslog/syslog.o 1093 10 2 1105 451 libc/misc/syslog/syslog.o 1047 10 2 1059 423 libc/misc/syslog/syslog.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* syslog: fix openlog(xx, LOG_KERN) and optimize a bitDenys Vlasenko2009-12-131-45/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix: logfac == 0 in openlog(xx, logfac) is allowed now. Corresponding internal openlog() call in vsyslog() uses explicit LOG_USER in order to set it as a default facility. Optimizations: mylock is not recursive now, since a single intenal call of openlog is converted to a call to openlog_internal which assumes that lock is already taken. No recursive locking is possible now. LogFacility is reduced to byte. cache static LogFile in auto variable fd (smaller code). vsyslog with bogus pri parameter wouldn't lock/unlock and mess with signals - it will just return at once. pass NULL as ident string in internal openlog call - same effect as passing LogTag but smaller code. comment out "if (LogTag)" checks - it is never NULL. use the same struct sigaction for setting new sigaction and for saving old one - saves ~32 bytes of stack. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Include bits/libc-lock.h to get __libc_once_defineKhem Raj2009-12-111-0/+1
| | | | | Signed-off-by: Khem Raj <raj.khem@gmail.com> Acked-by: Austin Foxley <austinf@cetoncorp.com>
* sh: Add a prototype for the gcc __set_fpscr internal functionCarmelo Amoroso2009-12-031-1/+3
| | | | | | | | | The sh port uses the gcc __set_fpscr internal function, but neither gcc nor glibc creates a prototype for it. This leads to a bunch of random warnings about implicit decls during the build. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.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>
* make x86_64 struct utmp glibc-compatibleDenys Vlasenko2009-11-271-1/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sync confname, environments with glibcBernhard Reutner-Fischer2009-11-263-18/+128
| | | | | | | 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>
* 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>