[Mesa-dev] [PATCH] configure.ac: Add AC_SYS_LARGEFILE

Emil Velikov emil.l.velikov at gmail.com
Thu Sep 4 03:28:04 PDT 2014


On 03/09/14 04:38, Michel Dänzer wrote:
> On 03.09.2014 06:50, Emil Velikov wrote:
>> On 02/09/14 08:17, Michel Dänzer wrote:
>>>
>>> diff --git a/src/gallium/auxiliary/os/os_mman.h
>>> b/src/gallium/auxiliary/os/os_mman.h
>>> index b48eb053..19478d2 100644
>>> --- a/src/gallium/auxiliary/os/os_mman.h
>>> +++ b/src/gallium/auxiliary/os/os_mman.h
>>> @@ -40,9 +40,6 @@
>>>   #include "pipe/p_compiler.h"
>>>
>>>   #if defined(PIPE_OS_UNIX)
>>> -#  ifndef _FILE_OFFSET_BITS
>>> -#    error _FILE_OFFSET_BITS must be defined to 64
>>> -#  endif
>> Can you leave the above hunk, afaics it serves as a safeguard which is always
>> a nice thing to have :)
> 
> AC_SYS_LARGEFILE doesn't define _FILE_OFFSET_BITS on 64-bit, because it's not
> necessary there for large file support. That's why I converted the configure
> script check generated by AC_SYS_LARGEFILE to the STATIC_ASSERT below instead.
> I just double-checked that the STATIC_ASSERT fails on 32-bit without
> AC_SYS_LARGEFILE but passes with it.
> 
You're absolutely correct. I was under the naive impression that it will be
available (for compat reasons) on 64bit systems.

v2 of the patch looks good imho.

Thanks
Emil


More information about the mesa-dev mailing list