From c2576bd59eec39a37fed8708f75fe430fc6f4758 Mon Sep 17 00:00:00 2001 From: Radim Kolar <> Date: Wed, 19 Aug 2009 17:53:25 +0200 Subject: [PATCH] define NATIVE_LARGEFILES if system supports 8 byte file pointers --- SConstruct | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SConstruct b/SConstruct index b71f709..8fbbfb7 100644 --- a/SConstruct +++ b/SConstruct @@ -82,7 +82,8 @@ for option in Split(""" # Portability build time config if conf.CheckFunc('srandomdev'): conf.env.Append(CPPFLAGS = '-DHAVE_SRANDOMDEV') -if conf.CheckFunc('fseeko'): +fseeko=conf.CheckFunc('fseeko') +if fseeko: conf.env.Append(CPPFLAGS = '-DHAVE_FSEEKO') if conf.CheckFunc('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_UNSIGNED='+conf.sizeOf("unsigned")) 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 \n#include \n#include ",'c'): conf.env.Append(CPPFLAGS = "-D_SEM_SEMUN_UNDEFINED=1")