[flashrom] large file support

Pádraig Brady P at draigBrady.com
Mon Oct 4 14:44:18 CEST 2010


On 04/10/10 13:30, Carl-Daniel Hailfinger wrote:
> On 04.10.2010 14:20, Carl-Daniel Hailfinger wrote:
>> I noticed that chipset_enable.c has #define _LARGEFILE64_SOURCE but it
>> does not perform any open/seek, whereas other files (especially
>> physmap.c) have no indication of large file support, yet they do use
>> open/seek.
>> Looking at the code history this seems to be an accident.
>>
>> What's the correct way to get large file support, and do we need it at all?
>> Image files will probably stay smaller than 16 MB, so I see no real
>> problems there, but MSR support and physmap support may need this.
>>   
> 
> Segher said the following compiler flags work for him:
> -DLARGE_FILES -D_FILE_OFFSET_BITS=64

-D_FILE_OFFSET_BITS=64 is all you should need.
_LARGEFILE_SOURCE should only be needed when using fseeko
on glibc-2.2, or when you explicitly use open64() etc.

For maximum portability see AC_SYS_LARGEFILE from autoconf

cheers,
Pádraig.




More information about the flashrom mailing list