1 diff -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
5 /* Some Linux systems install gdbm/ndbm.h, but not ndbm.h. This supports
6 * whichever configure was able to locate.
8 -#if defined(HAVE_NDBM_H)
10 #if defined(PYOS_OS2) && !defined(PYCC_GCC)
11 static char *which_dbm = "ndbm";
13 static char *which_dbm = "GNU gdbm"; /* EMX port of GDBM */
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)
20 -static char *which_dbm = "Berkeley DB";
22 -#error "No ndbm.h available!"
27 diff -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
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']
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)],
57 - missing.append('dbm')
58 + exts.append( Extension('dbm', ['dbmmodule.c'],
59 + libraries = ['gdbm', 'gdbm_compat'] ) )
61 # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm:
62 if (self.compiler.find_library_file(lib_dirs, 'gdbm')):