diff options
author | Guido van Rossum <guido@python.org> | 2002-09-12 14:41:20 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-09-12 14:41:20 (GMT) |
commit | 770acd3f7fff52eef0d0ad02beaa4c569d70811f (patch) | |
tree | 952fcf24aae745a721ba78f80d55ea93bbee07da /setup.py | |
parent | ed44dbd9596f1eb424d5cd0df0669dad6baaa309 (diff) | |
download | cpython-770acd3f7fff52eef0d0ad02beaa4c569d70811f.zip cpython-770acd3f7fff52eef0d0ad02beaa4c569d70811f.tar.gz cpython-770acd3f7fff52eef0d0ad02beaa4c569d70811f.tar.bz2 |
Only build the 'dl' extension when sys.maxint equals 2**31-1.
This module raises "SystemError: module dl requires sizeof(int) ==
sizeof(long) == sizeof(char*)" when compiled on 64-bit platforms.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -732,9 +732,11 @@ class PyBuildExt(build_ext): )) # Dynamic loading module - dl_inc = find_file('dlfcn.h', [], inc_dirs) - if (dl_inc is not None) and (platform not in ['atheos']): - exts.append( Extension('dl', ['dlmodule.c']) ) + if sys.maxint == 0x7fffffff: + # This requires sizeof(int) == sizeof(long) == sizeof(char*) + dl_inc = find_file('dlfcn.h', [], inc_dirs) + if (dl_inc is not None) and (platform not in ['atheos']): + exts.append( Extension('dl', ['dlmodule.c']) ) # Platform-specific libraries if platform == 'linux2': |