acadia-newlib/newlib/libc/stdlib
Corinna Vinschen 1f232abc89 Throughout, run newlib with -Wall -Werror option and fix bugs and
compiler warnings found this way.

	* libc/stdio/freopen.c (_freopen_r): Fix bug setting _flags.

	* libc/include/stdio.h (_rename): Define when building newlib.
	* libc/include/sys/signal.h (_kill): Ditto.
	* libc/include/sys/stat.h (_mkdir): Ditto.
	* libc/include/sys/time.h (_gettimeofday): Ditto.
	* libc/include/sys/times.h (_times): Ditto.
	* libc/include/sys/wait.h (_wait): Ditto.
	* libc/locale/lmessages.c (empty): Don't define for Cygwin.
	* libc/locale/lmonetary.c (cnv): Ditto.
	* libc/locale/nl_langinfo.c (nl_langinfo): Ditto for variable s.
	* libc/posix/collate.c: Throughout cast to avoid compiler warning.
	* libc/posix/engine.c (matcher): Initialize dp to avoid compiler
	warning.
	* libc/posix/glob.c: Disable on Cygwin.  Explain why.
	* libc/posix/regcomp.c: Fix "uninitialized" compiler warnings.
	(dissect): Deliberately silence gcc compiler warning.  Add comment to
	explain why.
	* libc/posix/wordexp.c (wordexp): Remove num_bytes variable since result
	is never used.
	* libc/posix/popen.c (popen): Ditto for variable last.
	* libc/reent/mkdirr.c: Include sys/stat.h.
	* libc/reent/renamer.c: Include stdio.h.
	* libc/search/hash.c:  Throughout use underscored variants of the stat
	function family.
	(init_hash): Add missing definition for the __USE_INTERNAL_STAT64 case.
	* libc/search/hash_bigkey.c (__big_insert): Add parenthesis to avoid
	compiler warning.
	* libc/search/hash_page.c (overflow_page): Initalize freep to NULL to
	avoid compiler warning.
	* libc/stdio/asiprintf.c (_asiprintf_r): Cast unsigned char * to char *
	to avoid compiler warning.
	(asiprintf): Ditto.
	* libc/stdio/asprintf.c (_asprintf_r): Ditto.
	(asprintf): Ditto.
	* libc/stdio/vasiprintf.c (_vasiprintf_r): Ditto.
	* libc/stdio/vasprintf.c (_vasprintf_r): Ditto.
	* libc/stdio/mktemp.c (_gettemp): Cast to unsigned char in call to
	isdigit to avoid compiler warning.
	* libc/stdio/vfprintf.c (_VFPRINTF_R): Initialize variables used for
	grouping to avoid compiler warning.  Only define and set nseps and
	nrepeats if they are really used.
	* libc/stdio/vfwprintf.c (_VFWPRINTF_R): Ditto.  Only define state if
	it is really used.
	* libc/stdio/vfscanf.c (u_char): Revert to be defined as unsigned char.
	(__SVFSCANF_R): Cast fmt in call to __mbtowc.
	* libc/stdlib/mbtowc_r.c (JIS_state_table): Disable when building
	Cygwin.
	(JIS_action_table): Ditto.
	* libc/stdlib/wctomb_r.c (__utf8_wctomb): Add parenthesis to avoid
	compiler warning.
	* libc/string/strcasestr.c: Deliberately silence gcc compiler warning.
	Add comment to explain why.
	* libc/time/strptime.c (strptime): Cast to unsigned char in calls to
	isspace to avoid compiler warning.
	* libm/math/e_atan2.c (__ieee754_atan2): Add parenthesis to avoid
	compiler warning.
	* libm/math/e_exp.c (__ieee754_exp): Initialize k to 0 to avoid
	compiler warning.  Drop setting it to 0 later.
	* libm/math/ef_exp.c (__ieee754_expf): Ditto.
	* libm/math/e_pow.c (__ieee754_pow): Add braces to avoid compiler
	warning.
	* libm/math/ef_pow.c (__ieee754_powf): Ditto.
	* libm/math/er_lgamma.c (__ieee754_lgamma_r): Initialize nadj to 0 to
	avoid compiler warning.
	* libm/math/erf_lgamma.c (__ieee754_lgammaf_r): Ditto.
	* libm/math/e_rem_pio2.c (__ieee754_rem_pio2): Ditto for variable z.
	* libm/common/sf_round.c (roundf): Remove signbit variable since result
	is never used.
2012-08-08 11:04:18 +00:00
..
Makefile.am 2009-04-16 Ken Werner <ken.werner@de.ibm.com> 2009-04-16 18:24:35 +00:00
Makefile.in 2011-12-19 Jeff Johnston <jjohnstn@redhat.com> 2011-12-19 22:03:51 +00:00
_Exit.c 2002-06-13 Jeff Johnston <jjohnstn@redhat.com> 2002-06-13 23:24:03 +00:00
__adjust.c import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00
__atexit.c 2012-01-03 Viachaslau Kulakouski <Viachaslau.Kulakouski@oracle.com> 2012-01-03 19:13:57 +00:00
__call_atexit.c 2010-06-08 Jeff Johnston <jjohnstn@redhat.com> 2010-06-08 18:44:14 +00:00
__exp10.c 2008-12-11 Craig Howland <howland@LGSInnovations.com> 2008-12-11 17:27:56 +00:00
__ten_mu.c 2008-12-11 Craig Howland <howland@LGSInnovations.com> 2008-12-11 17:27:56 +00:00
a64l.c 2009-07-29 Jeff Johnston <jjohnstn@redhat.com> 2009-07-29 22:33:40 +00:00
abort.c 2000-08-23 Werner Almesberger <Werner.Almesberger@epfl.ch> 2000-08-24 18:51:09 +00:00
abs.c import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00
assert.c 2009-10-08 Jeff Johnston <jjohnstn@redhat.com> 2009-10-08 16:44:10 +00:00
atexit.c 2009-12-17 Jerker Back <jerker.back@gmail.com> 2009-12-17 19:43:43 +00:00
atexit.h 2004-09-09 Paul Brook <paul@codesourcery.com> 2004-09-09 19:46:54 +00:00
atof.c 2003-10-20 Bob Wilson <bob.wilson@acm.org> 2003-10-20 18:46:38 +00:00
atoff.c 2002-12-06 Jeff Johnston <jjohnstn@redhat.com> 2002-12-06 18:58:51 +00:00
atoi.c 2003-11-27 Jeff Johnston <jjohnstn@redhat.com> 2003-11-27 20:54:12 +00:00
atol.c 2003-11-27 Jeff Johnston <jjohnstn@redhat.com> 2003-11-27 20:15:47 +00:00
atoll.c 2003-11-27 Jeff Johnston <jjohnstn@redhat.com> 2003-11-27 20:15:47 +00:00
btowc.c * libc/stdlib/btowc.c (btowc): Reorganize EOF check. Fix incorrect 2010-04-06 14:46:31 +00:00
calloc.c 2008-10-31 Jeff Johnston <jjohnstn@redhat.com> 2008-10-31 21:08:03 +00:00
cxa_atexit.c 2004-09-15 Jeff Johnston <jjohnstn@redhat.com> 2004-09-15 20:50:08 +00:00
cxa_finalize.c 2004-09-15 Jeff Johnston <jjohnstn@redhat.com> 2004-09-15 20:50:08 +00:00
div.c 2003-10-20 Bob Wilson <bob.wilson@acm.org> 2003-10-20 18:46:38 +00:00
drand48.c * implement a new `struct _reent' that is significantly smaller. use this 2002-02-03 09:24:18 +00:00
dtoa.c 2006-08-03 J"orn Rennecke <joern.rennecke@st.com> 2006-08-03 16:56:05 +00:00
dtoastub.c 2009-12-03 Craig Howland <howland@LGSInnovations.com> 2009-12-03 16:11:27 +00:00
ecvtbuf.c Mon Apr 17 12:46:00 2000 Marek Michalkiewicz <marekm@linux.org.pl> 2000-04-17 17:10:18 +00:00
efgcvt.c 2008-10-31 Jeff Johnston <jjohnstn@redhat.com> 2008-10-31 21:08:03 +00:00
environ.c 2002-12-20 Jeff Johnston <jjohnstn@redhat.com> 2002-12-20 21:07:56 +00:00
envlock.c 2008-10-31 Jeff Johnston <jjohnstn@redhat.com> 2008-10-31 21:08:03 +00:00
eprintf.c import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00
erand48.c 2001-02-14 Kazuhiro Fujieda <fujieda@jaist.ac.jp> 2001-02-15 02:04:55 +00:00
exit.c 2004-09-16 Antony King <antony.king@st.com> 2004-09-16 21:26:51 +00:00
gd_qnan.h 2006-06-22 Jeff Johnston <jjohnstn@redhat.com> 2006-06-22 17:59:52 +00:00
gdtoa-gethex.c * libc/stdio/vfprintf.c (_VFPRINTF_R): Use actual length of 2009-06-16 17:44:20 +00:00
gdtoa-hexnan.c Fix strtod("nan()", ptr). 2008-03-04 18:27:01 +00:00
gdtoa.h 2006-06-22 Jeff Johnston <jjohnstn@redhat.com> 2006-06-22 17:59:52 +00:00
getenv.c * libm/math/ef_sqrt.c: Delete unused variable sign. 2010-03-05 08:55:16 +00:00
getenv_r.c * libm/math/ef_sqrt.c: Delete unused variable sign. 2010-03-05 08:55:16 +00:00
getopt.c 2008-03-07 Jeff Johnston <jjohnstn@redhat.com> 2008-03-07 18:16:35 +00:00
getsubopt.3 * libc/argz/argz_replace.c: Include buf_findstr.h. 2002-07-19 20:36:09 +00:00
getsubopt.c * libc/argz/argz_replace.c: Include buf_findstr.h. 2002-07-19 20:36:09 +00:00
jrand48.c 2001-02-14 Kazuhiro Fujieda <fujieda@jaist.ac.jp> 2001-02-15 02:04:55 +00:00
l64a.c 2002-05-06 Jeff Johnston <jjohnstn@redhat.com> 2002-05-06 20:44:54 +00:00
labs.c import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00
lcong48.c * implement a new `struct _reent' that is significantly smaller. use this 2002-02-03 09:24:18 +00:00
ldiv.c 2003-10-20 Bob Wilson <bob.wilson@acm.org> 2003-10-20 18:46:38 +00:00
ldtoa.c 2008-12-11 Craig Howland <howland@LGSInnovations.com> 2008-12-11 17:27:56 +00:00
llabs.c 2003-11-27 Artem B. Bityuckiy <mail_lists@mail.ru> 2003-11-27 19:47:19 +00:00
lldiv.c 2003-11-27 Artem B. Bityuckiy <mail_lists@mail.ru> 2003-11-27 19:47:19 +00:00
local.h 2009-08-25 Andy Koppe <andy.koppe@gmail.com> 2009-08-25 18:47:24 +00:00
lrand48.c * implement a new `struct _reent' that is significantly smaller. use this 2002-02-03 09:24:18 +00:00
malign.c * libc/stdlib/malign.c: Don't compile if MALLOC_PROVIDED. 2002-11-13 01:20:31 +00:00
malloc.c 2008-11-19 Jeff Johnston <jjohnstn@redhat.com> 2008-11-19 20:56:22 +00:00
mallocr.c 2010-05-31 Kazu Hirata <kazu@codesourcery.com> 2010-05-31 19:15:41 +00:00
mbctype.h * libc/stdlib/mbctype.h (_iseucjp1): Like _iseucjp, but also 2009-04-09 08:20:10 +00:00
mblen.c * libc/stdio/vfprintf.c: Include ../stdlib/local.h. Replace call to 2009-11-18 09:49:57 +00:00
mblen_r.c * libc/stdio/vfprintf.c: Include ../stdlib/local.h. Replace call to 2009-11-18 09:49:57 +00:00
mbrlen.c 2004-04-23 Artem B. Bityuckiy <abitytsky@softminecorp.com> 2004-04-23 21:44:22 +00:00
mbrtowc.c * libc/stdio/vfprintf.c: Include ../stdlib/local.h. Replace call to 2009-11-18 09:49:57 +00:00
mbsinit.c * libc/stdlib/mbrlen.c: Change include order to prevent compiler errors when 2003-12-05 06:13:44 +00:00
mbsnrtowcs.c * libc/include/wchar.h (mbsnrtowcs): Declare. 2009-02-19 09:19:42 +00:00
mbsrtowcs.c * libc/include/wchar.h (mbsnrtowcs): Declare. 2009-02-19 09:19:42 +00:00
mbstowcs.c 2004-04-23 Artem B. Bityuckiy <abitytsky@softminecorp.com> 2004-04-23 21:44:22 +00:00
mbstowcs_r.c * libc/stdio/vfprintf.c: Include ../stdlib/local.h. Replace call to 2009-11-18 09:49:57 +00:00
mbtowc.c * libc/stdio/vfprintf.c: Include ../stdlib/local.h. Replace call to 2009-11-18 09:49:57 +00:00
mbtowc_r.c Throughout, run newlib with -Wall -Werror option and fix bugs and 2012-08-08 11:04:18 +00:00
mlock.c 2005-10-28 Bob Wilson <bob.wilson@acm.org> 2005-10-28 21:21:08 +00:00
mprec.c Use NetBSD fix for CVE-2009-0689 security vulnerability. 2009-11-23 17:02:20 +00:00
mprec.h * libc/stdlib/mprec.h (Storeinc): Add parenthesis to avoid compiler 2012-08-07 17:52:51 +00:00
mrand48.c * implement a new `struct _reent' that is significantly smaller. use this 2002-02-03 09:24:18 +00:00
msize.c * libc/stdlib/malign.c: Don't compile if MALLOC_PROVIDED. 2002-11-13 01:20:31 +00:00
mstats.c 2005-10-28 Bob Wilson <bob.wilson@acm.org> 2005-10-28 21:21:08 +00:00
mtrim.c * libc/stdlib/malign.c: Don't compile if MALLOC_PROVIDED. 2002-11-13 01:20:31 +00:00
nrand48.c 2001-02-14 Kazuhiro Fujieda <fujieda@jaist.ac.jp> 2001-02-15 02:04:55 +00:00
on_exit.c 2009-12-17 Jerker Back <jerker.back@gmail.com> 2009-12-17 19:43:43 +00:00
putenv.c 2004-11-24 Jeff Johnston <jjohnstn@redhat.com> 2004-11-24 22:34:15 +00:00
putenv_r.c 2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org> 2011-08-23 12:03:55 +00:00
rand.c 2006-09-12 Paul Brook <paul@codesourcery.com> 2006-09-12 17:31:40 +00:00
rand48.c 2005-10-28 Bob Wilson <bob.wilson@acm.org> 2005-10-28 21:21:08 +00:00
rand48.h * implement a new `struct _reent' that is significantly smaller. use this 2002-02-03 09:24:18 +00:00
rand_r.c Thu Jun 8 17:54:00 2000 Jeff Johnston <jjohnstn@cygnus.com> 2000-06-08 21:56:18 +00:00
realloc.c import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00
reallocf.c 2008-11-19 Jeff Johnston <jjohnstn@redhat.com> 2008-11-19 20:56:22 +00:00
sb_charsets.c * libc/ctype/ctype_cp.h (_CTYPE_GEORGIAN_PS_128_254): Define. 2010-02-06 18:28:33 +00:00
seed48.c * implement a new `struct _reent' that is significantly smaller. use this 2002-02-03 09:24:18 +00:00
setenv.c 2008-09-24 Pawel Veselov <pawel.veselov@gmail.com> 2008-09-25 01:23:08 +00:00
setenv_r.c 2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org> 2011-08-23 12:03:55 +00:00
srand48.c * implement a new `struct _reent' that is significantly smaller. use this 2002-02-03 09:24:18 +00:00
std.h 2008-12-11 Craig Howland <howland@LGSInnovations.com> 2008-12-11 17:27:56 +00:00
stdlib.tex 2010-01-29 Jeff Johnston <jjohnstn@redhat.com> 2010-01-29 23:04:21 +00:00
strtod.c * libc/stdlib/strtod.c (_strtod_r): Fix nf/nd counts to not exceed 2011-05-16 13:34:06 +00:00
strtol.c 2010-10-27 Maurice Baijens <maurice.baijens@ellips.nl> 2010-10-27 19:06:10 +00:00
strtold.c 2009-04-17 Jeff johnston <jjohnstn@redhat.com> 2009-04-17 22:15:43 +00:00
strtoll.c * libc/include/wchar.h: Declare wcstol, wcstoll, wcstoul, 2007-07-06 20:03:28 +00:00
strtoll_r.c 2010-10-27 Maurice Baijens <maurice.baijens@ellips.nl> 2010-10-27 19:06:10 +00:00
strtoul.c 2010-10-27 Maurice Baijens <maurice.baijens@ellips.nl> 2010-10-27 19:06:10 +00:00
strtoull.c * libc/include/wchar.h: Declare wcstol, wcstoll, wcstoul, 2007-07-06 20:03:28 +00:00
strtoull_r.c 2010-10-27 Maurice Baijens <maurice.baijens@ellips.nl> 2010-10-27 19:06:10 +00:00
system.c 2008-12-11 Craig Howland <howland@LGSInnovations.com> 2008-12-11 17:27:56 +00:00
valloc.c * libc/stdlib/malign.c: Don't compile if MALLOC_PROVIDED. 2002-11-13 01:20:31 +00:00
wcrtomb.c * libc/stdio/vfprintf.c: Include ../stdlib/local.h. Replace call to 2009-11-18 09:49:57 +00:00
wcsnrtombs.c * libc/stdio/vfprintf.c: Include ../stdlib/local.h. Replace call to 2009-11-18 09:49:57 +00:00
wcsrtombs.c * libc/include/wchar.h (mbsnrtowcs): Declare. 2009-02-19 09:19:42 +00:00
wcstod.c 2009-12-03 Craig Howland <howland@LGSInnovations.com> 2009-12-03 16:11:27 +00:00
wcstol.c * libc/include/wchar.h: Declare wcstol, wcstoll, wcstoul, 2007-07-06 20:03:28 +00:00
wcstold.c 2009-04-17 Jeff johnston <jjohnstn@redhat.com> 2009-04-17 22:15:43 +00:00
wcstoll.c * libc/include/wchar.h: Declare wcstol, wcstoll, wcstoul, 2007-07-06 20:03:28 +00:00
wcstoll_r.c * libc/include/wchar.h: Declare wcstol, wcstoll, wcstoul, 2007-07-06 20:03:28 +00:00
wcstombs.c 2009-08-10 Jeff Johnston <jjohnstn@redhat.com> 2009-08-10 16:23:20 +00:00
wcstombs_r.c * libc/stdlib/wcstombs_r.c (_wcstombs_r): Handle invalid characters 2010-01-19 21:14:53 +00:00
wcstoul.c 2008-11-27 Craig Howland <howland@LGSInnovations.com> 2008-11-27 20:45:37 +00:00
wcstoull.c 2008-11-24 Craig Howland <howland@LGSInnovations.com> 2008-11-24 21:27:33 +00:00
wcstoull_r.c 2008-11-24 Craig Howland <howland@LGSInnovations.com> 2008-11-24 21:27:33 +00:00
wctob.c * libc/stdlib/wctob.c (wctob): Reorganize and fix WEOF check. Rename 2010-05-02 11:55:01 +00:00
wctomb.c * libc/stdio/vfprintf.c: Include ../stdlib/local.h. Replace call to 2009-11-18 09:49:57 +00:00
wctomb_r.c Throughout, run newlib with -Wall -Werror option and fix bugs and 2012-08-08 11:04:18 +00:00