if we cant find size of off_t default to 4

This commit is contained in:
Radim Kolar 2009-09-21 22:57:02 +02:00
parent 1f3e259eee
commit dda183fc0e

View File

@ -17,6 +17,10 @@ def enableLargeFiles(conf):
offt=conf.CheckTypeSize('off_t','#include <stdio.h>') offt=conf.CheckTypeSize('off_t','#include <stdio.h>')
if offt < 8: if offt < 8:
env.Replace(CPPFLAGS=flags) env.Replace(CPPFLAGS=flags)
else:
if offt == 0:
#set default value to 4
offt=4
conf.env.Append(CPPFLAGS = '-DSIZEOF_OFF_T='+str(offt)) conf.env.Append(CPPFLAGS = '-DSIZEOF_OFF_T='+str(offt))
if fseeko and int(offt)>=8: if fseeko and int(offt)>=8:
conf.env.Append(CPPFLAGS = '-DNATIVE_LARGEFILES') conf.env.Append(CPPFLAGS = '-DNATIVE_LARGEFILES')