mirror of https://github.com/python/cpython.git
issue 4483 - dbm build failures on systems with gdbm_compat lib.
This commit is contained in:
parent
f5d5a66349
commit
45313fe6e0
|
@ -65,6 +65,9 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #4483: _dbm module now builds on systems with gdbm & gdbm_compat
|
||||||
|
libs.
|
||||||
|
|
||||||
- Issue #4529: fix the parser module's validation of try-except-finally
|
- Issue #4529: fix the parser module's validation of try-except-finally
|
||||||
statements.
|
statements.
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,9 @@ static char *which_dbm = "GNU gdbm"; /* EMX port of GDBM */
|
||||||
#elif defined(HAVE_GDBM_NDBM_H)
|
#elif defined(HAVE_GDBM_NDBM_H)
|
||||||
#include <gdbm/ndbm.h>
|
#include <gdbm/ndbm.h>
|
||||||
static char *which_dbm = "GNU gdbm";
|
static char *which_dbm = "GNU gdbm";
|
||||||
|
#elif defined(HAVE_GDBM_DASH_NDBM_H)
|
||||||
|
#include <gdbm-ndbm.h>
|
||||||
|
static char *which_dbm = "GNU gdbm";
|
||||||
#elif defined(HAVE_BERKDB_H)
|
#elif defined(HAVE_BERKDB_H)
|
||||||
#include <db.h>
|
#include <db.h>
|
||||||
static char *which_dbm = "Berkeley DB";
|
static char *which_dbm = "Berkeley DB";
|
||||||
|
|
16
setup.py
16
setup.py
|
@ -1019,8 +1019,20 @@ class db_found(Exception): pass
|
||||||
exts.append( Extension('dbm', ['dbmmodule.c'],
|
exts.append( Extension('dbm', ['dbmmodule.c'],
|
||||||
define_macros=[('HAVE_NDBM_H',None)],
|
define_macros=[('HAVE_NDBM_H',None)],
|
||||||
libraries = ndbm_libs ) )
|
libraries = ndbm_libs ) )
|
||||||
elif (self.compiler.find_library_file(lib_dirs, 'gdbm')
|
elif self.compiler.find_library_file(lib_dirs, 'gdbm'):
|
||||||
and find_file("gdbm/ndbm.h", inc_dirs, []) is not None):
|
gdbm_libs = ['gdbm']
|
||||||
|
if self.compiler.find_library_file(lib_dirs, 'gdbm_compat'):
|
||||||
|
gdbm_libs.append('gdbm_compat')
|
||||||
|
if find_file("gdbm/ndbm.h", inc_dirs, []) is not None:
|
||||||
|
exts.append( Extension(
|
||||||
|
'dbm', ['dbmmodule.c'],
|
||||||
|
define_macros=[('HAVE_GDBM_NDBM_H',None)],
|
||||||
|
libraries = gdbm_libs ) )
|
||||||
|
elif find_file("gdbm-ndbm.h", inc_dirs, []) is not None:
|
||||||
|
exts.append( Extension(
|
||||||
|
'dbm', ['dbmmodule.c'],
|
||||||
|
define_macros=[('HAVE_GDBM_DASH_NDBM_H',None)],
|
||||||
|
libraries = gdbm_libs ) )
|
||||||
exts.append( Extension('dbm', ['dbmmodule.c'],
|
exts.append( Extension('dbm', ['dbmmodule.c'],
|
||||||
define_macros=[('HAVE_GDBM_NDBM_H',None)],
|
define_macros=[('HAVE_GDBM_NDBM_H',None)],
|
||||||
libraries = ['gdbm'] ) )
|
libraries = ['gdbm'] ) )
|
||||||
|
|
Loading…
Reference in New Issue