Thanks halley++.

That confirms my conclusions drawn from the limited discussion I could find on the matter at MSDN.

The problem I still have is that AS 802 is built for 32-bit integers but supports huge files...

perl58 -V --- snip --- hint=recommended, useposix=true, d_sigaction=undef usethreads=undef use5005threads=undef useithreads=define usemultiplici +ty=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef ---snip---

As you can see, use64bitint and use64bitall are turned off, but uselargefiles is turned on. I can conform that 802 does handle files up to 10 GB.

The question comes, how? Given 32-bit "ambient integers", and no discernable other mechanism for indicating that fpos_t should be a 64-bit value, how does the compiler decide to switch to using a 64-bit fpos_t with fgtpos and fsetpos?

I guess it is possible that perl never uses fgetpos() and fsetpos() to satisfy calls to tell(), seek(), and stat(), and so the problem doesn't arise? I have to say though that from what I can make out from the sources, this is not the case. However, I'm not a compiler and trying to keep track of all the conditional compilation through myriad header files and source files is a job best left to a compiler:)

I guess it could be that fgetpos() and fsetpos() only ever get used by perl for its own file handling and not when doing IO on behalf of the user programs. This could mean that if I tried to run a perl script of > 4GB it might not be able to find the __DATA__ section.

Big deal:) I guess we'll cross that bridge when someone reports a problem with their 4 GB script. I just hope they remember to use <readmore> tags :)


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
If I understand your problem, I can solve it! Of course, the same can be said for you.


In reply to Re: Re: Perl / Win32 / VC++ / USE_LARGE_FILES by BrowserUk
in thread Perl / Win32 / VC++ / USE_LARGE_FILES by BrowserUk

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.