mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-02-06 12:14:15 +00:00
wscript: define _FILE_OFFSET_BITS=64 on 32-bit systems if libc (presumably glibc) supports it
This commit is contained in:
parent
0c26c24331
commit
6dbb694fdc
13
wscript
13
wscript
@ -298,6 +298,19 @@ def configure(conf):
|
|||||||
else:
|
else:
|
||||||
conf.undefine('HAVE_TGMATH_H')
|
conf.undefine('HAVE_TGMATH_H')
|
||||||
|
|
||||||
|
# set _FILE_OFFSET_BITS=64 for filesystems with 64-bit inodes
|
||||||
|
if conf.env.DEST_OS != 'win32' and conf.env.DEST_SIZEOF_VOID_P == 4:
|
||||||
|
file_offset_bits_usable = conf.check_cc(fragment='''#define _FILE_OFFSET_BITS 64
|
||||||
|
#include <features.h>
|
||||||
|
#ifndef __USE_FILE_OFFSET64
|
||||||
|
#error
|
||||||
|
#endif
|
||||||
|
int main(void){ return 0; }''',
|
||||||
|
msg='Checking if _FILE_OFFSET_BITS can be defined to 64', mandatory=False)
|
||||||
|
if file_offset_bits_usable:
|
||||||
|
conf.define('_FILE_OFFSET_BITS', 64)
|
||||||
|
else: conf.undefine('_FILE_OFFSET_BITS')
|
||||||
|
|
||||||
# check if we can use alloca.h or malloc.h
|
# check if we can use alloca.h or malloc.h
|
||||||
if conf.check_cc(header_name='alloca.h', mandatory=False):
|
if conf.check_cc(header_name='alloca.h', mandatory=False):
|
||||||
conf.define('ALLOCA_H', 'alloca.h')
|
conf.define('ALLOCA_H', 'alloca.h')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user