diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-09-05 00:42:36 +0000 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1996-09-05 00:42:36 +0000 |
commit | e26662637c45889189c5615da8cc3e3f7167c162 (patch) | |
tree | 85be9c48a70bca2335bed8c6573166d3a53f90ff /perl.c | |
parent | 58e0a6aef843ff1011481f826c2a83b86bc9e67a (diff) | |
download | perl-e26662637c45889189c5615da8cc3e3f7167c162.tar.gz |
Make floating point constants Locale-friendly.
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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) |