Commit 770acd3f authored by Guido van Rossum's avatar Guido van Rossum

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.
parent ed44dbd9
......@@ -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':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment