Silverfrost Forums

Welcome to our forums

fseek for 64 bit scc and 64 bit offsets???

9 Oct 2020 10:05 #26456

Some of our Fortran 64 bit applications make use C/C++ function fseek to position the file pointer. function fseek operates on offsets of type long which is of size 4 bytes. Now I would like to position file pointers to offsets which are of size 8 byte, as well, in order to process big files.

I know that Microsoft C++ supports funtion _fseeki64 which operates on offsets of type __int64 (which is of size 8 byte).

The current implementation of scc (for SALFORD fnt95 version 8.63) does not support _fseeki64. What would I have to do in order to call Microsoft's _fseeki64 from Salford's scc?

Would it be possible to support function _fseeki64 in a future release?

Any help/hint is appreciated. Regards, Dietmar

9 Oct 2020 2:55 #26457

Dietmar

fseek for 64 bit SCC is located in salflibc64.dll and calls upon the Microsoft function SetFilePointerEx. This in turn takes a 64 bit offset. So it should be a simple matter to add fseek64 to the SCC library.

12 Oct 2020 6:41 #26461

Dietmar

This function has been added to the library and a new set of DLL is available from http://forums.silverfrost.com/viewtopic.php?p=29221#29221.

The interface for the new function is

(http://forums.silverfrost.com/viewtopic.php?p=29221#29221).

The interface for the new function is

[quote:289b8be9b7]extern 'C' int _fseeki64(FILE *stream, long long int offset, int mode);

12 Oct 2020 3:10 #26464

Thanks Paul,

I will give it a try as soon as possible.

Regards Dietmar

Please login to reply.