Subject: [clisp-list] berkeley-db module: for Windows only?

From: Aurelio Bignoli <[email-masked]>
Date: Sat Dec 27 16:18:00 2003

I tried to compile the berkeley-db module under Linux, but I got the
following error from GCC 3.2.3:

gcc -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type  -Wno-sign-compare -O2 -fexpensive-optimizations -DUNICODE -DDYNAMIC_FFI -DNO_SIGSEGV -I../ -c bdb.m.c -o bdb.o
In file included from bdb.c:14:
config.h:35:1: warning: "PACKAGE_BUGREPORT" redefined
In file included from bdb.c:8:
../clisp.h:123:1: warning: this is the location of the previous definition
In file included from bdb.c:14:
config.h:38:1: warning: "PACKAGE_NAME" redefined
In file included from bdb.c:8:
../clisp.h:124:1: warning: this is the location of the previous definition
In file included from bdb.c:14:
config.h:41:1: warning: "PACKAGE_STRING" redefined
In file included from bdb.c:8:
../clisp.h:125:1: warning: this is the location of the previous definition
In file included from bdb.c:14:
config.h:44:1: warning: "PACKAGE_TARNAME" redefined
In file included from bdb.c:8:
../clisp.h:126:1: warning: this is the location of the previous definition
In file included from bdb.c:14:
config.h:47:1: warning: "PACKAGE_VERSION" redefined
In file included from bdb.c:8:
../clisp.h:127:1: warning: this is the location of the previous definition
bdb.c:32:22: windows.h: No such file or directory
make[1]: *** [bdb.o] Error 1

At the beginning of bdb.c there are some #ifdefs, but it seems that
windows.h is always included:

#if defined(__CYGWIN__)
# define UNIX_CYGWIN32
#endif

#define WIN32_LEAN_AND_MEAN  /* avoid including junk */
#if defined(UNIX_CYGWIN32) || defined(__MINGW32__)
/* `unused' is used in function declarations. */
# undef unused
# define ULONGLONG OS_ULONGLONG
# define ULONG OS_ULONG
# include <windows.h>
# undef ULONG
# undef ULONGLONG
# define unused (void)
#else
# undef unused
# include <windows.h>
# define unused
#endif