I tried compiling with BDB versions 5.3.28; 6.0.35; and 6.1.29 (
config.status: executing libtool commands
./libtool --mode=compile cc -c -I. -I../src -O3 ../src/mutex/mut_win32.c
libtool: compile: cc -c -I. -I../src -O3 ../src/mutex/mut_win32.c -o mut_win32.o
In file included from ./db_int.h:96:0,
from ../src/mutex/mut_win32.c:12:
./db.h:3196:34: error: unknown type name 'SECURITY_ATTRIBUTES'
int db_env_set_win_security __P((SECURITY_ATTRIBUTES *sa));
^
./db.h:40:21: note: in definition of macro '__P'
#define __P(protos) protos
^
In file included from ./db_int.h:1161:0,
from ../src/mutex/mut_win32.c:12:
../src/dbinc/globals.h:39:2: error: unknown type name 'SECURITY_DESCRIPTOR'
SECURITY_DESCRIPTOR win_default_sec_desc;
^
../src/dbinc/globals.h:40:2: error: unknown type name 'SECURITY_ATTRIBUTES'
SECURITY_ATTRIBUTES win_default_sec_attr;
^
../src/dbinc/globals.h:42:2: error: unknown type name 'SECURITY_ATTRIBUTES'
SECURITY_ATTRIBUTES *win_sec_attr;
^
In file included from ./db_int.h:1163:0,
from ../src/mutex/mut_win32.c:12:
../src/dbinc/region.h:291:2: error: unknown type name 'HANDLE'
HANDLE wnt_handle; /* Win/NT HANDLE. */
^
In file included from ../src/dbinc/mutex_int.h:12:0,
from ../src/dbinc/mutex.h:15,
from ./db_int.h:1165,
from ../src/mutex/mut_win32.c:12:
../src/dbinc/atomic.h:43:9: error: unknown type name 'DWORD'
typedef DWORD atomic_value_t;
^
../src/dbinc/atomic.h:108:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'volatile'
typedef LONG volatile *interlocked_val;
^
In file included from ../src/dbinc/mutex.h:15:0,
from ./db_int.h:1165,
from ../src/mutex/mut_win32.c:12:
../src/dbinc/mutex_int.h:369:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'volatile'
typedef LONG volatile tsl_t;
^
../src/dbinc/mutex_int.h:371:2: error: unknown type name 'LONG'
LONG nwaiters; \
^
../src/dbinc/mutex_int.h:1006:2: note: in expansion of macro 'MUTEX_FIELDS'
MUTEX_FIELDS /* Opaque thread mutex structures. */
^
../src/dbinc/mutex_int.h:1018:2: error: unknown type name 'tsl_t'
tsl_t tas;
^
In file included from ./db_int.h:1170:0,
from ../src/mutex/mut_win32.c:12:
../src/dbinc/os.h:129:2: error: unknown type name 'HANDLE'
HANDLE handle; /* Windows/32 file handle. */
^
../src/dbinc/os.h:130:2: error: unknown type name 'HANDLE'
HANDLE trunc_handle; /* Handle for truncate calls. */
^
../src/mutex/mut_win32.c:30:8: error: unknown type name '_TCHAR'
static _TCHAR hex_digits[] = _T("0123456789abcdef");
^
../src/mutex/mut_win32.c:30:30: warning: implicit declaration of function '_T' [-Wimplicit-function-declaration]
static _TCHAR hex_digits[] = _T("0123456789abcdef");
^
../src/mutex/mut_win32.c:30:30: error: invalid initializer
../src/mutex/mut_win32.c: In function 'get_handle':
../src/mutex/mut_win32.c:35:2: error: unknown type name 'HANDLE'
HANDLE *eventp;
^
../src/mutex/mut_win32.c:37:2: error: unknown type name '_TCHAR'
_TCHAR idbuf[] = _T("db.m00000000");
^
../src/mutex/mut_win32.c:37:19: error: invalid initializer
_TCHAR idbuf[] = _T("db.m00000000");
^
../src/mutex/mut_win32.c:38:2: error: unknown type name '_TCHAR'
_TCHAR *p = idbuf + 12;
^
../src/mutex/mut_win32.c:47:3: warning: implicit declaration of function 'InitializeSecurityDescriptor' [-Wimplicit-function-declaration]
InitializeSecurityDescriptor(&DB_GLOBAL(win_default_sec_desc),
^
../src/mutex/mut_win32.c:48:7: error: 'SECURITY_DESCRIPTOR_REVISION' undeclared (first use in this function)
SECURITY_DESCRIPTOR_REVISION);
^
../src/mutex/mut_win32.c:48:7: note: each undeclared identifier is reported only once for each function it appears in
../src/mutex/mut_win32.c:49:3: warning: implicit declaration of function 'SetSecurityDescriptorDacl' [-Wimplicit-function-declaration]
SetSecurityDescriptorDacl(&DB_GLOBAL(win_default_sec_desc),
^
../src/mutex/mut_win32.c:51:34: error: request for member 'nLength' in something not a structure or union
DB_GLOBAL(win_default_sec_attr).nLength =
^
../src/mutex/mut_win32.c:52:14: error: 'SECURITY_ATTRIBUTES' undeclared (first use in this function)
sizeof(SECURITY_ATTRIBUTES);
^
../src/mutex/mut_win32.c:53:34: error: request for member 'bInheritHandle' in something not a structure or union
DB_GLOBAL(win_default_sec_attr).bInheritHandle = FALSE;
^
../src/mutex/mut_win32.c:54:34: error: request for member 'lpSecurityDescriptor' in something not a structure or union
DB_GLOBAL(win_default_sec_attr).lpSecurityDescriptor =
^
../src/mutex/mut_win32.c:60:17: warning: implicit declaration of function 'CreateEvent' [-Wimplicit-function-declaration]
if ((*eventp = CreateEvent(DB_GLOBAL(win_sec_attr),
^
../src/mutex/mut_win32.c:61:28: warning: comparison between pointer and integer
FALSE, FALSE, idbuf)) == NULL) {
^
../src/mutex/mut_win32.c: In function '__db_win32_mutex_lock_int':
../src/mutex/mut_win32.c:90:2: error: unknown type name 'HANDLE'
HANDLE event;
^
../src/mutex/mut_win32.c:124:8: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
event = NULL;
^
In file included from ../src/dbinc/mutex_int.h:12:0,
from ../src/dbinc/mutex.h:15,
from ./db_int.h:1165,
from ../src/mutex/mut_win32.c:12:
../src/dbinc/atomic.h:124:3: warning: implicit declaration of function 'InterlockedCompareExchange' [-Wimplicit-function-declaration]
(InterlockedCompareExchange((interlocked_val)(&(p)->value), \
^
../src/dbinc/mutex_int.h:1116:2: note: in expansion of macro 'atomic_compare_exchange'
atomic_compare_exchange(env, \
^
../src/mutex/mut_win32.c:143:34: note: in expansion of macro 'MUTEXP_ACQUIRE'
if (MUTEXP_IS_BUSY(mutexp) || !MUTEXP_ACQUIRE(mutexp)) {
^
../src/dbinc/atomic.h:124:31: error: 'interlocked_val' undeclared (first use in this function)
(InterlockedCompareExchange((interlocked_val)(&(p)->value), \
^
../src/dbinc/mutex_int.h:1116:2: note: in expansion of macro 'atomic_compare_exchange'
atomic_compare_exchange(env, \
^
../src/mutex/mut_win32.c:143:34: note: in expansion of macro 'MUTEXP_ACQUIRE'
if (MUTEXP_IS_BUSY(mutexp) || !MUTEXP_ACQUIRE(mutexp)) {
^
../src/dbinc/atomic.h:124:30: error: called object is not a function or function pointer
(InterlockedCompareExchange((interlocked_val)(&(p)->value), \
^
../src/dbinc/mutex_int.h:1116:2: note: in expansion of macro 'atomic_compare_exchange'
atomic_compare_exchange(env, \
^
../src/mutex/mut_win32.c:143:34: note: in expansion of macro 'MUTEXP_ACQUIRE'
if (MUTEXP_IS_BUSY(mutexp) || !MUTEXP_ACQUIRE(mutexp)) {
^
In file included from ../src/dbinc/mutex.h:15:0,
from ./db_int.h:1165,
from ../src/mutex/mut_win32.c:12:
../src/dbinc/mutex_int.h:375:27: warning: implicit declaration of function 'InterlockedExchange' [-Wimplicit-function-declaration]
#define MUTEX_SET(tsl) (!InterlockedExchange((PLONG)tsl, 1))
^
../src/dbinc/mutex_int.h:1118:2: note: in expansion of macro 'MUTEX_SET'
MUTEX_SET(&(mutexp)->tas))
^
../src/mutex/mut_win32.c:143:34: note: in expansion of macro 'MUTEXP_ACQUIRE'
if (MUTEXP_IS_BUSY(mutexp) || !MUTEXP_ACQUIRE(mutexp)) {
^
../src/dbinc/mutex_int.h:375:48: error: 'PLONG' undeclared (first use in this function)
#define MUTEX_SET(tsl) (!InterlockedExchange((PLONG)tsl, 1))
^
../src/dbinc/mutex_int.h:1118:2: note: in expansion of macro 'MUTEX_SET'
MUTEX_SET(&(mutexp)->tas))
^
../src/mutex/mut_win32.c:143:34: note: in expansion of macro 'MUTEXP_ACQUIRE'
if (MUTEXP_IS_BUSY(mutexp) || !MUTEXP_ACQUIRE(mutexp)) {
^
../src/dbinc/mutex_int.h:1118:12: error: invalid operands to binary & (have 'int *' and 'int')
MUTEX_SET(&(mutexp)->tas))
^
../src/dbinc/mutex_int.h:375:54: note: in definition of macro 'MUTEX_SET'
#define MUTEX_SET(tsl) (!InterlockedExchange((PLONG)tsl, 1))
^
../src/mutex/mut_win32.c:143:34: note: in expansion of macro 'MUTEXP_ACQUIRE'
if (MUTEXP_IS_BUSY(mutexp) || !MUTEXP_ACQUIRE(mutexp)) {
^
../src/mutex/mut_win32.c:183:13: warning: comparison between pointer and integer
if (event == NULL)
^
../src/mutex/mut_win32.c:188:13: warning: comparison between pointer and integer
if (event != NULL) {
^
../src/mutex/mut_win32.c:189:4: warning: implicit declaration of function 'CloseHandle' [-Wimplicit-function-declaration]
CloseHandle(event);
^
../src/mutex/mut_win32.c:190:4: warning: implicit declaration of function 'InterlockedDecrement' [-Wimplicit-function-declaration]
InterlockedDecrement(&mutexp->nwaiters);
^
../src/mutex/mut_win32.c:235:12: warning: comparison between pointer and integer
if (event == NULL) {
^
../src/mutex/mut_win32.c:242:3: warning: implicit declaration of function 'InterlockedIncrement' [-Wimplicit-function-declaration]
InterlockedIncrement(&mutexp->nwaiters);
^
../src/mutex/mut_win32.c:248:13: warning: implicit declaration of function 'WaitForSingleObject' [-Wimplicit-function-declaration]
if ((ret = WaitForSingleObject(event, ms)) == WAIT_FAILED) {
^
../src/mutex/mut_win32.c:248:48: error: 'WAIT_FAILED' undeclared (first use in this function)
if ((ret = WaitForSingleObject(event, ms)) == WAIT_FAILED) {
^
../src/mutex/mut_win32.c:248:45: warning: comparison between pointer and integer
if ((ret = WaitForSingleObject(event, ms)) == WAIT_FAILED) {
^
../src/mutex/mut_win32.c:267:12: warning: comparison between pointer and integer
if (event != NULL) {
^
../src/mutex/mut_win32.c: In function '__db_win32_mutex_readlock_int':
../src/mutex/mut_win32.c:348:2: error: unknown type name 'HANDLE'
HANDLE event;
^
../src/mutex/mut_win32.c:375:8: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
event = NULL;
^
In file included from ../src/dbinc/mutex_int.h:12:0,
from ../src/dbinc/mutex.h:15,
from ./db_int.h:1165,
from ../src/mutex/mut_win32.c:12:
../src/dbinc/atomic.h:124:31: error: 'interlocked_val' undeclared (first use in this function)
(InterlockedCompareExchange((interlocked_val)(&(p)->value), \
^
../src/mutex/mut_win32.c:410:15: note: in expansion of macro 'atomic_compare_exchange'
} else if (!atomic_compare_exchange(env, &mutexp->sharecount,
^
../src/dbinc/atomic.h:124:30: error: called object is not a function or function pointer
(InterlockedCompareExchange((interlocked_val)(&(p)->value), \
^
../src/mutex/mut_win32.c:410:15: note: in expansion of macro 'atomic_compare_exchange'
} else if (!atomic_compare_exchange(env, &mutexp->sharecount,
^
../src/mutex/mut_win32.c:430:13: warning: comparison between pointer and integer
if (event == NULL)
^
../src/mutex/mut_win32.c:435:13: warning: comparison between pointer and integer
if (event != NULL) {
^
../src/mutex/mut_win32.c:469:12: warning: comparison between pointer and integer
if (event == NULL) {
^
../src/mutex/mut_win32.c:480:48: error: 'WAIT_FAILED' undeclared (first use in this function)
if ((ret = WaitForSingleObject(event, ms)) == WAIT_FAILED) {
^
../src/mutex/mut_win32.c:480:45: warning: comparison between pointer and integer
if ((ret = WaitForSingleObject(event, ms)) == WAIT_FAILED) {
^
../src/mutex/mut_win32.c:502:12: warning: comparison between pointer and integer
if (event != NULL) {
^
../src/mutex/mut_win32.c: In function '__db_win32_mutex_unlock':
../src/mutex/mut_win32.c:561:2: error: unknown type name 'HANDLE'
HANDLE event;
^
../src/mutex/mut_win32.c:604:9: error: 'interlocked_val' undeclared (first use in this function)
(interlocked_val)(&atomic_read(
^
../src/mutex/mut_win32.c:604:8: error: called object is not a function or function pointer
(interlocked_val)(&atomic_read(
^
../src/mutex/mut_win32.c:614:29: error: called object is not a function or function pointer
if (InterlockedDecrement((interlocked_val)
^
In file included from ../src/dbinc/mutex.h:15:0,
from ./db_int.h:1165,
from ../src/mutex/mut_win32.c:12:
../src/dbinc/mutex_int.h:376:47: error: 'PLONG' undeclared (first use in this function)
#define MUTEX_UNSET(tsl) InterlockedExchange((PLONG)tsl, 0)
^
../src/mutex/mut_win32.c:631:3: note: in expansion of macro 'MUTEX_UNSET'
MUTEX_UNSET(&mutexp->tas);
^
../src/mutex/mut_win32.c:631:15: error: invalid operands to binary & (have 'int *' and 'int')
MUTEX_UNSET(&mutexp->tas);
^
../src/dbinc/mutex_int.h:376:53: note: in definition of macro 'MUTEX_UNSET'
#define MUTEX_UNSET(tsl) InterlockedExchange((PLONG)tsl, 0)
^
../src/mutex/mut_win32.c:644:8: warning: implicit declaration of function 'PulseEvent' [-Wimplicit-function-declaration]
if (!PulseEvent(event)) {
^
../src/mutex/mut_win32.c: In function 'db_env_set_win_security':
../src/mutex/mut_win32.c:686:2: error: unknown type name 'SECURITY_ATTRIBUTES'
SECURITY_ATTRIBUTES *sa;
^
Makefile:2265: recipe for target 'mut_win32.o' failed
make: *** [mut_win32.o] Error 1
./libtool --mode=compile cc -c -I. -I../src -O3 ../src/mutex/mut_win32.c
libtool: compile: cc -c -I. -I../src -O3 ../src/mutex/mut_win32.c -o mut_win32.o
In file included from ./db_int.h:96:0,
from ../src/mutex/mut_win32.c:12:
./db.h:3196:34: error: unknown type name 'SECURITY_ATTRIBUTES'
int db_env_set_win_security __P((SECURITY_ATTRIBUTES *sa));
^
./db.h:40:21: note: in definition of macro '__P'
#define __P(protos) protos
^
In file included from ./db_int.h:1161:0,
from ../src/mutex/mut_win32.c:12:
../src/dbinc/globals.h:39:2: error: unknown type name 'SECURITY_DESCRIPTOR'
SECURITY_DESCRIPTOR win_default_sec_desc;
^
../src/dbinc/globals.h:40:2: error: unknown type name 'SECURITY_ATTRIBUTES'
SECURITY_ATTRIBUTES win_default_sec_attr;
^
../src/dbinc/globals.h:42:2: error: unknown type name 'SECURITY_ATTRIBUTES'
SECURITY_ATTRIBUTES *win_sec_attr;
^
In file included from ./db_int.h:1163:0,
from ../src/mutex/mut_win32.c:12:
../src/dbinc/region.h:291:2: error: unknown type name 'HANDLE'
HANDLE wnt_handle; /* Win/NT HANDLE. */
^
In file included from ../src/dbinc/mutex_int.h:12:0,
from ../src/dbinc/mutex.h:15,
from ./db_int.h:1165,
from ../src/mutex/mut_win32.c:12:
../src/dbinc/atomic.h:43:9: error: unknown type name 'DWORD'
typedef DWORD atomic_value_t;
^
../src/dbinc/atomic.h:108:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'volatile'
typedef LONG volatile *interlocked_val;
^
In file included from ../src/dbinc/mutex.h:15:0,
from ./db_int.h:1165,
from ../src/mutex/mut_win32.c:12:
../src/dbinc/mutex_int.h:369:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'volatile'
typedef LONG volatile tsl_t;
^
../src/dbinc/mutex_int.h:371:2: error: unknown type name 'LONG'
LONG nwaiters; \
^
../src/dbinc/mutex_int.h:1006:2: note: in expansion of macro 'MUTEX_FIELDS'
MUTEX_FIELDS /* Opaque thread mutex structures. */
^
../src/dbinc/mutex_int.h:1018:2: error: unknown type name 'tsl_t'
tsl_t tas;
^
In file included from ./db_int.h:1170:0,
from ../src/mutex/mut_win32.c:12:
../src/dbinc/os.h:129:2: error: unknown type name 'HANDLE'
HANDLE handle; /* Windows/32 file handle. */
^
../src/dbinc/os.h:130:2: error: unknown type name 'HANDLE'
HANDLE trunc_handle; /* Handle for truncate calls. */
^
../src/mutex/mut_win32.c:30:8: error: unknown type name '_TCHAR'
static _TCHAR hex_digits[] = _T("0123456789abcdef");
^
../src/mutex/mut_win32.c:30:30: warning: implicit declaration of function '_T' [-Wimplicit-function-declaration]
static _TCHAR hex_digits[] = _T("0123456789abcdef");
^
../src/mutex/mut_win32.c:30:30: error: invalid initializer
../src/mutex/mut_win32.c: In function 'get_handle':
../src/mutex/mut_win32.c:35:2: error: unknown type name 'HANDLE'
HANDLE *eventp;
^
../src/mutex/mut_win32.c:37:2: error: unknown type name '_TCHAR'
_TCHAR idbuf[] = _T("db.m00000000");
^
../src/mutex/mut_win32.c:37:19: error: invalid initializer
_TCHAR idbuf[] = _T("db.m00000000");
^
../src/mutex/mut_win32.c:38:2: error: unknown type name '_TCHAR'
_TCHAR *p = idbuf + 12;
^
../src/mutex/mut_win32.c:47:3: warning: implicit declaration of function 'InitializeSecurityDescriptor' [-Wimplicit-function-declaration]
InitializeSecurityDescriptor(&DB_GLOBAL(win_default_sec_desc),
^
../src/mutex/mut_win32.c:48:7: error: 'SECURITY_DESCRIPTOR_REVISION' undeclared (first use in this function)
SECURITY_DESCRIPTOR_REVISION);
^
../src/mutex/mut_win32.c:48:7: note: each undeclared identifier is reported only once for each function it appears in
../src/mutex/mut_win32.c:49:3: warning: implicit declaration of function 'SetSecurityDescriptorDacl' [-Wimplicit-function-declaration]
SetSecurityDescriptorDacl(&DB_GLOBAL(win_default_sec_desc),
^
../src/mutex/mut_win32.c:51:34: error: request for member 'nLength' in something not a structure or union
DB_GLOBAL(win_default_sec_attr).nLength =
^
../src/mutex/mut_win32.c:52:14: error: 'SECURITY_ATTRIBUTES' undeclared (first use in this function)
sizeof(SECURITY_ATTRIBUTES);
^
../src/mutex/mut_win32.c:53:34: error: request for member 'bInheritHandle' in something not a structure or union
DB_GLOBAL(win_default_sec_attr).bInheritHandle = FALSE;
^
../src/mutex/mut_win32.c:54:34: error: request for member 'lpSecurityDescriptor' in something not a structure or union
DB_GLOBAL(win_default_sec_attr).lpSecurityDescriptor =
^
../src/mutex/mut_win32.c:60:17: warning: implicit declaration of function 'CreateEvent' [-Wimplicit-function-declaration]
if ((*eventp = CreateEvent(DB_GLOBAL(win_sec_attr),
^
../src/mutex/mut_win32.c:61:28: warning: comparison between pointer and integer
FALSE, FALSE, idbuf)) == NULL) {
^
../src/mutex/mut_win32.c: In function '__db_win32_mutex_lock_int':
../src/mutex/mut_win32.c:90:2: error: unknown type name 'HANDLE'
HANDLE event;
^
../src/mutex/mut_win32.c:124:8: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
event = NULL;
^
In file included from ../src/dbinc/mutex_int.h:12:0,
from ../src/dbinc/mutex.h:15,
from ./db_int.h:1165,
from ../src/mutex/mut_win32.c:12:
../src/dbinc/atomic.h:124:3: warning: implicit declaration of function 'InterlockedCompareExchange' [-Wimplicit-function-declaration]
(InterlockedCompareExchange((interlocked_val)(&(p)->value), \
^
../src/dbinc/mutex_int.h:1116:2: note: in expansion of macro 'atomic_compare_exchange'
atomic_compare_exchange(env, \
^
../src/mutex/mut_win32.c:143:34: note: in expansion of macro 'MUTEXP_ACQUIRE'
if (MUTEXP_IS_BUSY(mutexp) || !MUTEXP_ACQUIRE(mutexp)) {
^
../src/dbinc/atomic.h:124:31: error: 'interlocked_val' undeclared (first use in this function)
(InterlockedCompareExchange((interlocked_val)(&(p)->value), \
^
../src/dbinc/mutex_int.h:1116:2: note: in expansion of macro 'atomic_compare_exchange'
atomic_compare_exchange(env, \
^
../src/mutex/mut_win32.c:143:34: note: in expansion of macro 'MUTEXP_ACQUIRE'
if (MUTEXP_IS_BUSY(mutexp) || !MUTEXP_ACQUIRE(mutexp)) {
^
../src/dbinc/atomic.h:124:30: error: called object is not a function or function pointer
(InterlockedCompareExchange((interlocked_val)(&(p)->value), \
^
../src/dbinc/mutex_int.h:1116:2: note: in expansion of macro 'atomic_compare_exchange'
atomic_compare_exchange(env, \
^
../src/mutex/mut_win32.c:143:34: note: in expansion of macro 'MUTEXP_ACQUIRE'
if (MUTEXP_IS_BUSY(mutexp) || !MUTEXP_ACQUIRE(mutexp)) {
^
In file included from ../src/dbinc/mutex.h:15:0,
from ./db_int.h:1165,
from ../src/mutex/mut_win32.c:12:
../src/dbinc/mutex_int.h:375:27: warning: implicit declaration of function 'InterlockedExchange' [-Wimplicit-function-declaration]
#define MUTEX_SET(tsl) (!InterlockedExchange((PLONG)tsl, 1))
^
../src/dbinc/mutex_int.h:1118:2: note: in expansion of macro 'MUTEX_SET'
MUTEX_SET(&(mutexp)->tas))
^
../src/mutex/mut_win32.c:143:34: note: in expansion of macro 'MUTEXP_ACQUIRE'
if (MUTEXP_IS_BUSY(mutexp) || !MUTEXP_ACQUIRE(mutexp)) {
^
../src/dbinc/mutex_int.h:375:48: error: 'PLONG' undeclared (first use in this function)
#define MUTEX_SET(tsl) (!InterlockedExchange((PLONG)tsl, 1))
^
../src/dbinc/mutex_int.h:1118:2: note: in expansion of macro 'MUTEX_SET'
MUTEX_SET(&(mutexp)->tas))
^
../src/mutex/mut_win32.c:143:34: note: in expansion of macro 'MUTEXP_ACQUIRE'
if (MUTEXP_IS_BUSY(mutexp) || !MUTEXP_ACQUIRE(mutexp)) {
^
../src/dbinc/mutex_int.h:1118:12: error: invalid operands to binary & (have 'int *' and 'int')
MUTEX_SET(&(mutexp)->tas))
^
../src/dbinc/mutex_int.h:375:54: note: in definition of macro 'MUTEX_SET'
#define MUTEX_SET(tsl) (!InterlockedExchange((PLONG)tsl, 1))
^
../src/mutex/mut_win32.c:143:34: note: in expansion of macro 'MUTEXP_ACQUIRE'
if (MUTEXP_IS_BUSY(mutexp) || !MUTEXP_ACQUIRE(mutexp)) {
^
../src/mutex/mut_win32.c:183:13: warning: comparison between pointer and integer
if (event == NULL)
^
../src/mutex/mut_win32.c:188:13: warning: comparison between pointer and integer
if (event != NULL) {
^
../src/mutex/mut_win32.c:189:4: warning: implicit declaration of function 'CloseHandle' [-Wimplicit-function-declaration]
CloseHandle(event);
^
../src/mutex/mut_win32.c:190:4: warning: implicit declaration of function 'InterlockedDecrement' [-Wimplicit-function-declaration]
InterlockedDecrement(&mutexp->nwaiters);
^
../src/mutex/mut_win32.c:235:12: warning: comparison between pointer and integer
if (event == NULL) {
^
../src/mutex/mut_win32.c:242:3: warning: implicit declaration of function 'InterlockedIncrement' [-Wimplicit-function-declaration]
InterlockedIncrement(&mutexp->nwaiters);
^
../src/mutex/mut_win32.c:248:13: warning: implicit declaration of function 'WaitForSingleObject' [-Wimplicit-function-declaration]
if ((ret = WaitForSingleObject(event, ms)) == WAIT_FAILED) {
^
../src/mutex/mut_win32.c:248:48: error: 'WAIT_FAILED' undeclared (first use in this function)
if ((ret = WaitForSingleObject(event, ms)) == WAIT_FAILED) {
^
../src/mutex/mut_win32.c:248:45: warning: comparison between pointer and integer
if ((ret = WaitForSingleObject(event, ms)) == WAIT_FAILED) {
^
../src/mutex/mut_win32.c:267:12: warning: comparison between pointer and integer
if (event != NULL) {
^
../src/mutex/mut_win32.c: In function '__db_win32_mutex_readlock_int':
../src/mutex/mut_win32.c:348:2: error: unknown type name 'HANDLE'
HANDLE event;
^
../src/mutex/mut_win32.c:375:8: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
event = NULL;
^
In file included from ../src/dbinc/mutex_int.h:12:0,
from ../src/dbinc/mutex.h:15,
from ./db_int.h:1165,
from ../src/mutex/mut_win32.c:12:
../src/dbinc/atomic.h:124:31: error: 'interlocked_val' undeclared (first use in this function)
(InterlockedCompareExchange((interlocked_val)(&(p)->value), \
^
../src/mutex/mut_win32.c:410:15: note: in expansion of macro 'atomic_compare_exchange'
} else if (!atomic_compare_exchange(env, &mutexp->sharecount,
^
../src/dbinc/atomic.h:124:30: error: called object is not a function or function pointer
(InterlockedCompareExchange((interlocked_val)(&(p)->value), \
^
../src/mutex/mut_win32.c:410:15: note: in expansion of macro 'atomic_compare_exchange'
} else if (!atomic_compare_exchange(env, &mutexp->sharecount,
^
../src/mutex/mut_win32.c:430:13: warning: comparison between pointer and integer
if (event == NULL)
^
../src/mutex/mut_win32.c:435:13: warning: comparison between pointer and integer
if (event != NULL) {
^
../src/mutex/mut_win32.c:469:12: warning: comparison between pointer and integer
if (event == NULL) {
^
../src/mutex/mut_win32.c:480:48: error: 'WAIT_FAILED' undeclared (first use in this function)
if ((ret = WaitForSingleObject(event, ms)) == WAIT_FAILED) {
^
../src/mutex/mut_win32.c:480:45: warning: comparison between pointer and integer
if ((ret = WaitForSingleObject(event, ms)) == WAIT_FAILED) {
^
../src/mutex/mut_win32.c:502:12: warning: comparison between pointer and integer
if (event != NULL) {
^
../src/mutex/mut_win32.c: In function '__db_win32_mutex_unlock':
../src/mutex/mut_win32.c:561:2: error: unknown type name 'HANDLE'
HANDLE event;
^
../src/mutex/mut_win32.c:604:9: error: 'interlocked_val' undeclared (first use in this function)
(interlocked_val)(&atomic_read(
^
../src/mutex/mut_win32.c:604:8: error: called object is not a function or function pointer
(interlocked_val)(&atomic_read(
^
../src/mutex/mut_win32.c:614:29: error: called object is not a function or function pointer
if (InterlockedDecrement((interlocked_val)
^
In file included from ../src/dbinc/mutex.h:15:0,
from ./db_int.h:1165,
from ../src/mutex/mut_win32.c:12:
../src/dbinc/mutex_int.h:376:47: error: 'PLONG' undeclared (first use in this function)
#define MUTEX_UNSET(tsl) InterlockedExchange((PLONG)tsl, 0)
^
../src/mutex/mut_win32.c:631:3: note: in expansion of macro 'MUTEX_UNSET'
MUTEX_UNSET(&mutexp->tas);
^
../src/mutex/mut_win32.c:631:15: error: invalid operands to binary & (have 'int *' and 'int')
MUTEX_UNSET(&mutexp->tas);
^
../src/dbinc/mutex_int.h:376:53: note: in definition of macro 'MUTEX_UNSET'
#define MUTEX_UNSET(tsl) InterlockedExchange((PLONG)tsl, 0)
^
../src/mutex/mut_win32.c:644:8: warning: implicit declaration of function 'PulseEvent' [-Wimplicit-function-declaration]
if (!PulseEvent(event)) {
^
../src/mutex/mut_win32.c: In function 'db_env_set_win_security':
../src/mutex/mut_win32.c:686:2: error: unknown type name 'SECURITY_ATTRIBUTES'
SECURITY_ATTRIBUTES *sa;
^
Makefile:2265: recipe for target 'mut_win32.o' failed
make: *** [mut_win32.o] Error 1
seems this win_db.h has a lot of missing files referenced. and if i comment out the "missing" files on the #include lines, there's another error that comes up.
So any assistance with compiling the Berkeley DB would be appreciated. thanks