summaryrefslogtreecommitdiffstats
path: root/libc
Commit message (Collapse)AuthorAgeFilesLines
* misc: hide __gen_tempnameBernhard Reutner-Fischer2011-11-172-4/+4
| | | | | | fix signed vs. unsigned comparison warnings while at it Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* stdio: hide _stdio_validate_FILEBernhard Reutner-Fischer2011-11-172-2/+2
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* regex_old: make some internal helpers staticBernhard Reutner-Fischer2011-11-171-5/+5
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* inet: hide relocationsBernhard Reutner-Fischer2011-11-171-1/+2
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* unistd: hide relocationsBernhard Reutner-Fischer2011-11-171-0/+4
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* resolv: hide relocationsBernhard Reutner-Fischer2011-11-171-0/+7
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Add a C6X-specific ipc.h.Bernd Schmidt2011-11-141-0/+55
| | | | Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
* libc: flesh out linux scheduler functionsHenning Heinold2011-11-079-17/+277
| | | | | | | Most stuff was taken from the eglibc. Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* ldso: support RTLD_NOLOADTimo Teräs2011-11-071-2/+2
| | | | | | | | So application query if specified module is loaded or not with dlopen. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* stdlib: add qsort_rBernhard Reutner-Fischer2011-11-073-6/+26
| | | | | | GNU extension like qsort but takes a 3 parameter comparision function. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* powerpc: Fix typo in clone()Bernhard Reutner-Fischer2011-11-041-1/+1
| | | | | | Thanks to strauman at slac stanford edu for noticing Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Add stub for eventfd.Jean-Christian de Rivaz2011-11-041-0/+4
| | | | | | | Warn if the enventfd() function is not implemented. Signed-off-by: Jean-Christian de Rivaz <jc@eclis.ch> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libm: implement a generic sincos().William Pitcock2011-11-041-1/+1
| | | | | | | We already provide sincos() on some archs, so we should ship a generic version. Signed-off-by: William Pitcock <nenolod@dereferenced.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* setegid: use setresgid conditionallyBernhard Reutner-Fischer2011-11-021-0/+6
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* stubs: remove leftover undefsBernhard Reutner-Fischer2011-11-021-61/+0
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* stubs: handle linux module functionsBernhard Reutner-Fischer2011-11-022-4/+5
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* stubs: handle linux-specificBernhard Reutner-Fischer2011-11-022-19/+184
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* stubs: fix inverted socket logicBernhard Reutner-Fischer2011-11-021-19/+19
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* stubs: undef linux specific unless they were asked forBernhard Reutner-Fischer2011-11-021-0/+34
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Add eventfd support.Jean-Christian de Rivaz2011-10-313-1/+68
| | | | | | | | | | | | Hello, I whould like to share this simple patch that add the eventfd call to uClibc. Please review so it can be accepted to be merged. Jean-Christian Signed-off-by: Jean-Christian de Rivaz <jc@eclis.ch> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* sparc: fix build for linuxthreads.oldRob Landley2011-10-271-1/+1
| | | | | | | | | sparc target has assembly implementations of clone.S that doesn't get used, and thus the build breaks. Also, sparc is missing a header file in pthreads.old that exists in pthreads.new. Signed-off-by: Rob Landley <rob@landley.net> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* sh: fix build for SH in !NPTL caseRob Landley2011-10-271-1/+1
| | | | | Signed-off-by: Rob Landley <rob@landley.net> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* resolv: fix memory leakBernhard Reutner-Fischer2011-10-211-0/+2
| | | | | | | | Timothy Holdener writes: small memory leak in __dns_lookup() when the A record in the DNS answer is preceded by one or more CNAME records. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* resolv: commentary typo fixBernhard Reutner-Fischer2011-10-201-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* gethostbyname_r: set correct h_errno upon failureBernhard Reutner-Fischer2011-10-201-0/+1
| | | | | | | | | | | | | | | previously gethostbyname_r(ipv6.google.com);herror("ERROR:") gave Answer name = |ipv6.google.com| Answer type = |5| herrno=1 h_errno=0 ERROR:: Error 0 herrno=1 h_errno=1 ERROR:: Unknown host Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* resolv: fix compilationBernhard Reutner-Fischer2011-10-201-2/+2
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc: fix daylight saving time handlingGuillaume Bourcier2011-10-121-1/+1
| | | | | | | | | | | | | The algorithm computing daylight saving time incorrectly adds a day for each month after January for leap years. The clock shift from/to DST can be delayed if the last Sunday of a transition month is exactly seven days before the first of the following month. This change adds a day for the February month only. Signed-off-by: Guillaume Bourcier <guillaumebourcier@free.fr> Signed-off-by: Richard Braun <rbraun@sceen.net> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* microblaze mmu/elf/shared lib supportRyan Flux2011-10-063-1/+40
| | | | | | | | | microblaze can either be with mmu or without If with, use elf rather than flat, and support shared libs Signed-off-by: Ryan Flux <ryan.flux@emsolutions.com.au> Signed-off-by: Steve Bennett <steveb@workware.net.au> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* microblaze linux has no SDA supportSteve Bennett2011-10-062-8/+0
| | | | | | | | | The linker does not set up the Small Data Area symbols, _SDA_BASE_ and _SDA2_BASE_ so don't try to resolve them Signed-off-by: Ryan Flux <ryan.flux@emsolutions.com.au> Signed-off-by: Steve Bennett <steveb@workware.net.au> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* microblaze can be either big or little endianSteve Bennett2011-10-061-1/+8
| | | | | Signed-off-by: Steve Bennett <steveb@workware.net.au> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Use the generic bits/select.h for microblazeSteve Bennett2011-10-061-58/+0
| | | | | | | This avoids warnings about type-punned pointers Signed-off-by: Steve Bennett <steveb@workware.net.au> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Defeat compiler optimization which assumes function addresses are never NULLDenys Vlasenko2011-09-152-20/+42
| | | | | | | | | | | | | From email: A warning for people who can be hit by the same or similar issue: gcc 4.1.2 with -march=i486 here with -Os and even with -O2 or -O is "optimizing away" the check if (_stdio_term) in libc/stdlib/_atexit.c which results in a "call 0" and a segfault at exit if you do not happen to link in stdio. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* resolv: simple optimizations and style/readability fixesDenys Vlasenko2011-09-101-118/+107
| | | | | | | | | | text data bss dec hex filename - 2915 0 0 2915 b63 libc/inet/ns_name_old.o + 2656 0 0 2656 a60 libc/inet/ns_name.o - 958 0 0 958 3be libc/inet/ns_parse_old.o + 898 0 0 898 382 libc/inet/ns_parse.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* inet: build all res_* and ns_* functions conditionallyDaniel Mack2011-08-261-3/+2
| | | | | | | | | | | | This patch changes the build system so that all DNS resolver related functions (ie, those starting with dn_, ns_ and res_) are only built if UCLIBC_HAS_RESOLVER_SUPPORT is set. This means that the libc will lack support for things that existed in the library before unless this new config option is set. On the other hand, if users really need support for resolver functions, they now get a more complete set, and the library is smaller than before it is deselected. Signed-off-by: Daniel Mack <zonque@gmail.com>
* inet/resolv: add res_ninit and res_ncloseDaniel Mack2011-08-261-13/+128
| | | | | | | Some reordering of existing functions was necessary in order to provide this functionality. Signed-off-by: Daniel Mack <zonque@gmail.com>
* inet/resolv: add res_mkqueryDaniel Mack2011-08-263-2/+124
| | | | Signed-off-by: Daniel Mack <zonque@gmail.com>
* inet/resolv: add ns_initparse, ns_parserr, ns_skiprr and ns_msg_getflagDaniel Mack2011-08-263-1/+204
| | | | | | There are build 'ifdef L_ns_parse'. Signed-off-by: Daniel Mack <zonque@gmail.com>
* inet/resolv: add dn_skipname and ns_name_skipDaniel Mack2011-08-261-0/+52
| | | | | | One uses the other, so add them in one go. Signed-off-by: Daniel Mack <zonque@gmail.com>
* inet/resolv: Add dn_compDaniel Mack2011-08-261-1/+14
| | | | Signed-off-by: Daniel Mack <zonque@gmail.com>
* inet/resolv: add ns_name_pton, ns_name_pack and ns_name_compressDaniel Mack2011-08-261-0/+468
| | | | | | These are built '#ifdef L_ns_name' Signed-off-by: Daniel Mack <zonque@gmail.com>
* inet/resolv: add ns_{put,get}{16,32}Daniel Mack2011-08-263-0/+36
| | | | | | | This patch introduces a new config directive 'UCLIBC_HAS_RESOLVER_SUPPORT' and adds the new symbols conditionally. Signed-off-by: Daniel Mack <zonque@gmail.com>
* libc/inet/resolv.c: comment on #endif linesDaniel Mack2011-08-261-30/+30
| | | | | | | | While reading this file, I found it rather confusing to relate the "endif" lines to their opening counter-part. This patch adds comments to most of these lines to denote what the actually do. Signed-off-by: Daniel Mack <zonque@gmail.com>
* Merge remote-tracking branch 'origin/master' into prelinkCarmelo Amoroso2011-07-011-0/+5
|\ | | | | | | | | | | | | | | * origin/master: libc: add missing lock initialization in vswprintf libubacktrace: fix makefile clean target Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
| * libc: add missing lock initialization in vswprintfMaksim Rayskiy2011-06-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Unlike vsnprintf, vswprintf does not properly initialize locking elements of FILE structure, which in some unfortunate cases can result in lockups in _vfwprintf_internal. Interesting, the initialization code was removed in 2a915734a32c5aec9a6a76c13bcb074d30e64171 at the same time as it was added to vsnprintf. Signed-off-by: Maksim Rayskiy <mrayskiy@broadcom.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* | Merge remote-tracking branch 'origin/master' into prelinkCarmelo Amoroso2011-06-2441-298/+880
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/master: (61 commits) fts: fix warning due to old-style function definition ldso_tls: fix compiler warning due to missing cast resolv: fix bug in res_init with ipv6 nameservers config: Fix passing defconfig args buildsys: pt-initfini.s depends on uClibc_config.h libdl: search for ELF_RTYPE_CLASS_DLSYM in dlsym() resolv: try next server on SERVFAIL getaddrinfo: allow numeric service without any hints bump version to 0.9.33-git nptl/pthread: Correct path for machine specific pt-initfini.c ctor/dtor nptl: Fix init and fini function compilation Rules.mak: Rearrange appending UCLIBC_EXTRA_CFLAGS to CFLAGS ARM: remove EABI/OABI selection ARM: detect BX availibility at build time ARM: #include <bits/arm_asm.h> where __USE_BX__ is used ARM: transform the EABI/OABI choice into a boolean ARM: remove sub-arch/variants selection from menuconfig ARM: introduce blind options to select & force THUMB mode ARM: reorder "Use BX" option Fix __libc_epoll_pwait compile failure on x86 ... Conflicts: ldso/libdl/libdl.c Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
| * fts: fix warning due to old-style function definitionCarmelo Amoroso2011-06-241-48/+16
| | | | | | | | Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
| * resolv: fix bug in res_init with ipv6 nameserversBernhard Reutner-Fischer2011-06-171-2/+2
| | | | | | | | | | | | | | Thanks to Christian Krause <chkr plauener.de> for finding and fixing this! Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * resolv: try next server on SERVFAILBernhard Reutner-Fischer2011-06-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in bug 3637 Andrey Kovalev aka pxe.ru writes: getaddrinfo does NOT add domain to query when receive SERVFAIL RFC1035 7.2 suggests that - If a resolver gets a server error or other bizarre response from a name server, it should remove it from SLIST, and may wish to schedule an immediate transmission to the next candidate server address. So let's try the next server upon SERVFAIL even if it's not strictly required. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * getaddrinfo: allow numeric service without any hintsNatanael Copa2011-06-141-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This appears to correspond to what glibc does and this fixes an issue with iptables-1.4.11 with udp and raw port numbers. (see http://bugzilla.netfilter.org/show_bug.cgi?id=721) This fixes #3841 https://bugs.busybox.net/show_bug.cgi?id=3841 Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * ctor/dtor nptl: Fix init and fini function compilationKhem Raj2011-06-131-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | We need to define the rules for .S files so it gets the include paths some architectures like mips include headers Some architectures e.g. SH have their own version of pt-initfini.c so look for that first before resorting to generic version of pt-initfini.c Signed-off-by: Khem Raj <raj.khem@gmail.com>