Bail early and avoid warnings on 32 bit Perl builds #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In 03d0996 the U64 class was removed
and zipdetails was made 64 bit only. This causes warnings and test
failures (t/porting/utils.t) on i386 builds of perl core when
IO-Compress 2.105 was merged.
Perl/perl5#19618
# Failed test 83 - utils/zipdetails compiles at porting/utils.t line 85
# got "Integer overflow in hexadecimal number at utils/zipdetails line 1432.
Integer overflow in hexadecimal number at utils/zipdetails line 2247.
Integer overflow in hexadecimal number at utils/zipdetails line 2248.
Integer overflow in hexadecimal number at utils/zipdetails line 2249.
Integer overflow in hexadecimal number at utils/zipdetails line 2250.
Integer overflow in hexadecimal number at utils/zipdetails line 2251.
Integer overflow in hexadecimal number at utils/zipdetails line 2252.
Integer overflow in hexadecimal number at utils/zipdetails line 2253.
Integer overflow in hexadecimal number at utils/zipdetails line 2254.
utils/zipdetails syntax OK
"
# expected "utils/zipdetails syntax OK
"
t/porting/utils .................................................. FAILED at test 83
The code also makes use of unpack "Q" so it wouldn't work on 32 bit
builds anyway.
This patch adds a check very early in the script to see if the perl supports
pack "Q", and it does not, indicating it is a 32 bit perl, then it bails out.
If the script is run under -c it bails out without a message, and otherwise
it prints out a message, and exits with error code 1.
This alone does not make it pass t/porting/utils.t in Perl core, we need
a corresponding patch to t/porting/utils.t which I will also push.
See Perl/perl5#19618 for the corresponding patch.