summaryrefslogtreecommitdiffstats
path: root/libc/misc
Commit message (Collapse)AuthorAgeFilesLines
...
* libc/regex: fix internal_function declarationsRoman I Khimov2010-04-271-5/+5
| | | | | | | | | | | | | | Build failed with | In file included from libc/misc/regex/regex.c:59: | libc/misc/regex/regexec.c:315: error: conflicting types for 're_search_2_stub' | libc/misc/regex/regexec.c:44: note: previous declaration of 're_search_2_stub' was here | libc/misc/regex/regexec.c:358: error: conflicting types for 're_search_stub' | libc/misc/regex/regexec.c:49: note: previous declaration of 're_search_stub' was here .... etc Signed-off-by: Roman I Khimov <khimov@altell.ru> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* libc: Remove compiler warning due to old-style function definitionCarmelo Amoroso2010-04-251-57/+27
| | | | Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* nptl: fix libc internal, dynamically enabled lockingTimo Teräs2010-04-222-0/+41
| | | | | | | | | | | | | | | | | | | | | Final iteration to fix libc internal locking if libpthread is pulled in by dlopen call (directly or indirectly). We cannot really use the weak symbol trick for shared build, since the symbols won't get refreshed if libpthread is pulled in dynamically. In glibc, they have #ifdef SHARED magic to either use pthread_functions table, or weaks. But as we shared object files with both builds, this does not sounds good either. The reintroduces the libc weaks.c, but uses them now only with static build. For dynamic build, we still use the symbols with same name, but provide weaks in forward.c so they end up dereferencing the pthread_functions table indirectly if we are not linked to libpthread. Mutex initialization is hard coded as inline, as it needs to happen even if libpthread is not initially loaded. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* libc: remove libc weak __pthreads_* wrappersTimo Teras2010-04-164-74/+1
| | | | | | | | | | | | | | | | | It is not possible to override for libpthread to override the weak libc definitions. This has never worked in uclibc, and does no longer work in glibc either (unless you use LD_DYNAMIC_WEAK). The proper thing to do is have weak prototypes in libc, and definitions in libpthread only. This way libc runs even if those functions are not defined, but just needs to protect against the NULL values (done by implementing __uclibc_maybe_call). This fix the problems if libc is linked before libpthread or if libpthread is pulled by a dependency library. Signed-off-by: Timo Teras <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* libc_regex: __libc_lock primitives are actually available on uClibcCarmelo Amoroso2010-04-122-3/+6
| | | | | | | | | | | | | | | | | | __libc_lock primitives are actually available on uClibc when threading support is enable, so in this case they can be used. It also fixes the following compiler warnings: In file included from libc/misc/regex/regex.c:55: libc/misc/regex/regex_internal.h:49:1: warning: "__libc_lock_define" redefined [SNIP] libc/misc/regex/regex_internal.h:50:1: warning: "__libc_lock_init" redefined [SNIP] libc/misc/regex/regex_internal.h:51:1: warning: "__libc_lock_lock" redefined [SNIP] libc/misc/regex/regex_internal.h:52:1: warning: "__libc_lock_unlock" redefined Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Merge commit 'origin/master' into nptlAustin Foxley2010-04-063-50/+55
|\ | | | | | | | | | | | | | | Conflicts: libc/misc/utmp/utent.c libc/sysdeps/linux/i386/bits/syscalls.h Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * utent: do not create extra static functions if !THREADSDenys Vlasenko2010-04-051-37/+49
| | | | | | | | | | | | | | | | text data bss dec hex filename 547 8 384 939 3ab libc/misc/utmp/utent.o 519 8 384 911 38f libc/misc/utmp/utent.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * regex_old: convert static flag variable to smallintDenys Vlasenko2010-04-052-10/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * getutid is not used internally, removing hidden_protoDenys Vlasenko2010-04-051-4/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit 'origin/master' into nptlAustin Foxley2010-04-0225-50/+50
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile.in extra/Configs/Config.in libc/sysdeps/linux/common/bits/kernel-features.h libc/sysdeps/linux/common/poll.c libc/sysdeps/linux/common/sysdep.h libc/sysdeps/linux/sh/sysdep.h Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * prettify make cleanBernhard Reutner-Fischer2010-03-2525-50/+50
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | libc: build tsd only when tls is enabledAustin Foxley2010-02-111-1/+1
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | Merge commit 'origin/master' into nptlAustin Foxley2010-02-052-6/+6
|\| | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * __uClibc_main: use __pagesize to protect against recursionBernhard Reutner-Fischer2010-02-031-4/+2
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * remove two checks for gettimeofday errorDenys Vlasenko2010-02-021-2/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit 'origin/master' into nptlKhem Raj2010-02-011-3/+2
|\| | | | | | | | | | | | | Conflicts: libc/stdlib/Makefile.in Signed-off-by: Khem Raj <raj.khem@gmail.com>
| * errno: hide __libc_resp, __libc_errno, and __libc_h_errnoKhem Raj2010-02-011-3/+2
| | | | | | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* | Merge branch 'master' into nptlCarmelo Amoroso2010-01-254-14/+16
|\| | | | | | | | | | | | | | | | | | | 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>
| * wchar.c: fix indentationDenys Vlasenko2010-01-241-10/+10
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * silence some warnings about unused paramsBernhard Reutner-Fischer2010-01-233-4/+6
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * wordexp: silence shadow warningBernhard Reutner-Fischer2010-01-211-18/+18
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@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>
| * 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>
* | wordexp: silence shadow warningBernhard Reutner-Fischer2010-01-211-18/+18
| | | | | | | | | | | | | | 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>
* | ctime: do not use static struct tm bufferDenys Vlasenko2010-01-211-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> (cherry picked from commit 957e238614326198452b53498ae98e546fce7366) Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.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>
* | Merge remote branch 'origin/master' into nptlAustin Foxley2009-12-151-48/+59
|\| | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.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>
* | get x86_64 nptl buildingAustin Foxley2009-12-111-1/+1
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | define local stack_chk_guard for nptlNatanael Copa2009-11-271-1/+2
| | | | | | | | | | Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | Merge remote branch 'origin/master' into nptl_mergeAustin Foxley2009-11-222-7/+5
|\| | | | | | | | | | | | | | | | | Conflicts: Rules.mak libc/misc/sysvipc/msgq.c test/Rules.mak Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * __assert: include unistd.h for smallintBernhard Reutner-Fischer2009-11-201-2/+1
| | | | | | | | 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>
| * 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>
| * 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>
* | 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>
* | 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-092-8/+9
| | | | | | | | | | | | | | | | | | | | 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-172-2/+1
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | uClibc_main: add the needed support for nptlAustin Foxley2009-10-171-34/+75
| | | | | | | | | | | | | | | | * setup memory for the cancellation buffer * remove unneeded weak's * deallocation of tsd on main thread exit Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | cancellation support for a large amount of the required syscallsAustin Foxley2009-10-171-7/+46
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | use *_not_cancel variants to avoid accidental cancellations with nptlAustin Foxley2009-10-174-14/+19
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | some tweaks under libc/ needed for nptlAustin Foxley2009-10-173-0/+13
|/ | | | | | | | | | * updated kernel-features.h * system is provided by pt-system with nptl * _exit should do exit_group with nptl * tsd tls ptr in libc * rt_sigwaitinfo impl added Signed-off-by: Austin Foxley <austinf@cetoncorp.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>
* clean up O_CLOEXEC handlingMike Frysinger2009-10-072-22/+7
| | | | | | | 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>
* 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>
* 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-192-6/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>