Could I have a reality check please: is there no fpLSeek64() for files larger than 2Gb?
Mailing lists / fpc-pascal / 2017-06
Large file support
10 messages · 3 people · –
- MMarco van de Voort 5
- MMark Morgan Lloyd 3
- MMattias Gaertner 2
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
In our previous episode, Mark Morgan Lloyd said:
Could I have a reality check please: is there no fpLSeek64() for files larger than 2Gb?
Afaik, there is no such posix calls. In the past, most linux temporarily had some -64 calls while it left the main calls 32-bit to make transition smoother, but nowadays it is all 64-bit?
What does writeln(sizeof(off_t)); print ?
Marco van de Voort wroteIn our previous episode, Mark Morgan Lloyd said:> Could I have a reality check please: is there no fpLSeek64() for files > larger than 2Gb? Afaik, there is no such posix calls. In the past, most linux temporarily hadsome -64 calls while it left the main calls 32-bit to make transitionsmoother, but nowadays it is all 64-bit? What does writeln(sizeof(off_t)); print ?
8 apparently, but off_t is documented as a cint32.
https://www.freepascal.org/docs-html/current/rtl/unixtype/off_t.html
In our previous episode, Mark Morgan Lloyd said:
8 apparently, but off_t is documented as a cint32. https://www.freepascal.org/docs-html/current/rtl/unixtype/off_t.html
The declaration is
{$if not defined(fs32bit)}
off_t = cint64; { used for file sizes }
{$else}
off_t = cint;
{$endif}The 64bit is active, IIRC the 32-bit is for use with FPC_USE_LIBC for when the debian oldstable still defined 32-bit as seek (even though even somewhat relevant distros already defined 64-bit).
FPC_USE_LIBC for linux and *bsd still is still hardly used afaik.
Maybe we could clean it out. Why the documentation tool picks the $ELSE branch I don't know. I grepped, and it didn't seem to find anything in fpdoc or (doc/rtl) makefiles defining it.
In our previous episode, Marco van de Voort said:
FPC_USE_LIBC for linux and *bsd still is still hardly used afaik. Maybe we could clean it out.
These sentences came close together while composing the message, so to be clear: I didn't mean cleaning out FPC_USE_LIBC, only the fs32bit define(with only two occurances)
In our previous episode, Mark Morgan Lloyd said: The declaration is {$if not…
Marco van de Voort wrote 6 lines
Thanks, I'll code defensively.
In our previous episode, Mark Morgan Lloyd said: The declaration is {$if not…
Show quoted text 10 lines
Is this with the 3.1.1 fpdoc?
Mattias
In our previous episode, Mattias Gaertner said:
Show quoted text 14 lines
Afaik Michael always works with trunk fpdoc, but of course the 3.0.2 docs were generated in march.
Show quoted text 18 lines
The $if support was added recently to pscanner.
Mattias
In our previous episode, Mattias Gaertner said:
Show quoted text 5 lines
Ah ok, so it was $if vs $ifdef? Anyway, for now I added fs32bit deprecation to major version to do (where I keep track of the various deprecations to remove for a new branch).
If somebody uses this define, or what it might still be needed for, please drop me a mail.
