diff options
-rw-r--r-- | numpy/core/setup.py | 9 | ||||
-rw-r--r-- | numpy/random/setup.py | 5 |
2 files changed, 10 insertions, 4 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py index 07c8478cd..24325437a 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -611,9 +611,12 @@ def configuration(parent_package='',top_path=None): config.add_include_dirs(join('src', 'npysort')) config.add_define_macros([("HAVE_NPY_CONFIG_H", "1")]) - config.add_define_macros([("_FILE_OFFSET_BITS", "64")]) - config.add_define_macros([('_LARGEFILE_SOURCE', '1')]) - config.add_define_macros([('_LARGEFILE64_SOURCE', '1')]) + if sys.platform[:3] == "aix": + config.add_define_macros([("_LARGE_FILES", None)]) + else: + config.add_define_macros([("_FILE_OFFSET_BITS", "64")]) + config.add_define_macros([('_LARGEFILE_SOURCE', '1')]) + config.add_define_macros([('_LARGEFILE64_SOURCE', '1')]) config.numpy_include_dirs.extend(config.paths('include')) diff --git a/numpy/random/setup.py b/numpy/random/setup.py index 9d905900c..88274bdef 100644 --- a/numpy/random/setup.py +++ b/numpy/random/setup.py @@ -31,7 +31,10 @@ def configuration(parent_package='',top_path=None): # enable unix large file support on 32 bit systems # (64 bit off_t, lseek -> lseek64 etc.) - defs = [('_FILE_OFFSET_BITS', '64'), + if sys.platform[:3] == "aix": + defs = [('_LARGE_FILES', None)] + else: + defs = [('_FILE_OFFSET_BITS', '64'), ('_LARGEFILE_SOURCE', '1'), ('_LARGEFILE64_SOURCE', '1')] if needs_mingw_ftime_workaround(): |