From: Jarkko Hietaniemi Date: Wed, 1 Sep 1999 07:59:42 +0000 (+0000) Subject: IV_DIG and NV_DIG fixes. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cae7ae48e050609458f3c1c696ab9cdd0ae2b3fd;p=p5sagit%2Fp5-mst-13.2.git IV_DIG and NV_DIG fixes. p4raw-id: //depot/cfgperl@4060 --- diff --git a/perl.h b/perl.h index 5d84aec..17c4f2c 100644 --- a/perl.h +++ b/perl.h @@ -1003,6 +1003,9 @@ Free_t Perl_mfree (Malloc_t where); # define IV_MAX INT64_MAX # define IV_MIN INT64_MIN # define UV_MAX UINT64_MAX +# ifndef UINT64_MIN +# define UINT64_MIN 0 +# endif # define UV_MIN UINT64_MIN # else # define IV_MAX PERL_QUAD_MAX @@ -1021,6 +1024,9 @@ Free_t Perl_mfree (Malloc_t where); # define IV_MAX INT32_MAX # define IV_MIN INT32_MIN # define UV_MAX UINT32_MAX +# ifndef UINT32_MIN +# define UINT32_MIN 0 +# endif # define UV_MIN UINT32_MIN # else # define IV_MAX PERL_LONG_MAX @@ -1038,8 +1044,8 @@ Free_t Perl_mfree (Malloc_t where); # define UVSIZE LONGSIZE # define IVSIZE LONGSIZE #endif -#define IV_DIG (BIT_DIGITS(IVSIZE * 8) + 1) -#define UV_DIG (BIT_DIGITS(IVSIZE * 8) + 1) +#define IV_DIG (BIT_DIGITS(IVSIZE * 8)) +#define UV_DIG (BIT_DIGITS(IVSIZE * 8)) #ifdef USE_LONG_DOUBLE # if defined(HAS_LONG_DOUBLE) && (LONG_DOUBLESIZE > DOUBLESIZE) @@ -1881,10 +1887,10 @@ typedef I32 CHECKPOINT; #define IV_FITS_IN_NV /* Doubt. */ #if defined(USE_LONG_DOUBLE) && \ - defined(LDBL_MANT_DIG) && IVSIZE*8 >= LDBL_MANT_DIG + defined(LDBL_MANT_DIG) && IV_DIG >= LDBL_MANT_DIG # undef IV_FITS_IN_NV #else -# if defined(DBL_MANT_DIG) && IVSIZE*8 >= DBL_MANT_DIG +# if defined(DBL_MANT_DIG) && IV_DIG >= DBL_MANT_DIG # undef IV_FITS_IN_NV # else # if IV_DIG >= NV_DIG