in reply to Perl and 64-bit compilers

Hi syphilis,

You've read the documentation for Config, I'm sure:

longsize From intsize.U: This variable contains the value of the LONGSIZE symbol, which indicates to the C program how many bytes there are in a long.

That seems pretty clear to me, especially the "how many bytes there are in a long", which is what you want (sizeof(long)).

Do you have some doubts that that is correct?


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Replies are listed 'Best First'.
Re^2: Perl and 64-bit compilers
by syphilis (Archbishop) on Feb 18, 2007 at 14:12 UTC
    Do you have some doubts that that is correct?

    Well ... the 'perl -V' that I was looking at is for a (Debian/testing) Linux/x86_64 machine. I expected that 'intsize' would also be 8, but it's only 4. That made me wonder about the reliability of what %Config was telling me in this regard.

    Anyway, I gather from the tone of your response, that this info is reliable - which is what I needed to know. Thanks for clearing that up for me.

    (I don't believe there's any reason that an int and a long have to be the same size ... it's just that I didn't expect them to be different ... and that's what raised the doubt in my mind :-)

    Cheers,
    Rob
          "I don't believe there's any reason that an int and a long have to be the same size ... it's just that I didn't expect them to be different"

      I've always heard about "C" (and perhaps you have as well) that "the only thing you can be sure is that a long isn't any smaller than a short.  (Which certainly doesn't narrow things down very much!)

      However, I would have expected the same, that intsize would have been 8.  So I can fully see why you'd have questions regarding the veracity of the documentation for longsize.

      By the way, I didn't mean to mislead you -- I'm not in any way an authority on the Config module.  I did just now look at the source for Config, but as it contained the results of running Configure, the values for the particular architecture were already hardcoded into it.  So I'd be asking the same questions you are.

      Here's a thought:  trying downloading the tarball for Config and installing it manually.  Then you can look at the Configure script that comes with it, and make sure it's simply reporting the appropriate thing from the perspective of the "C" compiler.

      Update:  I just now saw your response (below) to ambrus's suggestion, where you say you don't have direct access to the machine.  So you probably won't be able to inspect the sourcecode. :-(


      s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/