summaryrefslogtreecommitdiff
path: root/libc/misc
AgeCommit message (Collapse)Author
2012-06-15dl-iterate-phdr.c: no need for visible __dl_iterate_phdr, make it staticPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15adapt regex to new regex.hPeter S. Mazinger
While there, add some defines to help build, cleanup Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15ftw.c: errno.h has to be included before undefining _LIBCPeter S. Mazinger
While, cleanup a bit Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15regex_old.c: adapt to new regex.hPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15errno, h_errno: correct them for non-TLSPeter S. Mazinger
Move h_errno related stuff to separate file. Do not hide errno and h_errno for non-TLS, else it keeps being 0. Make __[h_]errno_location weak for non-TLS. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15__uClibc_main.c: do not include unused headersPeter S. Mazinger
Remove unneeded headers. Guard inclusion of fcntl.h. While there, remove an obsoleted comment. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15iconv: Do not include __iconv_codesets into iconv utilityPeter S. Mazinger
Host iconv needs only L_iconv_main defined and __iconv_codesets has to included, as host system does not provide it. Keep __iconv_codesets out of iconv linked against uClibc. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15errno and *_init cleanupPeter S. Mazinger
Define a common view of __errno_location, __h_errno_location in common header and use that everywhere, __uClibc_main.c is no special. The rule adopted: for enabled threads we make in libc the __GI_x() variants strong, x() weak and (should) provide another strong x() in libpthread. If threads are disabled, even the __GI_x() variants are weak. _stdio_init,_stdio_term,_locale_init: make all hidden weak in common header Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15__uClibc_main.c: make __uClibc_init hiddenPeter S. Mazinger
The linker can cope with it if it is hidden. No need for the __GI___uClibc_init. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15getttyent.c: include stdio_ext.h only when neededPeter S. Mazinger
do not include pthread.h as the locking macro is provided by stdio.h Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15time.c: fix a guard to avoid a warning about unused labelPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15resolv.c,time.c,_atexit.c: hide 3 locksPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15_hsearch_r.c: use stdlib.h instead of malloc.h for callocPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15fnmatch: replace __memset and __memcmpPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15locale.c, uClibc_locale.h: provide hidden __curlocale[_set]Peter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15err.c: add attribute_noreturn to static functionsPeter S. Mazinger
while there, remove unneeded pthread.h Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15err.c, err.h: no need for hidden functionsPeter S. Mazinger
Since we reuse the functions in the same file, provide static __X() and use strong_alias to provide the visible functions. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15tsd.c: fix commentPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15alphasort*.c: use strcoll instead of strcmp to support localesPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15scandir,readdir[_t]: use one common source for X() and X64()Peter S. Mazinger
Since the sources differ only minimally, use only scandir.c,readdir[_t].c and redefine the used functions accordingly. Use a strong_alias instead of compiling *64.c if __WORDSIZE = 64 Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15versionsort*.c, alphasort*.c: do not need *64 compiled for __WORDSIZE = 64Peter S. Mazinger
use a strong_alias instead Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15move __getdents[64] prototypes to dirent.hPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15dirstream.h: remove unused constantsPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15make __uClibc_fini() hiddenPeter S. Mazinger
No need for a visible version Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15no need for hidden lockf64Peter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15utent.c, wtent.c: move functions from utxent.cPeter S. Mazinger
before the change (threads enabled) text data bss dec hex filename 1107 8 408 1523 5f3 libc/misc/utmp/utent.os 152 0 0 152 98 libc/misc/utmp/wtent.os 240 0 0 240 f0 libc/misc/utmp/utxent.os after the change text data bss dec hex filename 1072 8 408 1488 5d0 libc/misc/utmp/utent.os 157 0 0 157 9d libc/misc/utmp/wtent.os 200 0 0 200 c8 libc/misc/utmp/utxent.os The smaller size on utent.os is unexpected, could be due to better inlining/not inlining Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15utent.c: go back to use static __X() functions without size increasePeter S. Mazinger
__X() {...} and strong_alias(__X,X) keeps size the same as X() {...} Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15regex_old.c: remove unneeded guardPeter S. Mazinger
_LIBC is undefined here, no need to specially guard with __UCLIBC__ Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15obstack.c: use libintl.hPeter S. Mazinger
remove gettext workarounds and use libintl.h's _(x) use strong_alias instead of weak_alias change how strong_alias and libc_hidden_def are disabled Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15parser_config.[ch]: remove duplicated hidden functionsPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15remove __FORCE_GLIBCPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15do not include xlocale.h, it is included by locale.h when neededPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15wordexp.c, sysconf.c: include ctype.h for isspacePeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-05-18ldso: sh: handle _dl_skip_args in linker startup instead of __uClibc_mainFilippo Arcidiacono
Handle _dl_skip_args in the asm part of the dynamic linker startup, to skip the ldso arguments, so we can keep this symbol hidden as other archs do. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2012-04-17locale: avoid segfault freelocale()Bernhard Reutner-Fischer
PR 4964 Eric Nadler writes: It looks to me like the base structure is not fully initialized with 0 (only a subset of the structure is initialized). This later results in a free of base->collate.index2weight in _locale_set_l. This free tries to free uninitialized memory and segfaults. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-04-17wchar: Fix BOM emitting in iconv_open()Ed W
Fix incorrect output of BOM when converting charactersets by name. Only affective when iconv/locale enabled. Signed-off-by: Ed Wildgoose <lists@wildgooses.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-04-17ipc: eventually use stat64 in ftok()Bernhard Reutner-Fischer
PR 4201 ftok() always used 32bit stat Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-04-17parse_config: tweak indentationBernhard Reutner-Fischer
and shuffle tokens memsetting around. No obj-code changes. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-04-08regex: silence set-but-unused warningsMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-26time.c: Readability improvements - no code changesDenys Vlasenko
Pulled assignments out of ifs, added whitespace around operation symbols. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-03getutid: add a hidden defMike Frysinger
The pututline func calls getutid, so add a hidden def for it to avoid plt relocs: $ readelf -r lib/libc.so.0 ... Relocation section '.rela.plt' at offset 0xb058 contains 11 entries: Offset Info Type Sym. Value Sym. Name + Addend 000000236000 01cf00000007 R_X86_64_JUMP_SLO 00000000000190ab getutid + 0 ... Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-11-17misc: hide __gen_tempnameBernhard Reutner-Fischer
fix signed vs. unsigned comparison warnings while at it Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-11-17regex_old: make some internal helpers staticBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-10-12libc: fix daylight saving time handlingGuillaume Bourcier
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>
2011-06-24Merge remote-tracking branch 'origin/master' into prelinkCarmelo Amoroso
* 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>
2011-06-24fts: fix warning due to old-style function definitionCarmelo Amoroso
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2011-05-12wordexp: fix mishandled return value of pipe callBernhard Reutner-Fischer
and use pipe2 if available while at it. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-05-04Merge remote-tracking branch 'origin/master' into prelinkCarmelo Amoroso
* origin/master: (32 commits) libubacktrace: fix backtrace support on arm-eabi, which needs libgcc_eh linked too getaddrinfo.c: fix incorrect check for ERANGE from gethostbyaddr_r getaddrinfo.c: improve code readability. No functional changes string: remove unused variable x86_64: silence warning if !TLS buildsys: prettify ssp.c handling madvise is LINUX_SPECIFIC test_nptl: fix expected result for tst-cputimer[123] test_nptl: fix expected result for tst-clock2 test buildsys: make $(LOCAL_INSTALL_PATH) phony ether_aton: reject invalid input tests: disable ether tests if !HAS_SOCKET inet: add ether_aton testcase sysconf: clock_getres depends on HAS_REALTIME __rt_sigwaitinfo: depends on HAS_REALTIME buildsys: minor fixes in Makefile.arch for C6X buildsys: minor fixes in Makefile.arch for microblaze libubacktrace: enabled for all archs indeed. sparc: don't access fp registers when configured for no fpu libubacktrace: generic implementation based dwarf ... Conflicts: ldso/ldso/dl-elf.c ldso/ldso/mips/elfinterp.c ldso/ldso/x86_64/elfinterp.c Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2011-04-20Added fts support for traversing UNIX file hierarchies.Salvatore Cro
It is required by libdwfl in elfutils package. Signed-off-by: Salvatore Cro <salvatore.cro at st.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-04-06Merge remote-tracking branch 'origin/master' into prelinkCarmelo Amoroso
* origin/master: (137 commits) utils/ldd: Check for returned pointer from strrchr not the value it holds cris: add provide arch-specific vfork implementation lutimes.c, stubs.c: fix compiling lutimes, if __NR_utimensat is not defined bump version to 0.9.32-rc3-git release 0.9.32-rc3 memalign: include sys/param.h for MAX arm/bits/atomic.h: Include common/bit/atomic.h for thumb1 wctype.h: fix libc_hidden_proto for iswupper and add it for iswspace add libc_hidden_proto for wcs[n]casecmp_l really fix missing __libc_drand48_data Revert "missing prototype of __libc_drand48_data fixed" missing prototype of __libc_drand48_data fixed time.c, time.h: remove unused hidden strftime/strptime nanosleep.c: remove duplicated libc_hidden_proto ctype.c, ctype.h: remove commented parts that were banned for removal after 0.9.31 _wctype.c, wctype.h: remove unused isw* and wctype_l hidden functions time.c, wchar.h: remove unused hidden wcsftime str[n]casecmp.c: fix hidden usage remove unused hidden functions frv/memset.S: add missing libc_hidden_def ... Conflicts: ldso/ldso/ldso.c Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>