I don't have the original 3.1.17 source to hand, but I'm not aware of a 3.1.17-2 release. Is this a cygwin special patched version?
Paul > -----Original Message----- > From: Gerrit P. Haase [mailto:[EMAIL PROTECTED]] > Sent: 30 October 2001 08:20 > To: Paul Marquess > Cc: H.Merijn Brand > Subject: Re: DB_File-1.79 on Cygwin 1.3.3 > > > Hallo Paul, > > Am 2001-10-29 um 12:40 schriebst du: > > >> I have built my 3.3.11 with Cygwin 1.3.3 myself. Berkeley DB > has not been > >> included in the default Cygwin setup (yet) > > > Gerrit, you got any ideas? > > There are some interesting patches in 3.1.17 > (the second is the most interested): > > diff -urN db-3.1.17-orig/examples_c/ex_env.c db-3.1.17/examples_c/ex_env.c > --- db-3.1.17-orig/examples_c/ex_env.c Sat Aug 19 14:49:20 2000 > +++ db-3.1.17/examples_c/ex_env.c Mon Oct 23 15:21:56 2000 > @@ -23,7 +23,7 @@ > #define DATABASE_HOME ":database" > #define CONFIG_DATA_DIR ":database" > #else > -#ifdef _WIN32 > +#if defined(_WIN32) && ! defined(__CYGWIN__) > #define DATABASE_HOME "\\tmp\\database" > #define CONFIG_DATA_DIR "\\database\\files" > #else > diff -urN db-3.1.17-orig/examples_c/ex_mpool.c > db-3.1.17/examples_c/ex_mpool.c > --- db-3.1.17-orig/examples_c/ex_mpool.c Sat Aug 19 14:49:20 2000 > +++ db-3.1.17/examples_c/ex_mpool.c Tue Oct 24 00:11:29 2000 > @@ -150,7 +150,7 @@ > * number on each page. > */ > flags = O_CREAT | O_RDWR | O_TRUNC; > -#ifdef _WIN32 > +#if defined(_WIN32) || defined(__CYGWIN__) > flags |= O_BINARY; > #endif > if ((fd = open(file, flags, 0666)) < 0) { > diff -urN db-3.1.17-orig/examples_c/ex_tpcb.c > db-3.1.17/examples_c/ex_tpcb.c > --- db-3.1.17-orig/examples_c/ex_tpcb.c Sat Aug 19 14:49:20 2000 > +++ db-3.1.17/examples_c/ex_tpcb.c Mon Oct 23 15:21:56 2000 > @@ -29,7 +29,7 @@ > #include <unistd.h> > #endif > > -#ifdef _WIN32 > +#if defined(_WIN32) && ! defined(__CYGWIN__) > #include <sys/types.h> > #include <sys/timeb.h> > #endif > @@ -603,14 +603,14 @@ > double gtps, itps; > int failed, ifailed, ret, txns; > time_t starttime, curtime, lasttime; > -#ifndef _WIN32 > - pid_t pid; > - > - pid = getpid(); > -#else > +#if defined(_WIN32) && ! defined(__CYGWIN__) > int pid; > > pid = 0; > +#else > + pid_t pid; > + > + pid = getpid(); > #endif > > /* > diff -urN db-3.1.17-orig/examples_cxx/EnvExample.cpp > db-3.1.17/examples_cxx/EnvExample.cpp > --- db-3.1.17-orig/examples_cxx/EnvExample.cpp Sat Aug 19 14:49:20 2000 > +++ db-3.1.17/examples_cxx/EnvExample.cpp Mon Oct 23 15:21:56 2000 > @@ -27,7 +27,7 @@ > #define DATABASE_HOME ":database" > #define CONFIG_DATA_DIR ":database" > #else > -#ifdef _WIN32 > +#if defined(_WIN32) && ! defined(__CYGWIN__) > #define DATABASE_HOME "\\tmp\\database" > #define CONFIG_DATA_DIR "\\database\\files" > #else > diff -urN db-3.1.17-orig/examples_cxx/TpcbExample.cpp > db-3.1.17/examples_cxx/TpcbExample.cpp > --- db-3.1.17-orig/examples_cxx/TpcbExample.cpp Sat Aug 19 14:49:20 2000 > +++ db-3.1.17/examples_cxx/TpcbExample.cpp Mon Oct 23 15:21:56 2000 > @@ -29,7 +29,7 @@ > #include <unistd.h> > #endif > > -#ifdef _WIN32 > +#if defined(_WIN32) && ! defined(__CYGWIN__) > #include <sys/types.h> > #include <sys/timeb.h> > #endif > @@ -478,14 +478,14 @@ > double gtps, itps; > int failed, ifailed, ret, txns; > time_t starttime, curtime, lasttime; > -#ifndef _WIN32 > - pid_t pid; > - > - pid = getpid(); > -#else > +#if defined(_WIN32) && ! defined(__CYGWIN__) > int pid; > > pid = 0; > +#else > + pid_t pid; > + > + pid = getpid(); > #endif > > // > diff -urN db-3.1.17-orig/include/db_cxx.h db-3.1.17/include/db_cxx.h > --- db-3.1.17-orig/include/db_cxx.h Sat Aug 19 14:49:20 2000 > +++ db-3.1.17/include/db_cxx.h Mon Oct 23 15:21:56 2000 > @@ -96,6 +96,23 @@ > # define _exported // static lib > creator or user > # endif > > +#elif defined(__CYGWIN__) > + > +// set up to use 'cygwin' style defines for DLL/STATIC: > +# if defined(DB_STATIC) > +# define _exported > // static lib creator or user > +# undef DB_CREATE_DLL > +# undef DB_USE_DLL > +# elif defined(DB_DLL) > +# define _exported __declspec(dllexport) // creator of dll > +# define DB_CREATE_DLL > +# undef DB_USE_DLL > +# else > +# define _exported __declspec(dllimport) // user of dll > +# define DB_USE_DLL > +# undef DB_CREATE_DLL > +# endif > + > #else > > # define _exported > diff -urN db-3.1.17-orig/include/os.h db-3.1.17/include/os.h > --- db-3.1.17-orig/include/os.h Sat Aug 19 14:49:20 2000 > +++ db-3.1.17/include/os.h Mon Oct 23 15:21:57 2000 > @@ -14,7 +14,7 @@ > * Filehandle. > */ > struct __fh_t { > -#if defined(_WIN32) > +#if defined(_WIN32) && ! defined(__CYGWIN__) > HANDLE handle; /* Windows/32 file handle. */ > #endif > int fd; /* POSIX file descriptor. */ > diff -urN db-3.1.17-orig/include/os_ext.h db-3.1.17/include/os_ext.h > --- db-3.1.17-orig/include/os_ext.h Sat Aug 19 14:49:20 2000 > +++ db-3.1.17/include/os_ext.h Mon Oct 23 15:21:57 2000 > @@ -49,7 +49,7 @@ > DB_FH *, u_int32_t *, u_int32_t *, u_int32_t *)); > int __os_tmpdir __P((DB_ENV *, u_int32_t)); > int __os_unlink __P((DB_ENV *, const char *)); > -#if defined(_WIN32) > +#if defined(_WIN32) && ! defined(__CYGWIN__) > int __os_win32_errno __P((void)); > #endif > int __os_fpinit __P((DB_ENV *, DB_FH *, db_pgno_t, int, int)); > diff -urN db-3.1.17-orig/libdb_java/java_util.c > db-3.1.17/libdb_java/java_util.c > --- db-3.1.17-orig/libdb_java/java_util.c Sat Aug 19 14:49:21 2000 > +++ db-3.1.17/libdb_java/java_util.c Mon Oct 23 15:21:57 2000 > @@ -18,7 +18,7 @@ > #include "db.h" > #include "java_util.h" > > -#ifdef _WIN32 > +#if defined(_WIN32) && ! defined(__CYGWIN__) > #define sys_errlist _sys_errlist > #define sys_nerr _sys_nerr > #endif > diff -urN db-3.1.17-orig/os/os_oflags.c db-3.1.17/os/os_oflags.c > --- db-3.1.17-orig/os/os_oflags.c Sat Aug 19 14:49:21 2000 > +++ db-3.1.17/os/os_oflags.c Mon Oct 23 15:21:57 2000 > @@ -73,7 +73,7 @@ > int mode; > > #ifndef S_IRUSR > -#if defined(_WIN32) || defined(WIN16) > +#if ( defined(_WIN32) || defined(WIN16) ) && ! defined(__CYGWIN__) > #define S_IRUSR S_IREAD /* R for owner */ > #define S_IWUSR S_IWRITE /* W for owner */ > #define S_IRGRP 0 /* R for group */ > diff -urN db-3.1.17-orig/os/os_stat.c db-3.1.17/os/os_stat.c > --- db-3.1.17-orig/os/os_stat.c Sat Aug 19 14:49:21 2000 > +++ db-3.1.17/os/os_stat.c Mon Oct 23 15:21:57 2000 > @@ -44,7 +44,7 @@ > return (__os_get_errno()); > > #if !defined(S_ISDIR) || defined(STAT_MACROS_BROKEN) > -#if defined(_WIN32) || defined(WIN16) > +#if ( defined(_WIN32) || defined(WIN16) ) && ! defined(__CYGWIN__) > #define S_ISDIR(m) (_S_IFDIR & (m)) > #else > #define S_ISDIR(m) (((m) & 0170000) == 0040000) > diff -urN db-3.1.17-orig/os/os_tmpdir.c db-3.1.17/os/os_tmpdir.c > --- db-3.1.17-orig/os/os_tmpdir.c Sat Aug 19 14:49:21 2000 > +++ db-3.1.17/os/os_tmpdir.c Mon Oct 23 15:21:57 2000 > @@ -95,7 +95,7 @@ > FSp2FullPath(&spec), &dbenv->db_tmp_dir)); > } > #endif > -#ifdef _WIN32 > +#if defined(_WIN32) && ! defined(__CYGWIN__) > /* Get the path to the temporary directory. */ > {int len; > char temp[_MAX_PATH + 1]; > diff -urN db-3.1.17-orig/os_win32/os_errno.c db-3.1.17/os_win32/os_errno.c > --- db-3.1.17-orig/os_win32/os_errno.c Sat Aug 19 14:49:21 2000 > +++ db-3.1.17/os_win32/os_errno.c Mon Oct 23 15:21:57 2000 > @@ -52,7 +52,7 @@ > * error. More information is only available by setting a > breakpoint > * here. > * > - * PUBLIC: #if defined(_WIN32) > + * PUBLIC: #if defined(_WIN32) && ! defined(__CYGWIN__) > * PUBLIC: int __os_win32_errno __P((void)); > * PUBLIC: #endif > */ > > Ciao, > > Gerrit P. Haase mailto:[EMAIL PROTECTED] > -- > =^..^= _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
