summaryrefslogtreecommitdiffstats
path: root/libc
Commit message (Collapse)AuthorAgeFilesLines
* 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> (cherry picked from commit 65f9ccdafd008abd9892dfc46fb9737ec4d964c5) Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* resolv: tentatively fix usage of uninitialized DNS parametersDenys Vlasenko2010-04-091-4/+2
| | | | | | | See "Possible regression from timeout commit for resolv.conf" thread. Also remove superfluous NULL check. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* confstr: properly stringify version partsBernhard Reutner-Fischer2010-04-081-3/+5
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* getconf: print arbitrary GNU_LIBPTHREAD_VERSION stringBernhard Reutner-Fischer2010-04-061-0/+18
| | | | | | | the NPTL should probably print the version-string of the glibc it's compatible with and not the uClibc version (check what mysql expects). Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Fix use-after-free bug in __dns_lookupGabor Juhos2010-04-061-3/+1
| | | | | | | | | | | If the type of the first answer does not match with the requested type, then the dotted name was freed. If there are no further answers in the DNS reply, this pointer was used later on in the same function. Additionally it is passed to the caller, and caused strange behaviour. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* i386/bits/syscalls.h: more compact, but stack-hungry syscall code. disabled ↵Denys Vlasenko2010-04-061-18/+78
| | | | | | so far Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* i386/bits/syscalls.h: explain _BITS_SYSCALLS_ASMDenys Vlasenko2010-04-061-45/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* i386/bits/syscalls.h: generate better code using more restrictive asm ↵Denys Vlasenko2010-04-061-4/+11
| | | | | | | | | | | | | | | | | | | | | | constraints Example: time() doesn't push/pop two registers now, and is smaller: <__GI_time>: -57 push %edi -8b 7c 24 08 mov 0x8(%esp),%edi -53 push %ebx -89 fb mov %edi,%ebx +8b 4c 24 04 mov 0x4(%esp),%ecx +87 cb xchg %ecx,%ebx b8 0d 00 00 00 mov $0xd,%eax cd 80 int $0x80 -5b pop %ebx -5f pop %edi +87 cb xchg %ecx,%ebx c3 ret Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* i386/bits/syscalls.h: explain how it works. no code changesDenys Vlasenko2010-04-061-100/+116
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.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>
* resolv: DEBUG-print nameserver we talk toBernhard Reutner-Fischer2010-03-301-2/+18
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* prettify make cleanBernhard Reutner-Fischer2010-03-2540-82/+82
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* nios2: Define INTERNAL_SYSCALL_NCS, use common sycall definesTobias Klauser2010-03-181-274/+85
| | | | | | | | | | Define the nios2 version of INTERNAL_SYSCALL_NCS and remove all sycall defines already defined by the common syscall defines. This will make the master branch of uClibc compile again for nios2. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* nios2: Update fcntl.h from m68kTobias Klauser2010-03-181-2/+4
| | | | | Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* lift printf field width limitMichael Deutschmann2010-03-171-4/+4
| | | | | | | | | | uClibc mishandles printf field width limits larger than 40959, as a result of misguided overflow-protection code. This causes spurious test failures with GNU coreutils, which depends on "%65536s" and "%20000000f" working according to spec. Signed-off-by: Michael Deutschmann <michael@talamasca.ocis.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* nios2: Add sys/user.hTobias Klauser2010-03-161-0/+93
| | | | | | | | | | | This is a fixed version containing copyright information. The patch should now apply using 'git am'. linux/user.h is no longer exported during kernel make headers_install Signed-off-by: Atle Nissestad <atle@nissestad.no> Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* pull kernel-features.h from NPTLBernhard Reutner-Fischer2010-03-051-18/+392
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* poll: unavailable on linux < 2.2.0Bernhard Reutner-Fischer2010-03-042-1/+7
| | | | | | fixes bug #253 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc_sh: Update memcpy to use the ENTRY macroCarmelo Amoroso2010-02-101-8/+3
| | | | | | Use the ENTRY macro now available through the sysdep.h header Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* libc_sh: Add a sysdep header for shCarmelo Amoroso2010-02-101-0/+277
| | | | | | | | | | | | A new sysdep header for sh (ported from NPTL branch) to provide some useful macros in asm code: ENTRY: an entry point visible from C PSEUDO: a wrapper for syscall with proper errno checking SYSCALL_ERROR_HANDLER: errno check (suitable for TLS) This will help in NPTL integration. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* libc: Add a common sysdep headerCarmelo Amoroso2010-02-101-0/+139
| | | | | | | | | | Add a common header file to provide macros useful in asm code: C_LABEL to construct the asm name for a C symbol cfi_xxx to generate eh_frame unwind information. Ported from NPTL branch. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* getdents: Fix mips64 buildAtsushi Nemoto2010-02-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Wed, 27 Jan 2010 07:14:08 +0100, Carmelo AMOROSO <carmelo.amoroso@st.com> wrote: > I would re-write your patch in a simpler way. > > We already have the following > > 136 #if defined __UCLIBC_HAS_LFS__ && ! defined __NR_getdents64 > 137 attribute_hidden strong_alias(__getdents,__getdents64) > 138 #endif > > I think that it's simpler to move in the proper place this statement. Thanks, indeed. If we came into "#elif WORDSIZE == 32" block, above condition never be true. So we can just move this statement out of "#if...#elif...#elif...#endif" block. Here is a revised patch. ------------------------------------------------------ From: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Subject: [PATCH] getdents: Fix mips64 build Some archs (such as mips64) do not have getdents64 syscall but have getdents syscall. Define alias for it. This fixes regression from 0.9.30.1. Backgrounds: This is once done by commit e8b1c674. But after the commit 33bcf733 ("Use getdents syscall if kernel provide supports for this instead of relying upon getdents64."), if __ASSUME_GETDENTS32_D_TYPE was defined the alias for getdents64 is not defined. The macro __ASSUME_GETDENTS32_D_TYPE had been effectively ignored until 0.9.30.1 but the commit 0f0f20ab ("Move kernel-features.h header from the linuxthread directory to a common one...") really enables it. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* prctl: silence shadow warningsBernhard Reutner-Fischer2010-02-051-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Unbreak build for sparc on some config'sAustin Foxley2010-02-031-5/+4
| | | | | | Thanks to rob@landley.net 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>
* libc: Fix l64a to return the correct buffer pointerFilippo Arcidiacono2010-02-031-1/+1
| | | | | | | | | l64a was returning the pointer to the end of the internal buffer instead of the start. This caused an infinite loop in passwd application. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* powerpc/bits/sysdep.h: move confusingly placed #undefDenys Vlasenko2010-02-031-5/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* /etc/resolv.conf: support "timeout:n" and "attempts:n" optionsDenys Vlasenko2010-02-031-13/+41
| | | | | | | | | | | | | | text data bss dec hex filename - 1745 2 4 1751 6d7 libc/inet/dnslookup.o + 1760 2 4 1766 6e6 libc/inet/dnslookup.o - 962 0 4 966 3c6 libc/inet/opennameservers.o + 1099 0 4 1103 44f libc/inet/opennameservers.o - 462 4 472 938 3aa libc/inet/res_init.o + 454 4 468 926 39e libc/inet/res_init.o - 870 0 0 870 366 libc/inet/res_query.o + 867 0 0 867 363 libc/inet/res_query.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* remove two checks for gettimeofday errorDenys Vlasenko2010-02-022-6/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* 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>