Front page | perl.perl5.porters |
Postings from January 2004
Refactor VOS patches for bleadperl and perl-5.8.x
Thread Next
From:
Green, Paul
Date:
January 15, 2004 13:01
Subject:
Refactor VOS patches for bleadperl and perl-5.8.x
Message ID:
A2A34F15EE916148BC4C4748223E67A4069FBB15@exna4.stratus.com
I have refactored my patches for perl into 3 groups, as follows:
vos.perl-common.diff -- these should be applied to both bleadperl and
perl-5.8.x.
vos.perl-blead.diff -- these should be applied just to bleadperl.
vos.perl-58x.diff -- these should be applied just to 5.8.x.
The reason for doing it this way is that I removed the old vos-specific
build method in bleadperl, but I am still supporting it in perl-5.8.x. This
means the set of vos-specific files differs between the two releases, so it
seems best to supply separate patch files. For the same reason, the
README.vos file differs as well.
I used rsync to get fresh copies of perl-5.8.x and bleadperl, and ensured
that all 3 sets of patches apply as appropriate. The "common" patches will
apply to both versions, but will show a fuzz factor when applied to 5.8.x.
This is ok.
Except for small changes to hv.c and pp_pack.c, all other changes are to
VOS-specific files.
1. I changed hv.c to add the "static" attribute to two internal functions
that were missing them.
2. I changed pp_pack.c so that a rather complex declaration would fall
within strict ANSI C rules:
There is one interesting change here to pp_pack.c. It turns out
that the following declaration, found on lines 2434 and 2436 of pp_pack.c
is, AFICT, not valid ANSI C, according to either of the current standards
(1989 and 1999). Paragraph 6.4 requires that a floating-point constant in
an integral constant expression be the immediate operand of a cast to
convert it to an integer. The GNU C compiler is being "nice" here to extend
the language, but the VOS Standard C compiler stays within the letter of the
standard. Therefore, I've made made the code standards-compliant. For
simplicity, the buffer is slightly larger in my version; I don't see that
this is a real issue. We could, I suppose, not even try to shorten the
buffer, but I tried to stay within the general solution of the old code.
char buf1 [1 + (int)((NV_MAX_10_EXP + 1) * 0.47456)]; /* old way,
invalid C */
char buf1 [1 + (int)((NV_MAX_10_EXP + 1) / 2)]; /* new way, valid
C */
<<vos.tar.gz>>
Thanks
PG
--
Paul Green, Senior Technical Consultant, Stratus Technologies.
Voice: +1 978-461-7557; FAX: +1 978-461-3610; Video on request.
Thread Next
-
Refactor VOS patches for bleadperl and perl-5.8.x
by Green, Paul