Large file support

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Large file support

Mark Morgan Lloyd-5
Could I have a reality check please: is there no fpLSeek64() for files
larger than 2Gb?

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Large file support

Marco van de Voort
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 ?
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Large file support

Mark Morgan Lloyd-5
On 02/06/17 10:00, Marco van de Voort wrote:
> 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 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

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Large file support

Marco van de Voort
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.






_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Large file support

Marco van de Voort
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)

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Large file support

Mark Morgan Lloyd-5
In reply to this post by Marco van de Voort
On 02/06/17 11:00, Marco van de Voort wrote:
> 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 whenthe debian oldstable still defined 32-bit as seek (even though even somewhatrelevant 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 $ELSEbranch I don't know. I grepped, and it didn't seem to find anything in fpdocor (doc/rtl) makefiles defining it.

Thanks, I'll code defensively.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Large file support

Mattias Gaertner
In reply to this post by Marco van de Voort
On Fri, 2 Jun 2017 12:50:57 +0200 (CEST)
[hidden email] (Marco van de Voort) wrote:

>[...]
> {$if not defined(fs32bit)}
>     off_t    = cint64;          { used for file sizes          }
> {$else}
>     off_t    = cint;
> {$endif}
>[...]
> 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.

Is this with the 3.1.1 fpdoc?

Mattias
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Large file support

Marco van de Voort
In our previous episode, Mattias Gaertner said:

> [hidden email] (Marco van de Voort) wrote:
>
> >[...]
> > {$if not defined(fs32bit)}
> >     off_t    = cint64;          { used for file sizes          }
> > {$else}
> >     off_t    = cint;
> > {$endif}
> >[...]
> > 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.
>
> Is this with the 3.1.1 fpdoc?

Afaik Michael always works with trunk fpdoc, but of course the 3.0.2 docs
were generated in march.


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Large file support

Mattias Gaertner
On Sat, 3 Jun 2017 01:02:35 +0200 (CEST)
[hidden email] (Marco van de Voort) wrote:

> In our previous episode, Mattias Gaertner said:
> > [hidden email] (Marco van de Voort) wrote:
> >  
> > >[...]
> > > {$if not defined(fs32bit)}
> > >     off_t    = cint64;          { used for file sizes          }
> > > {$else}
> > >     off_t    = cint;
> > > {$endif}
> > >[...]
> > > 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.  
> >
> > Is this with the 3.1.1 fpdoc?  
>
> Afaik Michael always works with trunk fpdoc, but of course the 3.0.2 docs
> were generated in march.

The $if support was added recently to pscanner.

Mattias
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Large file support

Marco van de Voort
In our previous episode, Mattias Gaertner said:
> >
> > Afaik Michael always works with trunk fpdoc, but of course the 3.0.2 docs
> > were generated in march.
>
> The $if support was added recently to pscanner.

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.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Loading...