summaryrefslogtreecommitdiff
path: root/libc/misc
AgeCommit message (Collapse)Author
2009-09-26errno.c: add tls versions of errno and h_errnoAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-09-26dl-support.c: add tls supportAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-09-19libc/misc/wctype/_wctype.c: make it more readable. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-19remove a few more empty #if/#endif pairsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-18convert // comments to /**/; remove empty #if/#endif pairs. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-18trim Experimentally off and uncommented hiddenBernhard Reutner-Fischer
sed -i -e '/Experimentally off - /d' $(grep -rl "Experimentally off - " *) sed -i -e '/^\/\*[[:space:]]*libc_hidden_proto(/d' $(grep -rl "libc_hidden_proto" *) should be a nop Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-09-18fix make {,install_}{,host}utilsBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-09-08time.c: style cleanup. no code changes (verified with objdump)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-08simpler and shorter read_TZ_file() helperDenys Vlasenko
text data bss dec hex filename - 1109 8 76 1193 4a9 libc/misc/time/tzset.o + 1095 8 76 1179 49b libc/misc/time/tzset.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06wordexp.c: cleanup - remove old hidden_proto's; remove unused parameterDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06wordexp.c: fix a bug where we might close stdoutDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-05do not save/restore errno around free() callsDenys Vlasenko
In any non-buggy program free() does not fail. And when it fails in a buggy program, the failure is usually fatal (heap corruption and segfault). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-05wtmp code: style fixes, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-05CLOEXEC: use open(CLOEXEC) if exist; do not check fcntl(FD_CLOEXEC) failureDenys Vlasenko
text data bss dec hex filename - 370 0 0 370 172 libc/misc/dirent/opendir.o + 366 0 0 366 16e libc/misc/dirent/opendir.o - 375 4 0 379 17b libc/pwd_grp/lckpwdf.o + 356 4 0 360 168 libc/pwd_grp/lckpwdf.o - 248 0 0 248 f8 librt/shm.o + 209 0 0 209 d1 librt/shm.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-05utent.c: fix a few bugs, and shrink a bitDenys Vlasenko
bug #1: static_fd = -1; close(static_fd); DOH! bug #2: if (utmp_fd == -1) { __setutent(); } if (utmp_fd == -1) { return NULL; } if utmp_fd == -1, we call _setutent(). if __setutent() opens a fd, utmp_fd (a parameter) wouldn't change, the second check is bogus. We need to use static_fd instead in second check. Which makes clear that having utmp_fd parameter is wrong. See the patch for a complete fix. Shrink comes from simplifying fcntl(static_fd, F_SETFD, FD_CLOEXEC): text data bss dec hex filename - 661 8 384 1053 41d libc/misc/utmp/utent.o + 604 8 384 996 3e4 libc/misc/utmp/utent.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-05math.h: fix trivial typo (missing !): !defined __NO_LONG_DOUBLE_MATHDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-17support building out-of-treeBernhard Reutner-Fischer
Handle O= Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-08-17add hidden aliases for newer regex search functionsBernhard Reutner-Fischer
Fixes 3575b741754b391a27e33bb1866bdb29131b7fea which only changed the old impl but not the new one. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-08-01fnmatch.c: Include unistd.h before undefining _LIBC.Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2009-07-31fnmatch.c: Change scope of posixly_correct to be global.Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2009-07-28remove erroneous ';'Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-07-23fix dl_iterate_phdr() for FDPIC systemsMike Frysinger
The dlpi_addr isn't a simple Elf_Addr type for FDPIC systems, so we can't just assign 0 to it to initialize. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-20fix building for systems w/out ldso supportMike Frysinger
If an arch (like alpha and others) have no ldso support at all, then there is no point in attempting to walk loaded modules in the dl-* helper funcs. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-20first pass at implementing *at funcsMike Frysinger
Tested basic functionality with coreutils and things seem to work. At least gives us a basis to jump from. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-20dirent: push dirent type to prototypesMike Frysinger
This syncs the dirent related functions with the glibc behavior -- rather than take void pointers everywhere, make the struct dirent pointers explicit in the API. After all, the functions themselves will cast the pointers to a dirent structure, so if it isn't as expected, people will crash. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-20regex: convert #if to #ifdefMike Frysinger
Avoid gcc warnings about #if statements with defines that aren't defined. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-20add hidden aliases for older regex search functionsMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-05Check #if feature test macros are defined where they may not beRon
Once again all of these reduce the noise from gcc-4.4. Replaces a few more (USE_TLS && HAVE___THREAD) with USE___THREAD while we need to mess with them for this anyhow. Signed-off-by: Ron Lee <ron@debian.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-05Provide token prototypes for functions that are external but have no headerRon
This cuts down on a lot of noise from gcc-4.4 Signed-off-by: Ron Lee <ron@debian.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-28wchar: fix inverted parameters in error messageAndré Goddard Rosa
The error message should output "fromcode -> tocode" rather than "tocode -> fromcode". Seems to be a typo due to the order of the func called: iconv_t iconv_open(const char *tocode, const char *fromcode); Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-02-13- fix fallout from r24140 and r24160 for !CTYPE_TABLESBernhard Reutner-Fischer
2009-02-08Add strverscmp() and versionsort[64]().Denis Vlasenko
By Hai Zaar (haizaar AT codefidence.com)
2009-01-28"make utils" now successfully makes utils for targetDenis Vlasenko
2009-01-21*: remove __UCLIBC_CURLOCALE_DATA, __UCLIBC_CURLOCALE_DATA.xDenis Vlasenko
is always equivalent to __UCLIBC_CURLOCALE->x. remove typedef __uclibc_locale_t, it used only in a few places, it is lees confusing to use struct __uclibc_locale_struct everywhere. xlocale.h: hide __global_locale back under _LIBC, bug 53 is wrong in claiming it should be exported. Also hide under _LIBC: extern __locale_t __curlocale_var; extern __locale_t __curlocale(void); extern __locale_t __curlocale_set(__locale_t newloc); # define __UCLIBC_CURLOCALE # define __XL_NPP(N) # define __LOCALE_PARAM # define __LOCALE_ARG # define __LOCALE_PTR
2008-12-29- expand SUSv3_LEGACYBernhard Reutner-Fischer
- SUSv4_LEGACY part #1 (non-networking)
2008-12-27ctype: remove some trivial macros from ctype.h;Denis Vlasenko
remove __tolower and __toupper (they existed only in SOME configs!); remove usages of _tolower (some of them clearly buggy) from uclibc code; add a few more -U<define> options to unifdef pass over installed headers; document it on docs/wchar_and_locale.txt text data bss dec hex filename - 514963 2727 15396 533086 8225e lib/libuClibc-0.9.30-svn.so + 514888 2727 15396 533011 82213 lib/libuClibc-0.9.30-svn.so
2008-12-26convert yet another old-style function definitionDenis Vlasenko
2008-12-26new regex: stop confusing ourself with _LIBC being undefined;Denis Vlasenko
nuke one struct initializer which was invisibly becoming a memset - this improves speed by x2: test 0 pattern 0 '.?.?.?.?.?.?.?Log\.13' - 0.249795s + 0.133522s test 0 pattern 1 '(.?)(.?)(.?)(.?)(.?)(.?)(.?)Log\.13' - 0.360115s + 0.191959s text data bss dec hex filename - 515009 2731 15396 533136 82290 lib/libuClibc-0.9.30-svn.so + 514961 2727 15396 533084 8225c lib/libuClibc-0.9.30-svn.so
2008-12-26regex: remove useless casts on allocations;Denis Vlasenko
remove old-style-C function params declarations; change re_comp_buf from struct to pointer (more static build friendly) text data bss dec hex filename - 514952 2731 15424 533107 82273 lib/libuClibc-0.9.30-svn.so + 515011 2731 15396 533138 82292 lib/libuClibc-0.9.30-svn.so
2008-12-26regex: drop __<funcname> aliases. remove much of unused code.Denis Vlasenko
shrink offset tables. disable "likely/unlikely" BE() macro. text data bss dec hex filename - 515032 2731 15424 533187 822c3 lib/libuClibc-0.9.30-svn.so + 515014 2731 15424 533169 822b1 lib/libuClibc-0.9.30-svn.so
2008-12-25test/regex/tst-regex2.c: fix the rest of testsuite failuresDenis Vlasenko
2008-12-25test/regex/tst-regex2.c: fix test failure. Next one is immediately after...Denis Vlasenko
test 2 pattern 0 '.?.?.?.?.?.?.?Log\.13' -incorrect num_regs 30, expected 2 + 1.283480s +test 2 pattern 1 '(.?)(.?)(.?)(.?)(.?)(.?)(.?)Log\.13' + 3.429810s +test 2 pattern 2 '((((((((((.?))))))))))((((((((((.?))))))))))....' +incorrect num_regs 30, expected 72
2008-12-22UCLIBC_CTYPE_HEADER define is removed, as it alwaysDenis Vlasenko
equal to "include/bits/uClibc_ctype.h" __CTYPE_unclassified and other similar __CTYPE_xxxx constants are moved to separate include file, bits/uClibc_charclass.h Duplicate declaration of these constants is removed from libc/misc/wctype/_wctype.c Ugly re-inclusion trick in extra/locale/gen_wctype.c deleted Large ifdefed-out chunk in extra/locale/gen_wctype.c removed Move __CTYPE_isalnum() etc macros from uClibc_ctype.h to their single user, extra/locale/gen_wctype.c (can be simplified further) Overall, no code changes (verified with objdump)
2008-12-21more of warning fixes, mostly pointer signedness mismatchesDenis Vlasenko
2008-12-21more of pointer signedness warnings removedDenis Vlasenko
2008-12-20libc/misc/locale/locale.c: heed a pile of warningsDenis Vlasenko
from signed/unsigned char conversions
2008-12-20libc/misc/locale/locale.c: remove one unneeded static data,Denis Vlasenko
rewrite one exceptionally unreadable loop. Heed a few warnings (wrong type for string op params) text data bss dec hex filename - 1164 16 0 1180 49c libc/misc/locale/newlocale.os + 1180 0 0 1180 49c libc/misc/locale/newlocale.os - 494480 2751 15684 512915 7d393 lib/libuClibc-0.9.30-svn.so + 494472 2735 15684 512891 7d37b lib/libuClibc-0.9.30-svn.so
2008-12-20Deal with a few data fields which may be made constant.Denis Vlasenko
text data bss dec hex filename - 1237 9 28 1274 4fa libc/inet/rpc/getrpcent.os + 1246 0 28 1274 4fa libc/inet/rpc/getrpcent.os - 773 24 0 797 31d libc/misc/time/_time_localtime_tzi.os + 772 16 0 788 314 libc/misc/time/_time_localtime_tzi.os
2008-12-14heed compiler warnings about checking non-defined variables in #if directivesDenis Vlasenko
2008-12-12*: remove vestiges of gcc's "bounded pointers" feature,Denis Vlasenko
it is dead (not supported by gcc) for years. (more of it remains in multiple copies of sigaction.c)