summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include/stdlib.h
Commit message (Collapse)AuthorAgeFilesLines
* Add BSD-specific reallocarray()Sebastian Huber2017-04-041-0/+2
| | | | | It is available in FreeBSD, NetBSD and OpenBSD, but not in glibc. It is used for example by OpenSSH.
* Rename <sys/_locale.h> to <xlocale.h>Yaakov Selkowitz2017-03-221-1/+1
| | | | | | | | | The locale_t type is provided by <xlocale.h> on Linux, FreeBSD, and Darwin. While, like on some of those systems, it is automatically included by <locale.h> with the proper feature test macros, its presence under this particular name is still presumed in real-world software. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* Implement strto[dflu]_l/wcsto[dflu]_lCorinna Vinschen2016-08-151-0/+19
| | | | | | | | | | Implement GNU extensions strtod_l, strtof_l, strtol_l, strtold_l, strtoll_l, strtoul_l, strtoull_l, wcstod_l, wcstof_l, wcstol_l, wcstold_l, wcstoll_l, wcstoul_l, wcstoull_l. Export from Cygwin, fix posix.xml. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Declare crypt, encrypt, and setkey per PosixKen Brown2016-06-091-0/+3
|
* Add simple versions of random() and srandom()Joel Sherrill2016-03-281-0/+6
| | | | | | | | | | | | | Prototypes also added for initstate() and setstate() but they were not implemented in the shared newlib code. * newlib/libc/include/cygwin/stdlib.h: Prototypes added. * winsup/cygwin/include/cygwin/stdlib.h: Prototypes removed. * newlib/libc/stdlib/random.c: New file. * newlib/libc/machine/epiphany/machine/stdlib.h: Removed * newlib/libc/stdlib/Makefile.am: Added random.c. * newlib/libc/stdlib/stdlib.tex: Added random.def. * newlib/libc/stdlib/Makefile.in: Regenerated.
* Drop Cygwin-only posix_memalign prototypeCorinna Vinschen2016-03-231-2/+0
| | | | | | | | | | newlib: * libc/include/stdlib.h (posix_memalign): Drop __rtmes__ guards. cygwin: * include/cygwin/stdlib.h (posix_memalign): Drop prototype. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add nonnull annotation to posix_memalign.Peter Foley2016-03-211-1/+1
| | | | | | | | | | | | | | | | GCC 6.0+ asserts that the memptr argument to the builtin function posix_memalign is nonnull. Add the necessary annotation to the prototype and remove the now unnecessary check to fix a warning. newlib/Changelog newlib/libc/include/stdlib.h: Annotate arg to posix_memalign as non-null. winsup/cygwin/ChangeLog malloc_wrapper.cc (posix_memalign): Remove always true nonnull check. Signed-off-by: Peter Foley <pefoley2@pefoley.com>
* Add arc4random() etc. from OpenBSD 5.8Sebastian Huber2016-03-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | According to the OpenBSD man page, "A Replacement Call for Random". It offers high quality random numbers derived from input data obtained by the OpenBSD specific getentropy() system call which is declared in <unistd.h> and must be implemented for each Newlib port externally. The arc4random() functions are used for example in LibreSSL and OpenSSH. Cygwin provides currently its own implementation of the arc4random family. Maybe it makes sense to use this getentropy() implementation: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libcrypto/crypto/getentropy_win.c?rev=1.4&content-type=text/x-cvsweb-markup * libc/include/stdlib.h (arc4random): Declare if __BSD_VISIBLE. (arc4random_buf): Likewise. (arc4random_uniform): Likewise. * libc/include/sys/unistd.h (getentropy): Likewise. * libc/include/machine/_arc4random.h: New file. * libc/stdlib/arc4random.c: Likewise. * libc/stdlib/arc4random.h: Likewise. * libc/stdlib/arc4random_uniform.c: Likewise. * libc/stdlib/chacha_private.h: Likewise. * libc/sys/rtems/include/machine/_arc4random.h: Likewise. * libc/stdlib/Makefile.am (EXTENDED_SOURCES): Add arc4random.c and arc4random_uniform.c. * libc/stdlib/Makefile.in: Regenerate.
* Feature test macros overhaul: stdlib.hYaakov Selkowitz2016-03-171-46/+52
| | | | | | | | | | | | | | | | | | | | Throughout, simplify the C99/C11 conditionals, and replace __STRICT_ANSI__ with the proper internal POSIX macros. The _*_r reentrant functions need not be guarded (and most haven't been) because such names in the global scope are reserved to the implementation. atoff is unique to newlib. dtoa is not actually exported (_dtoa_r is used internally), is nonstandard, and the declaration conflicts with the code included in MySQL, NSPR, and SpiderMonkey. mktemp was removed in POSIX.1-2001. The qsort_r declarations are reordered so that the GNU version retains precedence. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* Import correctly working strtold from David M. Gay.Corinna Vinschen2015-11-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add strtodg.c and strtorx.c. * libc/stdlib/Makefile.in: Regenerate. * libc/stdlib/strtodg.c: New file implementing generic string to long double conversion. * libc/stdlib/strtorx.c: New file, implementing IEEE format string to long double conversion. * libc/stdlib/mprec.h (_strtodg_r): Declare. (_strtorx_r): Declare. * libc/stdlib/gdtoa.h (__UShort): Define. * libc/stdlib/strtold.c (__flt_rounds): Define for i386 and x86_64 target. (FLT_ROUNDS): Define, as 0 on platforms missing a __flt_rounds function. (_strtold_r): Converted from strtold. Call _strtorx_r on targets supporting distinct long doubles. (strtold): Just call _strtold_r. * libc/include/stdlib.h (_strtold_r): Declare. * libc/stdlib/ldtoa.c (_strtold): Comment out. Explain why. * libc/stdio/vfscanf.c (__SVFSCANF_R): Call _strtold_r instead of _strtold. * libc/machine/powerpc/vfscanf.c (__svfscanf_r): Ditto. * common.din (strtold): Drop redirection to _strtold. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add rpmatch(3)Yaakov Selkowitz2015-11-171-0/+1
| | | | | | | | | | | 2015-11-17 Yaakov Selkowitz <yselkowi@redhat.com> * libc/include/stdlib.h (rpmatch): Declare. * libc/stdlib/Makefile.am (ELIX_4_SOURCES): Add rpmatch.c. (CHEWOUT_FILES): Add rpmatch.def. * libc/stdlib/Makefile.in: Regenerate. * libc/stdlib/rpmatch.c: New file. * libc/stdlib/stdlib.tex: Add references to rpmatch.
* Replace __attribute((__warning__())) by __attribute__((deprecated()))Olivier Martin2015-11-061-2/+2
| | | | | | | | | | Clang raises the warning message: warning: unknown attribute '__warning__' ignored [-Wunknown-attributes] * libc/include/stdlib.h (mktemp): Change attribute to deprecated. (_mktemp_r): Ditto. Signed-off-by: Olivier Martin <olivier@labapart.com>
* C11 aligned_alloc() support for <stdlib.h>Sebastian Huber2015-10-191-0/+2
| | | | | | | newlib/ChangeLog 2015-10-14 Sebastian Huber <sebastian.huber@embedded-brains.de> * libc/include/stdlib.h (alloc_aligned): Declare.
* C11 quick_exit() support for <stdlib.h>Sebastian Huber2015-10-191-0/+9
| | | | | | | | | | | | | | | | Import some <stdlib.h> function declarations from latest FreeBSD and implement them. I am not sure if we should call the global reent cleanup in quick_exit() similar to exit(). newlib/ChangeLog 2015-10-14 Sebastian Huber <sebastian.huber@embedded-brains.de> * libc/include/stdlib.h (at_quick_exit): Declare. (quick_exit): Likewise. * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add quick_exit.c. * libc/stdlib/Makefile.in: Regenerate. * libc/stdlib/quick_exit.c: New.
* * libc/include/stdlib.h (__itoa): Declare prototype.Corinna Vinschen2014-12-161-0/+6
| | | | | | | | | | (__utoa): Ditto. (itoa): Ditto, non-strict-ANSI only. (utoa): Ditto. * libc/stdlib/Makefile.am: Add itoa.c and utoa.c. * libc/stdlib/Makefile.in: Regenerate. * libc/stdlib/itoa.c: New file. * libc/stdlib/utoa.c: New file.
* * libc/include/stdlib.h: Include sys/cdefs.h to avoid undefinedCorinna Vinschen2014-12-151-0/+1
| | | | __ASMNAME.
* * libc/include/stdlib.h (__bsd_qsort_r): Declare.Yaakov Selkowitz2014-12-051-0/+16
| | | | | | | | | | | | | | (qsort_r): Declare. * libc/search/Makefile.am (ELIX_2_SOURCES): Rename from ELIX_SOURCES. (ELIX_4_SOURCES): Define. Add bsd_qsort_r.c and qsort_r.c. (libsearch_la_SOURCES): Adapt accordingly. (lib_a_SOURCES): Adapt accordingly. (CHEWOUT_FILES): Add qsort_r.def. * libc/search/Makefile.in: Regenerate. * libc/search/bsd_qsort_r.c: New file. * libc/search/qsort.c: Update from FreeBSD HEAD. Adapt for both BSD and GNU qsort_r flavors. * libc/search/qsort_r.c: New file.
* * libc/include/_ansi.h: _LONG_LONG_TYPE definition removed.Corinna Vinschen2014-10-101-5/+25
| | | | | | * libc/include/math.h: _LONG_LONG_TYPE replaced by "long long". Guards for C99 and C++11 functions fixed. * libc/include/stdlib.h: Guards for C99 and C++11 functions fixed.
* headers: properly decorate attributesEric Blake2014-08-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by: find -name '*.h' |xargs grep -i 'attribute.*(([a-z]' For an example of the type of bugs this causes, try compiling this valid C11 program (it's valid because 'noreturn' is reserved for use in the user namespace unless you include <stdnoreturn.h>): $ cat foo.c #define noreturn __attribute__((noreturn)) #include <stdlib.h> $ gcc -c -o foo.o -Wall foo.c In file included from /usr/include/stdlib.h:11:0, from foo.c:2: foo.c:1:18: error: expected ')' before '__attribute__' #define noreturn __attribute__((noreturn)) ^ /usr/include/stdlib.h:66:28: error: expected ',' or ';' before ')' token _VOID _EXFUN(abort,(_VOID) _ATTRIBUTE ((noreturn))); ^ * libc/machine/spu/spu_timer_internal.h: Decorate attribute names with __, for namespace safety. * libc/machine/xscale/machine/profile.h: Likewise. * libc/include/stdlib.h: Likewise. * libc/include/_ansi.h: Likewise. * libc/include/sys/unistd.h: Likewise. * libc/sys/linux/linuxthreads/libc-symbols.h: Likewise. * libc/sys/linux/linuxthreads/internals.h: Likewise. * libc/sys/linux/machine/i386/weakalias.h: Likewise. * libc/sys/linux/machine/i386/dl-procinfo.h: Likewise. * libc/sys/linux/machine/i386/dl-machine.h: Likewise. * libc/sys/linux/libc-symbols.h: Likewise. * libc/sys/linux/iconv/gconv_charset.h: Likewise. * libc/sys/linux/include/resolv.h: Likewise. * libc/sys/linux/sys/unistd.h: Likewise. * libc/sys/linux/dl/atomicity.h: Likewise. * libc/sys/linux/dl/dynamic-link.h: Likewise. * libc/sys/linux/dl/ldsodefs.h: Likewise.
* * libc/include/stdlib.h (strtold): Define if _HAVE_LONG_DOUBLE isCorinna Vinschen2014-03-071-2/+2
| | | | | | defined. * libc/stdlib/strtold.c (strtold): Ditto. Call strtod on systems with long double == double, _strtold otherwise.
* 2013-12-22 JF Bastien <jfb@chromium.org>Jeff Johnston2013-12-231-2/+3
| | | | | | | | | | | * libc/include/limits.h: Define LLONG_MIN, LLONG_MAX and ULLONG_MAX for C++11 too. * libc/include/stdlib.h: Define struct lldiv_t, _Exit, atoll, llabs and lldiv for C99 and C++11. Move wcstold to wchar.h. * libc/include/wchar.h: Define WCHAR_MIN and WCHAR_MAX according to __WCHAR_UNSIGNED__ if it is provided, and correct the limit when unsigned (to 32 all-1 bits, not 31). Define FILE as in stdio.h. Move wcstold from stdlib.h here.
* * libc/include/stdlib.h: Declare realpath only if !__STRICT_ANSI__.Corinna Vinschen2013-11-201-1/+1
|
* 2013-11-18 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2013-11-191-0/+1
| | | | | * libc/include/stdlib.h: Add prototype of realpath(). * libc/sys/linux/realpath.c: Add restrict keyword.
* 2013-11-18 Sahil Patnayakuni <sahilp@oarcorp.com>Joel Sherrill2013-11-181-18/+18
| | | | | | | | | | | * libc/include/stdlib.h, libc/stdlib/mbstowcs.c, libc/stdlib/mbstowcs_r.c, libc/stdlib/mbtowc.c, libc/stdlib/mbtowc_r.c, libc/stdlib/strtod.c, libc/stdlib/strtol.c, libc/stdlib/strtold.c, libc/stdlib/strtoll.c, libc/stdlib/strtoll_r.c, libc/stdlib/strtoul.c, libc/stdlib/strtoull.c, libc/stdlib/strtoull_r.c, libc/stdlib/wcstombs.c, libc/stdlib/wcstombs_r.c: Add restrict keyword.
* * libc/include/search.h (__compar_fn_t): Add typedef.Yaakov Selkowitz2013-09-081-2/+7
| | | | | | (tdelete, tfind, tsearch): Use it. * libc/include/stdlib.h (__compar_fn_t): Add typedef. (bsearch, qsort): Use it.
* Revert to original patchCorinna Vinschen2013-04-111-4/+4
|
* * libc/include/stdlib.h (strtof, strtoll, strtoull, strtold): AlsoCorinna Vinschen2013-04-111-4/+4
| | | | prototype if C++11 or later.
* * libc/include/locale.h (NULL): Fetch definition via stddef.h.Corinna Vinschen2012-11-011-4/+1
| | | | | | | | | * libc/include/stdio.h (NULL): Ditto. * libc/include/stdlib.h (NULL): Ditto. * libc/include/string.h (NULL): Ditto. * libc/include/wchar.h (NULL): Ditto. * libc/include/rpc/types.h (NULL): Ditto. * libc/include/time.h (NULL): Ditto. Include stddef.h earlier.
* * libc/include/stdlib.h (strtof, strtoll, strtoull, strtold):PrototypeCorinna Vinschen2012-10-221-0/+12
| | | | if not __STRICT_ANSI__ or stdc version C99 or greater.
* Add mkostemp and mkostemps.Eric Blake2010-07-191-2/+6
| | | | | | | | | * libc/stdio/mktemp.c (_gettemp): Add parameter, all callers changed. (mkostemp, _mkostemp_r, mkostemps, _mkostemps_r): New interfaces, for ELIX level 4. * libc/include/stdlib.h (mktemp): Avoid namespace issues. (mkostemp, mkostemps): Declare.
* Extend locale support to maintain wide char values of native stringsCorinna Vinschen2010-04-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if __HAVE_LOCALE_INFO_EXTENDED__ is defined. * libc/include/langinfo.h (enum __nl_item): New type. Define all native values accessible through nl_langinfo. Define previously existing POSIX-compatible values as macros as well. * libc/include/stdlib.h (__mb_cur_max): Drop declaration. (__locale_mb_cur_max): Declare. (MB_CUR_MAX): Re-define calling __locale_mb_cur_max. * libc/locale/Makefile.am (ELIX_SOURCES): Add lctype.c. * libc/locale/Makefile.in: Regenerate. * libc/locale/lctype.c: New file to define and load LC_CTYPE category. * libc/locale/lctype.h: New file, matching header. * libc/locale/lmessages.c (_C_messages_locale): Add default values for wide char members. (__messages_load_locale): Add _C_messages_locale in call to __set_lc_messages_from_win. * libc/locale/lmessages.h (struct lc_messages_T): Add wide char members. * libc/locale/lmonetary.c (_C_monetary_locale): Add default values for wide char members. (__monetary_load_locale): Add _C_monetary_locale in call to __set_lc_monetary_from_win. * libc/locale/lmonetary.h (struct lc_monetary_T): Add wide char members. Add numerical values for international currency formatting per POSIX-1.2008, if __HAVE_LOCALE_INFO_EXTENDED__ is defined. * libc/locale/lnumeric.c (_C_numeric_locale): Add default values for wide char members. (__numeric_load_locale): Add _C_numeric_locale in call to __set_lc_numeric_from_win. * libc/locale/lnumeric.h (struct lc_numeric_T): Add wide char members. * libc/locale/locale.c (loadlocale): Return doing nothing if category locale didn't change. Convert category if chain to switch statement. Call __ctype_load_locale in LC_CTYPE case. (__locale_charset): Add (but disable for now) returning codeset from __get_current_ctype_locale. (__locale_mb_cur_max): Add (but disable for now) returning mb_cur_max from __get_current_ctype_locale. (__locale_msgcharset): Add returning codeset from __get_current_messages_locale. (_localeconv_r): Accommodate int_XXX values. * libc/locale/nl_langinfo.c (nl_ext): New array to define what is to be returned for non-POSIX values. (nl_Langinfo): Return correct codeset for each locale category. Return extended values if __HAVE_LOCALE_INFO_EXTENDED__ is defined. * libc/locale/timelocal.c (_C_time_locale): Add default values for wide char members. (__time_load_locale): Add _C_time_locale in call to __set_lc_time_from_win. * libc/locale/timelocal.h (struct lc_time_T): Add wide char members. * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Use wide char decimal point and thousands_sep if __HAVE_LOCALE_INFO_EXTENDED__ is defined. * libc/time/strftime.c: Rework to accommodate availability of wide char strings in LC_TIME category if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
* Fix getsubopt declaration.Eric Blake2009-12-221-0/+4
| | | | | * libc/include/sys/unistd.h (suboptarg, getsubopt): Move... * libc/include/stdlib.h: ...here, to match POSIX for getsubopt.
* 2009-12-17 Jerker Back <jerker.back@gmail.com>Jeff Johnston2009-12-171-1/+1
| | | | | | | | | | | | | | | * libc/include/_ansi.h: Add new _EXFNPTR macro for using with function pointer arguments. * libc/iconv/lib/conv.h: Use _EXFNPTR rather than _EXPARM macro. * libc/iconv/lib/ucsconv.h: Ditto. * libc/include/stdlib.h: Use new _EXFNPTR macro for function pointers. * libc/include/sys/reent.h: Ditto. * libc/include/sys/unistd.h: Ditto. * libc/search/bsearch.c: Ditto. * libc/stdio/fseek.c: Ditto. * libc/stdio64/fseeko64.c: Ditto. * libc/stdlib/atexit.c: Ditto. * libc/stdlib/on_exit.c: Ditto.
* 2009-09-22 Ralf Corsépius <ralf.corsepius@rtems.org>Jeff Johnston2009-09-221-0/+4
| | | | * libc/include/stdlib.h: Add posix_memalign.
* Add mkdtemp, mkstemps.Eric Blake2009-07-031-2/+6
| | | | | | | | | | * libc/stdio/mktemp.c: Fix documentation. (_gettemp): Add domkdir and length parameters. Check for insufficient 'X' suffix. Drop cygwin-specific code. (_mkstemp_r, _mktemp_r, mkstemp, mktemp): Adjust clients. (_mkdtemp_r, _mkstemps_r, mkdtemp, mkstemps): New functions. * libc/include/stdlib.h (_mkdtemp_r, _mkstemps_r, mkdtemp) (mkstemps): Declare them.
* 2009-04-24 Jeff johnston <jjohnstn@redhat.com>Jeff Johnston2009-04-241-3/+3
| | | | | | | | | | | | | * configure.in: Add configuration test for long double equals dbl and set flag _LDBL_EQ_DBL if true. * configure: Regenerated. * newlib.hin: Add _LDBL_EQ_DBL flag. * libc/include/math.h: Use _LDBL_EQ_DBL flag instead of _HAVE_LDBL_MATH. * libc/include/stdlib.h: Use _LDBL_EQ_DBL flag instead of _HAVE_LDBL_STDLIB. * libc/common/local.h: Remove _LDBL_EQ_DBL flag setting. * libc/stdlib/local.h: Ditto.
* 2009-04-21 Mark Mitchell <mark@codesourcery.com>Jeff Johnston2009-04-211-8/+8
| | | | | | | | | | | | | | * libc/include/_ansi.h: Move C++ defines to top of file. (_NOTHROW): New macro. (_EXFUN_NOTHROW): Likewise. * libc/include/stdlib.h (calloc): Declare with _EXFUN_NOTHROW. (free): Likewise. (malloc): Likewise. (realloc): Likewise. (_malloc_r): Likewise. (_callor_r): Likewise. (_free_r): Likewise. (_realloc_r): Likewise.
* 2009-04-20 Jeff johnston <jjohnstn@redhat.com>Jeff Johnston2009-04-201-3/+3
| | | | | | | * libc/include/math.h: Change _LDBL_EQ_DBL flag usage to be _HAVE_LDBL_MATH. * libc/include/stdlib.h: Change _LDBL_EQ_DBL flag usage to be _HAVE_LDBL_STDLIB.
* 2009-04-16 Ken Werner <ken.werner@de.ibm.com>Jeff Johnston2009-04-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libm/libm.texinfo: Add long double function support chapter. * libc/include/machine/ieeefp.h: Add _LDBL_EQ_DBL define. * libc/include/stdlib.h: Include <machine/ieeefp.h>. (strtold, wcstold): Declare. * libc/stdlib/strtold.c: New File. * libc/stdlib/wcstold.c: Likewise. * libc/configure.in: Add long double check. * libc/configure: Regenerate. * libc/stdlib/Makefile.am: Add strtold.c and wcstold.c. * libc/stdlib/Makefile.in: Regenerate. * libc/include/math.h (atanl, cosl, sinl, tanl, tanhl): Declare. (frexpl, modfl, ceill, fabsl, floorl, log1pl, expm1l, acosl): Ditto. (asinl, atan2l, coshl, sinhl, expl, ldexpl, logl, log10l, powl): Ditto. (sqrtl, fmodl, hypotl, copysignl, nanl, ilogbl, asinhl, cbrt): Ditto. (nextafterl, rintl, scalbnl, exp2l, scalblnl, tgammal): Ditto. (nearbyintl, lrintl, llrintl, roundl, lroundl, llround): Ditto. (llroundl, truncl, remquol, fdiml, fmaxl, fminl, fmal, acoshl): Ditto. (atanhl, remainderl, lgammal, erfl, erfcl): Ditto. * libm/common/atanl.c: New File. * libm/common/cosl.c: Likewise. * libm/common/sinl.c: Likewise. * libm/common/modfl.c: Likewise. * libm/common/frexpl.c: Likewise. * libm/common/tanhl.c: Likewise. * libm/common/tanl.c: Likewise. * libm/common/expm1l.c: Likewise. * libm/common/log1pl.c: Likewise. * libm/common/ceill.c: Likewise. * libm/common/fabsl.c: Likewise. * libm/common/floorl.c: Likewise. * libm/common/acosl.c: Likewise. * libm/common/asinl.c: Likewise. * libm/common/atan2l.c: Likewise. * libm/common/coshl.c: Likewise. * libm/common/expl.c: Likewise. * libm/common/fmodl.c: Likewise. * libm/common/hypotl.c: Likewise. * libm/common/ldexpl.c: Likewise. * libm/common/log10l.c: Likewise. * libm/common/logl.c: Likewise. * libm/common/powl.c: Likewise. * libm/common/sqrtl.c: Likewise. * libm/common/copysignl.c: Likewise. * libm/common/ilogbl.c: Likewise. * libm/common/nanl.c: Likewise. * libm/common/cbrtl.c: Likewise. * libm/common/asinhl.c: Likewise. * libm/common/nextafterl.c: Likewise. * libm/common/rintl.c: Likewise. * libm/common/scalbnl.c: Likewise. * libm/common/exp2l.c: Likewise. * libm/common/fdiml.c: Likewise. * libm/common/fmal.c: Likewise. * libm/common/fmaxl.c: Likewise. * libm/common/fminl.c: Likewise. * libm/common/lrintl.c: Likewise. * libm/common/lroundl.c: Likewise. * libm/common/nearbyintl.c: Likewise. * libm/common/remquol.c: Likewise. * libm/common/roundl.c: Likewise. * libm/common/scalblnl.c: Likewise. * libm/common/truncl.c: Likewise. * libm/common/acoshl.c: Likewise. * libm/common/atanhl.c: Likewise. * libm/common/erfcl.c: Likewise. * libm/common/erfl.c: Likewise. * libm/common/lgammal.c: Likewise. * libm/common/remainderl.c: Likewise. * libm/common/tgammal.c: Likewise. * libm/common/sinhl.c: Likewise. * libm/common/llroundl.c: Likewise. * libm/configure.in: Add long double check. * libm/configure: Regenerate. * libm/common/Makefile.am: Add new files. * libm/common/Makefile.in: Regenerate.
* * libc/include/stdlib.h (_mkstemp_r, _mktemp_r): Move out ofCorinna Vinschen2009-03-141-2/+2
| | | | !_REENT_ONLY section.
* * libc/include/stdio.h (_mkstemp_r, _mktemp_r): Move declarationsCorinna Vinschen2009-03-141-1/+3
| | | | | | | to stdlib.h. * libc/include/stdlib.h (mktemp, _mktemp_r): Warn when using. * libc/stdio/mktemp.c: Explain the security risk when using mktemp.
* 2008-11-19 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2008-11-191-0/+4
| | | | | | | | | | | | | | | * libc/sys/linux/bits/dirent.h: New header file. * libc/sys/linux/sys/dirent.h: Include <bits/dirent.h> instead of <linux/dirent.h>. * libc/posix/Makefile.am: Remove reallocf. * libc/posix/Makefile.in: Regenerated. * libc/posix/reallocf.c: Moved to... * libc/stdlib/reallocf.c: Here * libc/stdlib/malloc.c: Add reallocf documentation. * libc/include/stdlib.h: Add reallocf and _reallocf_r prototypes. * libc/stdlib/Makefile.am: Add reallocf. * libc/stdlib/Makefile.in: Regenerated. * libc/posix/_isatty.c: Set errno.
* 2008-09-24 Pawel Veselov <pawel.veselov@gmail.com>Jeff Johnston2008-09-251-2/+2
| | | | | | | | | | | | | | | Fix setenv/getenv/unsetenv to be OpenGroup compliant: * libc/include/stdlib.h (unsetenv, _unsetenv_r): Redefine with integer return types. * libc/stdlib/getenv_r.c (_findenv_r): Do no special processing with names that contain equal chars. * libc/stdlib/setenv.c: Redefine _unsetenv_r as returning int. * libc/stdlib/setenv_r.c (_setenv_r): Return -1 and set errno to EINVAL if name contains an equal sign. Do not remove any equal signs from the value. (_unsetenv_r): Modified to return int. Return -1 and set EINVAL if name contains equal sign. Return -1 if no variable(s) were found and return 0 otherwise.
* * libc/include/stdlib.h: Move cygwin declarations to cygwin-specific file.Christopher Faylor2005-12-051-42/+4
| | | | Declare unsetenv and _unsetenv_r when not cygwin.
* 2004-11-24 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2004-11-241-2/+2
| | | | | | | * libc/include/stdlib.h (putenv, _putenv_r): Change to remove const for value string parameter. * libc/stdlib/putenv.c: Ditto. * libc/stdlib/putenv_r.c: Ditto.
* 2003-11-27 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2003-11-271-0/+1
| | | | | * libc/include/stdlib.h (_atoi_r): New prototype. * libc/stdlib/atoi.c (_atoi_r): New reentrant function.
* 2003-11-27 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2003-11-271-0/+2
| | | | | | * libc/include/stdlib.h (_atoll_r, _atol_r): New prototypes. * libc/stdlib/atol.c (_atol_r): New reentrant function. * libc/stdlib/atoll.c (_atoll_r): Ditto.
* 2003-11-27 Artem B. Bityuckiy <mail_lists@mail.ru>Jeff Johnston2003-11-271-0/+11
| | | | | | | | | | | | | Jeff Johnston <jjohnstn@redhat.com> * libc/include/stdlib.h (lldiv_t): New type. (atoll, llabs, lldiv): New prototypes. * libc/stdlib/Makefile.am: Add support for atoll, llabs, and lldiv. * libc/stdlib/stdlib.tex: Ditto. * libc/stdlib/Makefile.in: Regenerated. * libc/stdlib/atoll.c: New file. * libc/stdlib/llabs.c: Ditto. * libc/stdlib/lldiv.c: Ditto.
* * libc/include/stdlib.h (getprogname): Declare for Cygwin.Corinna Vinschen2003-11-171-0/+6
| | | | (setprogname): Ditto.
* 2002-12-06 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2002-12-061-1/+5
| | | | | | | | | | | | | | * libc/include/stdlib.h (strtof): New prototype (from C99). (strtodf): Changed from prototype to macro which redefines to strtof. * libc/stdlib/atof.c: Change documentation to refer to strtof instead of strtodf. * libc/stdlib/atoff.c (atoff): Change to call strtof instead of strtodf. * libc/stdlib/strtod.c (strtodf): Renamed to strtof. (strtof): New function. * libm/test/convert.c (test_strtodf): Renamed to test_strtof which calls strtof.