Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
45313fe6
Commit
45313fe6
authored
Dec 06, 2008
by
Skip Montanaro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
issue 4483 - dbm build failures on systems with gdbm_compat lib.
parent
f5d5a663
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
Misc/NEWS
Misc/NEWS
+3
-0
Modules/dbmmodule.c
Modules/dbmmodule.c
+3
-0
setup.py
setup.py
+14
-2
No files found.
Misc/NEWS
View file @
45313fe6
...
...
@@ -65,6 +65,9 @@ Core and Builtins
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
statements.
...
...
Modules/dbmmodule.c
View file @
45313fe6
...
...
@@ -21,6 +21,9 @@ static char *which_dbm = "GNU gdbm"; /* EMX port of GDBM */
#elif defined(HAVE_GDBM_NDBM_H)
#include <gdbm/ndbm.h>
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)
#include <db.h>
static
char
*
which_dbm
=
"Berkeley DB"
;
...
...
setup.py
View file @
45313fe6
...
...
@@ -1019,8 +1019,20 @@ class PyBuildExt(build_ext):
exts.append( Extension('dbm', ['dbmmodule.c'],
define_macros=[('HAVE_NDBM_H',None)],
libraries = ndbm_libs ) )
elif (self.compiler.find_library_file(lib_dirs, 'gdbm')
and find_file("
gdbm
/
ndbm
.
h
", inc_dirs, []) is not None):
elif self.compiler.find_library_file(lib_dirs, 'gdbm'):
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'],
define_macros=[('HAVE_GDBM_NDBM_H',None)],
libraries = ['gdbm'] ) )
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment