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