Fix a build problem running the newlib testsuite on targets that only have 32-bit doubles.

* testsuite/newlib.stdio/swprintf.c (main): Change size of value
	used to initialise 'val' variable so that it will compile on
	targets with 32-bit doubles.
This commit is contained in:
Nick Clifton 2015-03-11 11:14:38 +00:00
parent 2a6db5083c
commit 58c9102ea2
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2015-03-11 Nick Clifton <nickc@redhat.com>
* testsuite/newlib.stdio/swprintf.c (main): Change size of value
used to initialise 'val' variable so that it will compile on
targets with 32-bit doubles.
2015-03-05 Craig Howland <howland@LGSInnovations.com> 2015-03-05 Craig Howland <howland@LGSInnovations.com>
* libc/include/stdio.h (FILE): Protect typedef from redefinition. * libc/include/stdio.h (FILE): Protect typedef from redefinition.

View File

@ -18,7 +18,7 @@ int main()
#else #else
char cbuf[512]; char cbuf[512];
wchar_t wcbuf[512], wcbuf2[512]; wchar_t wcbuf[512], wcbuf2[512];
double val = 1E+308; double val = 1E+30;
snprintf(cbuf, 512, "%.*f", 3, val); snprintf(cbuf, 512, "%.*f", 3, val);
swprintf(wcbuf, 512, L"%.*f", 3, val); swprintf(wcbuf, 512, L"%.*f", 3, val);
mbstowcs(wcbuf2, cbuf, 512); mbstowcs(wcbuf2, cbuf, 512);