FAQ
Hi Gerald.

I ran into a problem when trying to compile Embperl 1.3.6 on a system
that was 32 bit, but had Perl compiled with the use64bitint flag.
I also found the solution and thought I should share this. It may also
affect Embperl 2.

During make I got a lot of the following errors:

warning: cast to pointer from integer of different size

Most of them are harmless, but at least one of them caused a real problem.
The one causing the problem is triggered by the following line (line 922)
in epcmd.c:

sprintf (sSubCode, " HTML::Embperl::ProcessSub (%ld, %d, %d)", (IV)r
-> Buf.pFile, nSubPos, r -> Buf.nBlockNo) ;

I found the problem occurs by (r -> Buf.pFile) being cast into an (IV)
which sprintf apparently
prints in a wrong way so that as a consequence [$ sub $] no longer works.

Here is my fix. instead of casting it into IV, I used an I32 changing
the line to:

sprintf (sSubCode, " HTML::Embperl::ProcessSub (%ld, %d, %d)", (I32)r
-> Buf.pFile, nSubPos, r -> Buf.nBlockNo) ;

This fixed it.

Hope this is useful info.

Best,
Marcus



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupembperl @
categoriesmodperl, perl
postedNov 14, '06 at 10:50p
activeNov 14, '06 at 10:50p
posts1
users1
websiteperl.apache.org

1 user in discussion

Marcus Doemling: 1 post

People

Translate

site design / logo © 2022 Grokbase