develooper Front page | perl.perl5.porters | Postings from January 2004

patch to perl 5.8.3 RC1 for Stratus VOS

Thread Next
From:
Green, Paul
Date:
January 14, 2004 14:34
Subject:
patch to perl 5.8.3 RC1 for Stratus VOS
Message ID:
A2A34F15EE916148BC4C4748223E67A4069FBAFC@exna4.stratus.com
Enclosed are the patches to get perl-5.8.3 RC1 to build on Stratus VOS.
Most (tho not all) of the changes are to VOS-only files held in the vos
subdir.

These patches have been tested against perl-5.8.3 RC1, and should applpy
cleanly to it.  Once done, we pass all but 3 tests.

** Important ** I will submit a separate patch for bleadperl.  Some of these
files (in the vos subdir) no longer exist in bleadperl.

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 */

 <<perl.diff>> 

Thanks
PG
--
Paul Green, Senior Technical Consultant, Stratus Technologies.
Voice: +1 978-461-7557; FAX: +1 978-461-3610; Video on request.


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About