Skip Menu |

This queue is for tickets about the Perl-Dist-Strawberry CPAN distribution.

Report information
The Basics
Id: 116768
Status: open
Priority: 0/
Queue: Perl-Dist-Strawberry

People
Owner: Nobody in particular
Requestors: mira.vancl [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Problem with size of pack('L!',0) on x86-64 windows
Date: Sun, 7 Aug 2016 11:58:50 +0200
To: bug-Perl-Dist-Strawberry [...] rt.cpan.org
From: Miroslav Vancl <mira.vancl [...] gmail.com>
Hi, I have doubt about result of *length(pack('L!',0)) is 4 and not 8* as I assumed on my Windows 8 running on 64-bit cpu. I tested the same pack template on http://www.tutorialspoint.com/execute_perl_online.php and result is 8 there as I assume. I have new instalation of Perl distro strawberry-perl-5.24.0.1-64bit.msi Summary of my perl5 (revision 5 version 24 subversion 0) configuration: Platform: osname=MSWin32, osvers=6.3, archname=MSWin32-x64-multi-thread uname='Win32 strawberry-perl 5.24.0.1 #1 Tue May 10 21:30:49 2016 x64' ... Sincerely Mira
Subject: Re: [rt.cpan.org #116768] Problem with size of pack('L!',0) on x86-64 windows
Date: Sun, 7 Aug 2016 18:46:58 +0200
To: bug-Perl-Dist-Strawberry [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
It is correct behaviour as "unsigned long" is 4 bytes on 64bit MS Windows and "L" means exactly "An unsigned long value" see http://perldoc.perl.org/functions/pack.html Using "L" with pack/unpack is platform dependent, consider using some of the platform independent options: q A signed quad (64-bit) value. Q An unsigned quad (64-bit) value. n An unsigned short (16-bit) in "network" (big-endian) order. N An unsigned long (32-bit) in "network" (big-endian) order. v An unsigned short (16-bit) in "VAX" (little-endian) order. V An unsigned long (32-bit) in "VAX" (little-endian) order. -- kmx