From: H.Merijn Brand Date: Mon, 27 Feb 2006 13:28:04 +0000 (+0000) Subject: Workaround for initialization errors on HP's pre-compiler X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=95db5f151a6b0c6c891bf771dd9a88a603c6f610;p=p5sagit%2Fp5-mst-13.2.git Workaround for initialization errors on HP's pre-compiler Do not ask me to explain. This re-definition works on AIX and HP-UX. Let's await the smokes. p4raw-id: //depot/perl@27338 --- diff --git a/sv.c b/sv.c index 66b4d8e..e698ddf 100644 --- a/sv.c +++ b/sv.c @@ -875,9 +875,16 @@ struct body_details { limited by PERL_ARENA_SIZE, so we can safely oversize the declarations. */ -#define FIT_ARENA(count, body_size) \ - (!count || count * body_size > PERL_ARENA_SIZE) \ - ? (int)(PERL_ARENA_SIZE / body_size) * body_size : count * body_size +#define FIT_ARENA0(body_size) \ + ((size_t)(PERL_ARENA_SIZE / body_size) * body_size) +#define FIT_ARENAn(count,body_size) \ + ( count * body_size <= PERL_ARENA_SIZE) \ + ? count * body_size \ + : FIT_ARENA0 (body_size) +#define FIT_ARENA(count,body_size) \ + count \ + ? FIT_ARENAn (count, body_size) \ + : FIT_ARENA0 (body_size) /* A macro to work out the offset needed to subtract from a pointer to (say)