Web lists-archives.org

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




> 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

-------------------------------------------------------------------------
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