From: Perl 5 Porters Date: Thu, 5 Sep 1996 00:42:36 +0000 (+0000) Subject: Make floating point constants Locale-friendly. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e26662637c45889189c5615da8cc3e3f7167c162;p=p5sagit%2Fp5-mst-13.2.git Make floating point constants Locale-friendly. --- diff --git a/perl.c b/perl.c index f1d4aa2..38c4f07 100644 --- a/perl.c +++ b/perl.c @@ -121,10 +121,12 @@ register PerlInterpreter *sv_interp; init_ids(); #if defined(SUBVERSION) && SUBVERSION > 0 - sprintf(patchlevel, "%7.5f", 5.0 + (PATCHLEVEL / 1000.0) - + (SUBVERSION / 100000.0)); + sprintf(patchlevel, "%7.5f", (double) 5 + + ((double) PATCHLEVEL / (double) 1000) + + ((double) SUBVERSION / (double) 100000)); #else - sprintf(patchlevel, "%5.3f", 5.0 + (PATCHLEVEL / 1000.0)); + sprintf(patchlevel, "%5.3f", (double) 5 + + ((double) PATCHLEVEL / (double) 1000)); #endif #if defined(LOCAL_PATCH_COUNT)