summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-08-16 18:55:35 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-08-16 18:55:35 +0000
commit2d4389e49f01a9fd18e4d854b4d31048551328b6 (patch)
treeb9836aabebca08c331ad5fff785cd7e93a51862c /sv.c
parentd31e93ed51afbd7df0a0db125e55929ae1cf7552 (diff)
downloadperl-2d4389e49f01a9fd18e4d854b4d31048551328b6.tar.gz
Batch of small 64-bit/long double/large file support tweaks:
- scan for LDBL_DIG - from DBL_DIG and LDBL_DIG select NV_DIG - introduce IVSIZE, UVSIZE, NVSIZE - introduce IV_DIG - remove stdio64 - AIX uses `oslevel` when others use `uname -r` - already AIX 4.2 goes 64-bit - in HP-UX require the 64-bit libc, just the directory isn't enough - group ids are not NVs - #undef USE_LONG_DOUBLE if long double is no better than double - introduce NV_WITHIN_*() and IV_FITS_IN_IV - mention large file support in perldelta - introduce quad TOPpin' and POPpin' - the svcat... buffer was tiny for printing quads in %b - fix the multiplication test in 64bit.t - try to make VMS to comply with all this removal and "introducal" of symbols p4raw-id: //depot/cfgperl@3995
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c30
1 files changed, 5 insertions, 25 deletions
diff --git a/sv.c b/sv.c
index 520a3b69ab..6524446711 100644
--- a/sv.c
+++ b/sv.c
@@ -15,28 +15,6 @@
#define PERL_IN_SV_C
#include "perl.h"
-#ifdef OVR_DBL_DIG
-/* Use an overridden DBL_DIG */
-# ifdef DBL_DIG
-# undef DBL_DIG
-# endif
-# define DBL_DIG OVR_DBL_DIG
-#else
-/* The following is all to get DBL_DIG, in order to pick a nice
- default value for printing floating point numbers in Gconvert.
- (see config.h)
-*/
-#ifdef I_LIMITS
-#include <limits.h>
-#endif
-#ifdef I_FLOAT
-#include <float.h>
-#endif
-#ifndef HAS_DBL_DIG
-#define DBL_DIG 15 /* A guess that works lots of places */
-#endif
-#endif
-
#ifdef PERL_OBJECT
#define VTBL this->*vtbl
#else /* !PERL_OBJECT */
@@ -1711,7 +1689,7 @@ Perl_sv_2pv(pTHX_ register SV *sv, STRLEN *lp)
goto tokensave;
}
if (SvNOKp(sv)) {
- Gconvert(SvNVX(sv), DBL_DIG, 0, tmpbuf);
+ Gconvert(SvNVX(sv), NV_DIG, 0, tmpbuf);
tsv = Nullsv;
goto tokensave;
}
@@ -1835,7 +1813,7 @@ Perl_sv_2pv(pTHX_ register SV *sv, STRLEN *lp)
else
#endif /*apollo*/
{
- Gconvert(SvNVX(sv), DBL_DIG, 0, s);
+ Gconvert(SvNVX(sv), NV_DIG, 0, s);
}
errno = olderrno;
#ifdef FIXNEGATIVEZERO
@@ -4731,7 +4709,9 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
char *eptr = Nullch;
STRLEN elen = 0;
- char ebuf[TYPE_DIGITS(int) * 2 + 16]; /* large enough for "%#.#f" */
+ char ebuf[TYPE_DIGITS(IV) * 2 + 16];
+ /* large enough for "%#.#f" --chip */
+ /* what about long double NVs? --jhi */
char c;
int i;
unsigned base;