Fixed the printing issue of a long double value in MINGW32.

- The long double type in MINGW32 is 12 bytes while the double type is 8 bytes.
 - The compiled binary is linked against the Microsoft library.
 - In that library, both the long double and the double type are 8 bytes.
 - The code has been changed to use the double type if __MINGW32__ is defined.
This commit is contained in:
hyung-hwan 2008-12-10 03:55:51 +00:00
parent 4339b7cf8c
commit 54855b9730

View File

@ -1,5 +1,5 @@
/*
* $Id: print.c 337 2008-08-20 09:17:25Z baconevi $
* $Id: print.c 467 2008-12-09 09:55:51Z baconevi $
*
* {License}
*/
@ -73,7 +73,13 @@ static int __print (ase_lsp_t* lsp, const ase_lsp_obj_t* obj, ase_bool_t prt_con
lsp->prmfns.misc.sprintf (
lsp->prmfns.misc.data,
buf, ASE_COUNTOF(buf),
ASE_T("%Lf"), (long double)ASE_LSP_RVAL(obj));
ASE_T("%Lf"),
#ifdef __MINGW32__
(double)ASE_LSP_RVAL(obj)
#else
(long double)ASE_LSP_RVAL(obj)
#endif
);
OUTPUT_STR (lsp, buf);
break;