]> git.pld-linux.org Git - packages/python3.git/blame - python3-no_ndbm.patch
- update files
[packages/python3.git] / python3-no_ndbm.patch
CommitLineData
e684db95
AM
1diff -urN Python-3.0a1.org/Modules/dbmmodule.c Python-3.0a1/Modules/dbmmodule.c
2--- Python-3.0a1.org/Modules/dbmmodule.c 2007-08-14 18:29:22.000000000 +0200
3+++ Python-3.0a1/Modules/dbmmodule.c 2007-09-02 20:09:52.356906353 +0200
4@@ -11,22 +11,12 @@
5 /* Some Linux systems install gdbm/ndbm.h, but not ndbm.h. This supports
6 * whichever configure was able to locate.
7 */
8-#if defined(HAVE_NDBM_H)
9 #include <ndbm.h>
10 #if defined(PYOS_OS2) && !defined(PYCC_GCC)
11 static char *which_dbm = "ndbm";
12 #else
13 static char *which_dbm = "GNU gdbm"; /* EMX port of GDBM */
14 #endif
15-#elif defined(HAVE_GDBM_NDBM_H)
16-#include <gdbm/ndbm.h>
17-static char *which_dbm = "GNU gdbm";
18-#elif defined(HAVE_BERKDB_H)
19-#include <db.h>
20-static char *which_dbm = "Berkeley DB";
21-#else
22-#error "No ndbm.h available!"
23-#endif
24
25 typedef struct {
26 PyObject_HEAD
27diff -urN Python-3.0a1.org/setup.py Python-3.0a1/setup.py
28--- Python-3.0a1.org/setup.py 2007-08-29 00:24:48.000000000 +0200
29+++ Python-3.0a1/setup.py 2007-09-02 20:09:34.579833964 +0200
30@@ -869,30 +869,8 @@
31
32 # The standard Unix dbm module:
33 if platform not in ['cygwin']:
34- if find_file("ndbm.h", inc_dirs, []) is not None:
35- # Some systems have -lndbm, others don't
36- if self.compiler.find_library_file(lib_dirs, 'ndbm'):
37- ndbm_libs = ['ndbm']
38- else:
39- ndbm_libs = []
40- exts.append( Extension('dbm', ['dbmmodule.c'],
41- define_macros=[('HAVE_NDBM_H',None)],
42- libraries = ndbm_libs ) )
43- elif (self.compiler.find_library_file(lib_dirs, 'gdbm')
44- and find_file("gdbm/ndbm.h", inc_dirs, []) is not None):
45- exts.append( Extension('dbm', ['dbmmodule.c'],
46- define_macros=[('HAVE_GDBM_NDBM_H',None)],
47- libraries = ['gdbm'] ) )
48- elif db_incs is not None:
49- exts.append( Extension('dbm', ['dbmmodule.c'],
50- library_dirs=dblib_dir,
51- runtime_library_dirs=dblib_dir,
52- include_dirs=db_incs,
53- define_macros=[('HAVE_BERKDB_H',None),
54- ('DB_DBM_HSEARCH',None)],
55- libraries=dblibs))
56- else:
57- missing.append('dbm')
58+ exts.append( Extension('dbm', ['dbmmodule.c'],
59+ libraries = ['gdbm', 'gdbm_compat'] ) )
60
61 # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm:
62 if (self.compiler.find_library_file(lib_dirs, 'gdbm')):
This page took 0.030052 seconds and 4 git commands to generate.