Milton L. Hankins
mlh@swl.msd.ray.com
1998 Oct 02


Legal stuff
===========
Standard Python copyright, please.


What is this?
=============

This is a port of the Python GDBM module to Win32.  It has been tested
with GDBM 1.7.3 under Windows NT and seems OK.  

Also included are MSVC++5 files for those brave souls who want or need
to compile this beast.


How do I apply the patches?
===========================

Don't; a fresh gdbmmodule.c is supplied.  It was based off the 1.5.1
release, patched through 1998 Jun 25.  I just had to add some header
info and work around the MSVC++5 problem for initializing PyTypes.

Here's the "diff -b" output in case you are curious or anal retentive:

43a44,48
> #ifdef WIN32
> #include "gdbmerrno.h"
> extern const char * gdbm_strerror(gdbm_error);
> #endif
> 
427a433,436
> 
> #ifdef WIN32
>       PyObject_HEAD_INIT(0)
> #else
428a438,439
> #endif
> 
517a529,532
> #ifdef WIN32
>       Dbmtype.ob_type = &PyType_Type;
> #endif
> 


How to compile the GDBM module
==============================

It's easiest to use the supplied "gdbm.pyd", but if you insist...

First, you will need a working port of GDBM "proper" to Win32 with
includes and static library files.  I got a source distribution from
"http://www.roth.net/perl/GDBM/".

Tips for compiling roth.net's GDBM port
---------------------------------------

Make a sibling directory of the Python source distribution folder and
name it "gdbm-1.7.3".  (You should see both Python-x.y.z and
gdbm-1.7.3 in the same folder.)  Download the source package and unzip
it into this new directory.

The "gdbm.mak" that comes with their distribution (as of time of
writing) is slightly broken; included here is mine.  Back up the
original "gdbm.mak" and copy mine in its place.  (In case you need to
fix it yourself, here's what I had to do.  Change references of "s:\"
and "s:\lib" so that files are placed into the working directory and
the Debug directory when appropriate.  You'll have to use your brain
for that.  Like I said, just use "gdbm.pyd"; but noooo, you wouldn't
listen...)  Execute "gdbm.mak" to build "gdbm.lib".


Once you have GDBM proper
-------------------------

Open Python's pcbuild workspace and build the gdbm (module) project.
This project expects GDBM include files to be in "..\..\gdbm-1.7.3"
and the GDBM library file to be in either the Release or Debug
subdirectories from there.  Tweak the project's settings if the
locations or version numbers change.
