On Wed, Nov 01, 2000 at 12:11:34AM +1100, Alan van den Bosch wrote:
> I managed to get mysql-opt built statically linked with libdb32s.lib using
> MSVC++ 6.0 with sp3 on win95b. Have done a quick test (single user/single
> transaction) and it seems to work - after I remembered to set autocommit off.
> Well the server doesnt fall over anyway :-)
OK, that's good news.
> The db-3.2.3b tarball includes a few different directories specific to
> building on different platforms (win32,vms...) and the db.h file in the
> build_win32 directory is from sleepycat ver 2 -> app_private only in
> __db_dbt. I added app_private to __db and __db_env by hand. I cant see a *nix
> version of db.h in the tarball either so I assume that the first db.h already
> on a *nix system the compiler comes accross will be used. This tarball may
> not be enough by itself to get db-3 happening on *nix :-(
build_unix/db.h is created from include/db.src, by autoconf. You
can copy db.src to the build_win32 directory and replace every
occurrance of @something@ with the appropriate value, if you want.
There might be some easy way to do this on Windows, but I have no
> Some other issues I came across;
> 1) both mysql (mysys.lib) and libdb32s.lib have 'getopt' implemented. I threw
> a #ifndef HAVE_GETOPT ... #endif around most of the contents of
> db-3.2.3b/clib/getopt.c, starting from just below where db_config.h is
> included (was tempting to just remove it from the project, which prolly would
> have been easier, but HAVE_GETOPT is mentioned in db_config.h already for
> what its worth )
OK. I'm sure there must be a simple way around this, but I don't
know what it is.
> 2) the use of the type 'byte' in ha_berkeley.[ch] caused MSVC++ to barf. I
> went sick with type casting arguments till the compiler was content - hope I
> havent broken too much ;-)
Ditto. We should be able to handle this in the config-win.h file
if we do things right.
> 3) db-3.2.3b/os_win32/os_rename.c uses MoveFileEx(), which is not available
> on win95/98 - they have also used a hack to get around a bug in this function
> that occurs if the destination file file allready exists which involves
> calling MoveFile() if MoveFileEx() fails. The files comments explain it
> nicely. I replaced this with a call to DeleteFile() then a call to
> MoveFile(). DeleteFile() will close the file before deleting it if needed
OK. Who knew it?
> Thankyou for your assistance and I hope this is of some help.
Yes, I think it is. As you can tell, I'm not very intimate with
the Windows development.
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Tim Smith <tim@stripped>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Development Team
/_/ /_/\_, /___/\___\_\___/ Boone, NC USA