define NATIVE_LARGEFILES if system supports 8 byte file pointers

This commit is contained in:
Radim Kolar 2009-08-19 17:53:25 +02:00
parent a09d920269
commit c2576bd59e

View File

@ -82,7 +82,8 @@ for option in Split("""
# Portability build time config # Portability build time config
if conf.CheckFunc('srandomdev'): if conf.CheckFunc('srandomdev'):
conf.env.Append(CPPFLAGS = '-DHAVE_SRANDOMDEV') conf.env.Append(CPPFLAGS = '-DHAVE_SRANDOMDEV')
if conf.CheckFunc('fseeko'): fseeko=conf.CheckFunc('fseeko')
if fseeko:
conf.env.Append(CPPFLAGS = '-DHAVE_FSEEKO') conf.env.Append(CPPFLAGS = '-DHAVE_FSEEKO')
if conf.CheckFunc('random'): if conf.CheckFunc('random'):
conf.env.Append(CPPFLAGS = '-DHAVE_RANDOM') conf.env.Append(CPPFLAGS = '-DHAVE_RANDOM')
@ -109,8 +110,10 @@ env.Append(CPPFLAGS = '-DSIZEOF_LONG='+conf.sizeOf("long"))
env.Append(CPPFLAGS = '-DSIZEOF_SHORT='+conf.sizeOf("short")) env.Append(CPPFLAGS = '-DSIZEOF_SHORT='+conf.sizeOf("short"))
env.Append(CPPFLAGS = '-DSIZEOF_UNSIGNED='+conf.sizeOf("unsigned")) env.Append(CPPFLAGS = '-DSIZEOF_UNSIGNED='+conf.sizeOf("unsigned"))
env.Append(CPPFLAGS = '-DSIZEOF_VOID='+conf.sizeOf("void")) env.Append(CPPFLAGS = '-DSIZEOF_VOID='+conf.sizeOf("void"))
env.Append(CPPFLAGS = '-DSIZEOF_OFF_T='+conf.sizeOf("off_t")) offt=conf.sizeOf("off_t")
env.Append(CPPFLAGS = '-DSIZEOF_OFF_T='+offt)
if fseeko and int(offt)>=8:
conf.env.Append(CPPFLAGS = '-DNATIVE_LARGEFILES')
if not conf.CheckType("union semun", "#include <sys/types.h>\n#include <sys/ipc.h>\n#include <sys/sem.h>",'c'): if not conf.CheckType("union semun", "#include <sys/types.h>\n#include <sys/ipc.h>\n#include <sys/sem.h>",'c'):
conf.env.Append(CPPFLAGS = "-D_SEM_SEMUN_UNDEFINED=1") conf.env.Append(CPPFLAGS = "-D_SEM_SEMUN_UNDEFINED=1")