summaryrefslogtreecommitdiff
path: root/libc
AgeCommit message (Collapse)Author
2010-02-01Fix accidently dropped hunk during last merge from master.Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2010-02-01Merge commit 'origin/master' into nptlKhem Raj
Conflicts: libc/stdlib/Makefile.in Signed-off-by: Khem Raj <raj.khem@gmail.com>
2010-02-01errno: hide __libc_resp, __libc_errno, and __libc_h_errnoKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2010-01-26convert to foo-y kbuild styleBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-01-25Merge branch 'master' into nptlCarmelo Amoroso
Conflicts: libc/inet/Makefile.in libc/inet/hostid.c Synchronise nptl branch with master branch @ c4b750195714ec7c10aa4de15610c5aae0751c1c Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-01-24wchar.c: fix indentationDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-24gethostid: switch to getaddrinfo and shrinkBernhard Reutner-Fischer
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>
2010-01-23getprotoent_r: use correct define for return valueBernhard Reutner-Fischer
Doesn't correctly set result=NULL on error or EOF. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-01-23fix typo in previous commitBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-01-23silence some warnings about unused paramsBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-01-23libc/inet: mark other odd /etc/conf/ spotBernhard Reutner-Fischer
and wrap it in FALLBACK_TO_CONFIG_RESOLVCONF too. -24b Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-01-23libc/inet: set path to resolver file via CPPBernhard Reutner-Fischer
No objcode changes. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-01-23libc/inet: convert to foo-y kbuild styleBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-01-22silence warning about implicit decl of sysctlBernhard Reutner-Fischer
... and reinstate comment explaining the gory details Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-01-21wordexp: silence shadow warningBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> (cherry picked from commit 831ea78623556cbfae002477afc6256cacaaf2c6) Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-01-21fix typo in version mismatch msgBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> (cherry picked from commit 0d30e6a7666c3cab001e7343a71bfa2d3e5abbd4) Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-01-21ether_line: fix build for socket && !ipBernhard Reutner-Fischer
The internal __ether_line helper needs ether_ntoa_r() Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> (cherry picked from commit 81264e8097b705f3b2a7e29be0a1a2ea853230cb) Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-01-21futimens: add missing local prototypeBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> (cherry picked from commit d0a8b14169c6f01dadd07f6b4e14cc335a62f234) Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-01-21include unistd.h for smallintYoshinori Sato
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> (cherry picked from commit df9130a0dc1c9e3553fcfee68bb8a809e4f4a458) Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-01-21mips/nptl: Pass correct parameters to dl_find_hash when resolving TLS ↵Khem Raj
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> (cherry picked from commit 9c343fd4030dcd7a52616f365893177dded50346) Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-01-21ctime: do not use static struct tm bufferDenys Vlasenko
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> (cherry picked from commit 957e238614326198452b53498ae98e546fce7366) Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-01-21avr32: add varargs handling of prctl syscallHans-Christian Egtvedt
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>
2010-01-21avr32: add varargs handling of prctl syscallHans-Christian Egtvedt
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>
2010-01-21wordexp: silence shadow warningBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-01-21fix typo in version mismatch msgBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-01-21ether_line: fix build for socket && !ipBernhard Reutner-Fischer
The internal __ether_line helper needs ether_ntoa_r() Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-01-16futimens: add missing local prototypeBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-01-16include unistd.h for smallintYoshinori Sato
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-01-14mips/nptl: Pass correct parameters to dl_find_hash when resolving TLS ↵Khem Raj
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>
2010-01-09ctime: do not use static struct tm bufferDenys Vlasenko
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>
2009-12-19Merge commit 'origin/master' into nptlAustin Foxley
Conflicts: libc/signal/sigpause.c libc/string/x86_64/memset.S Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-12-19malloc: fix race condition and other bugs in the no-mmu mallocFreeman Wang
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>
2009-12-19x86_64: fix multiple definition of chk functionsAustin Foxley
also enable __chk_fail and only try to call it when SSP is on Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-12-17check if USE_TLS is defined before useHans-Christian Egtvedt
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>
2009-12-17check if USE_TLS is defined before useHans-Christian Egtvedt
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>
2009-12-16libc: Remove pointless header string.hCarmelo Amoroso
It is already include from the internal header sigset-cvt-mask.h Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2009-12-16libc: Add missing header for memsetCarmelo Amoroso
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>
2009-12-16libc: Add missing header for memsetCarmelo Amoroso
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>
2009-12-16fix multiple definitions of pthread_once for x86_64Austin Foxley
also add a missing weak for clone Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-12-16x86_64: no waitpid syscall exists, so use wait4Austin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-12-16build: Get rids of PIC macro using compiler flag __PIC__ insteadCarmelo Amoroso
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>
2009-12-16build: Get rids of PIC macro using compiler flag __PIC__ insteadCarmelo Amoroso
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>
2009-12-15Merge remote branch 'origin/master' into nptlAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-12-14sh: fix endianess and optimise the SH4 memcpyGiuseppe Cavallaro
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>
2009-12-13syslog: use send(MSG_NOSIGNAL) instead of write, thus no need to handle SIGPIPEDenys Vlasenko
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>
2009-12-13syslog: fix openlog(xx, LOG_KERN) and optimize a bitDenys Vlasenko
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>
2009-12-11Include bits/libc-lock.h to get __libc_once_defineKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-12-11Include bits/libc-lock.h to get __libc_once_defineKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Acked-by: Austin Foxley <austinf@cetoncorp.com>
2009-12-11get x86_64 nptl buildingAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-12-03sh: Add a prototype for the gcc __set_fpscr internal functionCarmelo Amoroso
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>