summaryrefslogtreecommitdiffstats
path: root/include/stdlib.h
Commit message (Collapse)AuthorAgeFilesLines
* stdlib: fix arc4random return type to u_int32_tTimo Teräs2011-12-231-2/+2
| | | | | | | | | | | | | It's documented to be u_int32_t and not uint32_t: http://www.manpagez.com/man/3/arc4random/ This also fixes a major bug that stdlib.h includes stdint.h. Things might go very wrong because stdint.h has conditional defines and if stdlib.h is included before #define's for stdint.h we end up missing things and breaking builds (e.g. openjdk). Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
* stdlib.c, _strtod.c, stdlib.h: remove unused hidden functionsPeter S. Mazinger2011-03-091-1/+0
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* arc4random.c, stdlib.h: get rid of hidden arc4random_stirPeter S. Mazinger2011-03-091-1/+0
| | | | | | The function is used only in one file, make an internal static version for this Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* stdlib.h: move MB_CUR_MAX = 1 from wchar-stub.hPeter S. Mazinger2011-03-091-1/+3
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* move prototype for __drand48_iterate and __libc_drand48_data to stdlib.hPeter S. Mazinger2011-03-091-0/+7
| | | | | | Move them to a common header guarded by _LIBC Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* update some headersPeter S. Mazinger2011-03-031-16/+26
| | | | | | | | Sync some headers with glibc. realpath is an XSI extension in SuSv4, add back guard and update comment, since it seems to allow != NULL in second arg. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* libc: fix strtoqNatanael Copa2010-12-011-1/+1
| | | | | | | | 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>
* libc: Add canonicalize_file_name functionCarmelo Amoroso2010-09-161-7/+6
| | | | | | | | Add canonicalize_file_name function and its related tests. Required by elfutils and coreutils (readlink). Signed-off-by: Salvatore Cro <salvatore.cro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* sync some headers and disable unused prototypesPeter S. Mazinger2009-11-191-11/+15
| | | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* realpath: SUSv4 compliantBernhard Reutner-Fischer2009-11-141-3/+1
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* sync a few headers with glibc (no functional changes)Mike Frysinger2009-07-201-17/+15
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* note that we do not want hidden malloc aliasesMike Frysinger2009-07-201-0/+2
| | | | | | | | | | We want to let malloc() and friends be overridable at runtime so that apps can insert their own implementation (think debugging, specialized setups, etc...). That means that C library functions that return allocated memory have to go through the normal malloc() symbol as well as the external code is the one who will be calling free(). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* - Add strtouq alias (to strtoul) for 64bitBernhard Reutner-Fischer2009-03-251-1/+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>
* - expand SUSv3_LEGACYBernhard Reutner-Fischer2008-12-291-0/+2
| | | | - SUSv4_LEGACY part #1 (non-networking)
* random: use smaller data fields where appropriateDenis Vlasenko2008-12-011-3/+4
| | | | | | | | | text data bss dec hex filename - 130 156 0 286 11e libc/stdlib/random.o + 130 148 0 278 116 libc/stdlib/random.o - 586 0 0 586 24a libc/stdlib/random_r.o + 570 0 0 570 23a libc/stdlib/random_r.o
* Last portion of libc_hidden_proto removal.Denis Vlasenko2008-11-201-0/+25
| | | | | Appears to build fine (several .configs tried)
* next portion of libc_hidden_proto removalDenis Vlasenko2008-11-201-0/+1
|
* libc_hidden_proto removal, just a few functionsDenis Vlasenko2008-11-181-0/+2
|
* - remove posix_openpt relocationBernhard Reutner-Fischer2008-09-111-0/+1
|
* - UCLIBC_HAS_GETPT pulls in getpt.Bernhard Reutner-Fischer2008-06-071-1/+4
| | | | - ptsname_r depends on UCLIBC_HAS_PTY just like ptsname()
* - make libcrypt optional. Untested.Bernhard Reutner-Fischer2008-06-051-0/+2
|
* - adds several config-options to allow for turning off certain featuresBernhard Reutner-Fischer2008-06-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | like o UCLIBC_HAS_GNU_ERROR o UCLIBC_HAS_BSD_ERR o UCLIBC_HAS_PTY o UCLIBC_HAS_GETPT (1) o UCLIBC_SYSCALL_STUBS o UCLIBC_SYSCALL_STUB_WARNING o UCLIBC_LINUX_SPECIFIC (2) o UCLIBC_BSD_SPECIFIC (3) o UCLIBC_NTP_LEGACY (4) o UCLIBC_SV4_DEPRECATED (5) o UCLIBC_HAVE_REALTIME (6) o UCLIBC_HAVE_ADVANCED_REALTIME (7) o UCLIBC_HAVE_EPOLL (8) o UCLIBC_HAVE_XATTR (9) o UCLIBC_HAVE_PROFILING (10) (1) make non-standard getpt optional and implement standard posix_openpt (2) fstatfs(), inotify_*(), ioperm(), iopl(), madvise(), modify_ldt(), personality() ppoll(), setresuid() (3) mincore(), getdomainname(), setdomainname() (4) ntp_adjtime(), ntp_gettime() aliases (5) ustat() [use statfs(2) in your code instead] (6) All marked as "(REALTIME)" in SUSv3 (7) All marked as "(ADVANCED REALTIME)" in SUSv3 (8) epoll_create(), epoll_ctl(), epoll_wait() (9) all Extended Attributes (10) helpers for gcc's -finstrument-functions - Fixes _dl_exit() - Implements sleep(3) for !UCLIBC_HAVE_REALTIME - Implements usleep(3) for !UCLIBC_HAVE_REALTIME - adds #warning about incorrect posix_fadvise{,64}() - removes unused and unwanted uselib() Net outcome is that an allnoconfig with HAVE_SHARED is now about 88k instead of formerly 130k.
* revert previous change; reading POSIX spec some more says we need to set ↵Mike Frysinger2007-02-081-1/+1
| | | | errno to EINVAL if filename is NULL
* we crash if the first argument to realpath() is non-null as well so lets ↵Mike Frysinger2007-02-081-1/+1
| | | | mark both arguments as being non-NULL
* missed an underscore in previous commitMike Frysinger2007-01-291-1/+1
|
* Bernhard Fischer writes: note how uClibc chooses to handle __resolved==NULLMike Frysinger2007-01-281-1/+2
|
* - gcvt() is marked LEGACY in XSI and mandatory in BSD.Bernhard Reutner-Fischer2006-11-291-2/+4
| | | | Also make compilation conditional on float support.
* janlana writes in Bug 700: use standard uint* types rather than u_intMike Frysinger2006-02-081-1/+1
|
* Enable gcvt in header, we build itPeter S. Mazinger2006-01-261-2/+4
|
* include stdinit for arc4random() as pointed out by Jan-Benedict GlawMike Frysinger2006-01-091-0/+1
|
* prototypes for arc4randomMike Frysinger2006-01-081-0/+6
|
* Remove __strto* from header (glibc sync), disable __asprintf/__getdelim, not ↵Peter S. Mazinger2005-12-081-35/+0
| | | | provided
* sync with glibc and Paul Brook says: fix posix_memalign prototype by ↵Mike Frysinger2005-11-251-60/+65
| | | | dropping __attribute_malloc__
* Protect *strto{d,f,ld}_l by UCLIBC_HAS_FLOATSPeter S. Mazinger2005-11-051-0/+4
|
* Sync up w/ glibcPeter S. Mazinger2005-11-041-77/+180
|
* We do not supply a BSD style getloadavg() functionEric Andersen2005-08-151-7/+0
|
* Cleanup some dead wood in the header filesEric Andersen2004-07-301-224/+0
|
* Remove all reference to __GLIBC_HAVE_LONG_LONGEric Andersen2004-07-271-3/+3
|
* Move an #endif that was in the wrong place.Manuel Novoa III2003-09-051-1/+1
|
* Fix a few bugs in the new extended locale functions.Manuel Novoa III2003-08-241-0/+31
| | | | | | | | | 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-126/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Comment out the rpl_malloc workaround. It was a good idea, but it violatesEric Andersen2003-06-141-0/+2
| | | | | namespace guarantees and conflicts with other programs that have used the AC_FUNC_MALLOC autoconf macro properly.
* grr. It's a void *, not a char *.Eric Andersen2003-05-271-1/+1
|
* Change 'N' to '__size' to avoid conflicts with common #define of NEric Andersen2003-05-271-5/+5
|
* Cope with autoconf's broken AC_FUNC_MALLOC macro, which redefines malloc asEric Andersen2003-05-231-0/+12
| | | | | | | | | rpl_malloc if it does not detect glibc style returning-a-valid-pointer-for-malloc(0) behavior. This wrapper calls malloc() as usual, but if N is zero, we allocate and return a 1-byte block instead.... sigh... -Erik
* Hide unimplemented and legacy ecvt and friends from configure.Eric Andersen2003-01-091-0/+2
| | | | -Erik
* For now, "#if 0" out the inlining of (currently unsupported) glibc-specificManuel Novoa III2003-01-081-1/+6
| | | | string->numeric conversion functions.
* Fixup sysconf to report the correct answer when UCLIBC_DYNAMIC_ATEXITEric Andersen2002-11-271-1/+6
| | | | is enabled.
* Kill the HAS_LONG_LONG option. It really did not make a lot ofEric Andersen2002-08-251-16/+0
| | | | | | sense to exclude it, gcc always supports long long, and we never fully excluded long long anyways (off64_t for example). -Erik
* Patch from Jarkko to fix drand48 to not use long long whenEric Andersen2002-08-151-0/+2
| | | | long long support is disabled in the uClibc Config.