Web lists-archives.org

Re: [Mingw-users] MINGW I/O support for file sizes > 2GB (LFS support)




Hi,

Thanks for the information for supporting LARGEFILE I/O via lseeki64() 
and telli64() and the
_stati64 functions.

I have still the following questions:

1. Do fread and fwrite support reading or writing past the 2 GB
limit, or reading and writing data arrays > 2 GB in size. How do you 
read or write past
the 2 GB limit? Is it sufficient to lseeki64 to the right spot and then use
fread or fwrite or do you need some other function?

2. Why are there underscore _ characters often in the names of 
functions, are the underscores handled in some special way?

Thanks,
Charles

Tor Lillqvist wrote:
>> I have attempted to compile my program with the following
>> definitions for the compile:
>>     
>
>   
>> -DLARGEFILES -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
>>     
>
> Try grepping for those identifiers in the MinGW headers. You won't
> find them. You shouldn't assume that the conventions used in the
> headers of one C library and compiler (glibc and gcc on Linux,
> presumably) have any meaning in the headers for another C library and
> compiler (the Microsoft C library/ies and gcc in MinGW's case). MinGW
> is not some kind of "Linux emulator".
>
> If you look in the <io.h> header you will find declarations of
> functions _lseeki64() and _telli64() that take 64-bit file positions.
> In <sys/stat.h> you will find the struct _stati64 and functions
> _fstati64() and _stati64() that return file size as a 64-bit number.
>
> --tml
>
>
>   

-- 
Dr. Charles L. Werner
Gamma Remote Sensing AG
Worbstr. 225
CH-3073 Gümligen, Switzerland

Tel: +41 31 951 70 05
FAX: +41 31 951 70 08
http://www.gamma-rs.ch



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users