summaryrefslogtreecommitdiffstats
path: root/libc/stdlib/stdlib.c
Commit message (Collapse)AuthorAgeFilesLines
* stdlib: add qsort_rBernhard Reutner-Fischer2011-11-071-5/+18
| | | | | | GNU extension like qsort but takes a 3 parameter comparision function. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* stdlib.c, _strtod.c, stdlib.h: remove unused hidden functionsPeter S. Mazinger2011-03-091-21/+6
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* stdlib.c: remove duplicate libc_hidden_proto for strtoul/strtoul_lPeter S. Mazinger2011-03-091-1/+0
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* libc: fix strtoqNatanael Copa2010-12-011-0/+3
| | | | | | | | strtoq should always return a quad_t and be an alias of strtol on 64 bit and strtoll on 32 bit. Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* remove a few more empty #if/#endif pairsDenys Vlasenko2009-09-191-2/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* convert // comments to /**/; remove empty #if/#endif pairs. no code changesDenys Vlasenko2009-09-181-4/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* trim Experimentally off and uncommented hiddenBernhard Reutner-Fischer2009-09-181-25/+0
| | | | | | | | 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>
* - Add strtouq alias (to strtoul) for 64bitBernhard Reutner-Fischer2009-03-251-0/+3
| | | | | | | | The strtouq alias was only available on 32bit, breaking compilation of stuff using strtouq on 64bit machines. At the same time use the correct return type (u_quad_t). Signed-of-by: Peter Korsgaard <jacmet@sunsite.dk>
* *: remove __UCLIBC_CURLOCALE_DATA, __UCLIBC_CURLOCALE_DATA.xDenis Vlasenko2009-01-211-2/+2
| | | | | | | | | | | | | | | | | | | 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
* Last portion of libc_hidden_proto removal.Denis Vlasenko2008-11-201-21/+21
| | | | | Appears to build fine (several .configs tried)
* libc_hidden_proto removal, a few more functionsDenis Vlasenko2008-11-181-3/+3
|
* - tidy up inline:Bernhard Reutner-Fischer2008-10-241-1/+1
| | | | ldso and syscalls are __always_inline (the latter would need more cleanup)
* - Fix strtol*() with xlocale (on e.g. x86_64) (closes #2544)Bernhard Reutner-Fischer2008-10-081-5/+5
|
* Fix some locale multibyte tests failures ad below:Carmelo Amoroso2008-09-091-15/+49
| | | | | | | | | | | libc/stdlib/_strtod.c -> tst_wcstod; libc/stdlib/stdlib.c -> tst_mblen, tst_mbtowc, tst_wctomb; libc/stdio/_scanf.c -> tst_swscanf; libc/string/strncmp.c -> tst_wcsncmp; libc/misc/wchar/wchar.c -> tst_mbrlen, tst_mbrtowc, tst_wcswidth. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* - trim any trailing whitespaceBernhard Reutner-Fischer2008-07-231-2/+2
|
* libc/stdlib/stdlib.c: fix whitespace damage. No code changesDenis Vlasenko2008-06-021-92/+86
| | | | | (verified with objdump)
* fix bug 1577: '`' is not an acceptable digit for strto[u]l().Denis Vlasenko2008-06-021-13/+13
| | | | | Code size is not changed on i386.
* - try to pickup UINTMAX_MAXBernhard Reutner-Fischer2008-05-301-0/+1
|
* - Avoid warning about undefined preprocessor token. No obj-code changes.Bernhard Reutner-Fischer2008-05-301-1/+1
|
* Correct build if UCLIBC_HAS_CTYPE_TABLES is not definedPeter S. Mazinger2006-03-221-2/+2
|
* Remove all non-constant libc_hidden_data_def(), it is too unreliable, sorry, ↵Peter S. Mazinger2006-03-101-3/+0
| | | | most of global data relocations are back
* Do not use __XL_NPP macroPeter S. Mazinger2006-02-241-4/+20
|
* guard __ignore_x correctly, move undefs to their proper place, add ↵Peter S. Mazinger2006-02-241-27/+52
| | | | prototypes. Should I do all the other *max aliases as well
* Reorganize a bit for IMAPeter S. Mazinger2006-02-151-12/+8
|
* Enable _GNU_SOURCE build wide, trying to get consistent interfaces, else IMA ↵Peter S. Mazinger2006-01-221-1/+0
| | | | is a useless attempt
* fix building/warnings on 64bit archesMike Frysinger2006-01-201-2/+6
|
* Last relocs jump and global data, (even locales) that I could remove are ↵Peter S. Mazinger2006-01-161-0/+12
| | | | gone from libc. The remaining are left as exercise for others ;-)
* make gcc4 happy w/ hidden_def/proto, correct some typosPeter S. Mazinger2006-01-151-5/+8
|
* make DODEBUG=y happy, update sysdeps/common/* copyrightPeter S. Mazinger2006-01-141-12/+12
|
* Correct libc_hidden_protoPeter S. Mazinger2006-01-141-2/+2
|
* Correct atoi()Peter S. Mazinger2006-01-141-1/+2
|
* hidden_def/hidden_proto: convert all users (I hope) termios split, add some ↵Peter S. Mazinger2006-01-141-70/+92
| | | | missing headers, other jump relocs removed
* Macros are no good for jump relocs, hack to get rid of one introduced my new ↵Peter S. Mazinger2005-12-161-1/+2
| | | | regex code
* Convert all the rest, remove isxupper/isxlower, if someone objects, I'll add ↵Peter S. Mazinger2005-12-161-1/+1
| | | | it back
* Use __strtodPeter S. Mazinger2005-12-081-1/+5
|
* Implement __strto* __wcsto* and hide _stdlib_wcsto*Peter S. Mazinger2005-12-081-35/+46
|
* Hide morePeter S. Mazinger2005-12-071-0/+1
|
* Hide *clnt|pmap|svc* and some rpc. inet/rpc is full of relocs ...Peter S. Mazinger2005-12-071-0/+2
|
* More hiding, 300 leftPeter S. Mazinger2005-12-041-1/+2
|
* Hiding againPeter S. Mazinger2005-11-291-0/+5
|
* Kill warnings if IMA compilingPeter S. Mazinger2005-10-211-0/+4
|
* weaks moved after the related function so gcc4 won't warnPeter S. Mazinger2005-09-221-68/+68
|
* New stdio core. Should be more maintainable. Fixes a couple of bugs.Manuel Novoa III2004-02-111-5/+5
| | | | | | | | Codepaths streamlined. Improved performance for nonthreaded apps when linked with a thread-enabled libc. Minor iconv bug and some locale/thread related startup issues fixed. These showed up in getting a gcj-compiled java helloworld app running. Removed some old extension functions... _stdio_fdout and _stdio_fsfopen.
* Fix a few bugs in the new extended locale functions.Manuel Novoa III2003-08-241-16/+32
| | | | | | | | | Move stub gettext functions to a stub libintl to make switching in gnu gettext easier. Also add a few gnu-isms. Change to using hidden names with global weak aliases for the extended locale functions, as expected by libstd++. Slightly rework the locale data generation stuff to allow pregenerated locale data to be used with buildroot.
* Add a new *scanf implementation, includeing the *wscanf functions.Manuel Novoa III2003-08-011-62/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Should be standards compliant and with several optional features, including support for hexadecimal float notation, locale awareness, glibc-like locale-specific digit grouping with the `'' flag, and positional arg support. I tested it pretty well (finding several bugs in glibc's scanf in the process), but it is brand new so be aware. The *wprintf functions now support floating point output. Also, a couple of bugs were squashed. Finally, %a/%A conversions are now implemented. Implement the glibc xlocale interface for thread-specific locale support. Also add the various *_l(args, locale_t loc_arg) funcs. NOTE!!! setlocale() is NOT threadsafe! NOTE!!! The strto{floating point} conversion functions are now locale aware. The also now support hexadecimal floating point notation. Add the wcsto{floating point} conversion functions. Fix a bug in mktime() related to dst. Note that unlike glibc's mktime, uClibc's version always normalizes the struct tm before attempting to determine the correct dst setting if tm_isdst == -1 on entry. Add a stub version of the libintl functions. (untested) Fixed a known memory leak in setlocale() related to the collation data. Add lots of new config options (which Erik agreed to sort out :-), including finally exposing some of the stripped down stdio configs. Be careful with those though, as they haven't been tested in a long time. (temporary) GOTCHAs... The ctype functions are currently incorrect for 8-bit locales. They will be fixed shortly. The ctype functions are now table-based, resulting in larger staticly linked binaries. I'll be adding an option to use the old approach in the stub locale configuration.
* Ok... here's the summary:Manuel Novoa III2002-11-221-46/+169
| | | | | | | | | | | | | | Hopefully locale support will build when cross compiling now. Collation is still not supported, but that's what I'm currently working on. In the next couple of days, I'll probably put up a couple of files for download that will save people the trouble of generating all the glibc locales. Added *wprintf functions, although they currently don't support floating point. That will be fixed when I rewrite _dtostr... or possibly before. Added the wcsto{inttype} functions. Added iconv() and a mini iconv utility. The require locale support and only provide for conversions involving the various unicode encodings { UCS-4*, UCS-2*, UTF-32*, UTF-16*, UTF-8 }, the 8-bit codesets built with the locale data, and the internal WCHAR_T.
* Fix a couple of 'restrict' bugs in mbstowcs and wcstombs.Manuel Novoa III2002-10-291-3/+10
|
* Hide my personal #warning reminders. Add __wcschrnul, rename strchrnulManuel Novoa III2002-09-191-0/+4
| | | | to __strchrnul, and add weak aliases for them.
* Revert commit by davidm to printf.c that initialized conv_numManuel Novoa III2002-08-121-15/+15
| | | | | | | | | needlessly. To do so increases the generated code size with bcc. Eliminate duplicate define warnings in wstring.c. Fix potentially broken preprocessor comparisons. The preprocessor converts integers to maximal signed type, so inequality comparisons involving UINTMAX_MAX, ULLONG_MAX, and (if no long long) ULONG_MAX were potentially broken.
* Enable WCHAR support for C/POSIX stub locales.Manuel Novoa III2002-07-031-9/+17
| | | | | | Implemented unformatted wide i/o functions. (ungetwc still needs testing) Fix a few bugs in wchar.c. Modifications for bcc/elks support.