From 427181846486e3aa5034a647dc1922377185f4c0 Mon Sep 17 00:00:00 2001 From: Robin Barker Date: Tue, 7 Sep 1999 13:30:18 +0100 Subject: Fix pointer casts. To: perl5-porters@perl.org Subject: [ID 19990907.004] [PATCH perl5.005_61] compiler warnings with -Duse64bits Message-Id: <199909071130.MAA11435@tempest.npl.co.uk> p4raw-id: //depot/cfgperl@4100 --- perl.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'perl.h') diff --git a/perl.h b/perl.h index 64b349ad27..8d0a7bdaf9 100644 --- a/perl.h +++ b/perl.h @@ -1044,8 +1044,20 @@ Free_t Perl_mfree (Malloc_t where); # define IVSIZE LONGSIZE #endif #define IV_DIG (BIT_DIGITS(IVSIZE * 8)) -#define UV_DIG (BIT_DIGITS(IVSIZE * 8)) +#define UV_DIG (BIT_DIGITS(UVSIZE * 8)) +#if (IVSIZE > PTRSIZE) || (UVSIZE > PTRSIZE) +# if PTRSIZE == LONGSIZE +# define PTRV unsigned long +# else +# define PTRV unsigned +# endif +# define PTR_CAST (PTRV) +#else +# define PTRV UV +# define PTR_CAST +#endif + #ifdef USE_LONG_DOUBLE # if defined(HAS_LONG_DOUBLE) && (LONG_DOUBLESIZE > DOUBLESIZE) # define LDoub_t long double -- cgit v1.2.1