There are many ways to look at the size of integers :)

If you *also* want to support 64bit ints on a 32bit conf, you could consider if Math::BigInt could help

You did not state if your realm is pure-perl or also XS. If you know how to work around your problem in XS, you could pass the big ints as string and work from there.

In the pure-perl world, an "integer" is an IV (Integer Value). Its size in bytes is shown in $Config{ivsize}. Internally an IV does not need to be mapped to an int, but it might be a long or even long long.

$ perl -V:.*64bit.* use64bitall='define'; use64bitint='define'; $ perl -V:.*size.* charsize='1'; d_chsize='undef'; d_malloc_good_size='undef'; d_malloc_size='undef'; doublesize='8'; fpossize='16'; gidsize='4'; i16size='2'; i32size='4'; i64size='8'; i8size='1'; intsize='4'; ivsize='8'; longdblsize='16'; longlongsize='8'; longsize='8'; lseeksize='8'; nvsize='16'; ptrsize='8'; shortsize='2'; sig_size='68'; sizesize='8'; sizetype='size_t'; socksizetype='socklen_t'; ssizetype='ssize_t'; st_ino_size='8'; u16size='2'; u32size='4'; u64size='8'; u8size='1'; uidsize='4'; uvsize='8';

Enjoy, Have FUN! H.Merijn

In reply to Re: Best way to check for 64-bit support by Tux
in thread Best way to check for 64-bit support by gflohr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.