Bug#190887: the "sizeof" hash is missing

Celelibi celelibi at gmail.com
Sat Nov 10 15:58:34 UTC 2012


Hi,

Almost 10 years later this bug still exists and still bother a few
people every once in a while... Including me these last days. :)
If perl developers arn't willing to patch h2ph to generate a %sizeof
hash, I think debian could (at least) patch the .ph files it
distributes.

Moreover, a portable way to define %sizeof for simple types could be
something like:

our %sizeof = (
	'int' => length(pack("i!", 0)),
	'unsigned int' => length(pack("I!", 0))
);

However, I don't see any automatic way to determine the size of
structures like 'struct termios', which is used by a few ioctl.




More information about the Perl-maintainers mailing list