1 --- Python-2.3/setup.py Thu Jul 10 12:48:39 2003
2 +++ Python-2.3.new/setup.py Thu Aug 28 15:02:31 2003
4 missing.append('bsddb185')
6 # The standard Unix dbm module:
7 - if platform not in ['cygwin']:
8 - if find_file("ndbm.h", inc_dirs, []) is not None:
9 - # Some systems have -lndbm, others don't
10 - if self.compiler.find_library_file(lib_dirs, 'ndbm'):
11 - ndbm_libs = ['ndbm']
14 - exts.append( Extension('dbm', ['dbmmodule.c'],
15 - define_macros=[('HAVE_NDBM_H',None)],
16 - libraries = ndbm_libs ) )
17 - elif (self.compiler.find_library_file(lib_dirs, 'gdbm')
18 - and find_file("gdbm/ndbm.h", inc_dirs, []) is not None):
19 - exts.append( Extension('dbm', ['dbmmodule.c'],
20 - define_macros=[('HAVE_GDBM_NDBM_H',None)],
21 - libraries = ['gdbm'] ) )
22 - elif db_incs is not None:
23 - exts.append( Extension('dbm', ['dbmmodule.c'],
24 - library_dirs=dblib_dir,
25 - runtime_library_dirs=dblib_dir,
26 - include_dirs=db_incs,
27 - define_macros=[('HAVE_BERKDB_H',None),
28 - ('DB_DBM_HSEARCH',None)],
31 - missing.append('dbm')
32 + exts.append( Extension('dbm', ['dbmmodule.c'],
33 + libraries = ['gdbm', 'gdbm_compat'] ) )
35 # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm:
36 if (self.compiler.find_library_file(lib_dirs, 'gdbm')):
37 --- Python-2.3/Modules/dbmmodule.c Fri Nov 22 23:29:31 2002
38 +++ Python-2.3.new/Modules/dbmmodule.c Thu Aug 28 14:51:48 2003
40 /* Some Linux systems install gdbm/ndbm.h, but not ndbm.h. This supports
41 * whichever configure was able to locate.
43 -#if defined(HAVE_NDBM_H)
45 #if defined(PYOS_OS2) && !defined(PYCC_GCC)
46 static char *which_dbm = "ndbm";
48 static char *which_dbm = "GNU gdbm"; /* EMX port of GDBM */
50 -#elif defined(HAVE_GDBM_NDBM_H)
51 -#include <gdbm/ndbm.h>
52 -static char *which_dbm = "GNU gdbm";
53 -#elif defined(HAVE_BERKDB_H)
55 -static char *which_dbm = "Berkeley DB";
57 -#error "No ndbm.h available!"