8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 10:00:38 +01:00

Fixed Windows build after recent Alex's changes

This commit is contained in:
hvlad 2012-11-03 10:55:16 +00:00
parent 450dac18a3
commit 4875c235a7
5 changed files with 15 additions and 10 deletions

View File

@ -137,6 +137,8 @@ struct event_t
#ifdef WIN_NT
#include <windows.h>
namespace Firebird {
struct FAST_MUTEX_SHARED_SECTION
{
SLONG fInitialized;
@ -272,7 +274,8 @@ public:
Firebird::AutoPtr<FileLock> mainLock;
#endif
#ifdef WIN_NT
struct mtx sh_mem_mutex;
struct mtx sh_mem_winMutex;
struct mtx* sh_mem_mutex;
#endif
#ifdef HAVE_SHARED_MUTEX_SECTION
struct mtx* sh_mem_mutex;
@ -368,10 +371,10 @@ public:
} // namespace Firebird
#ifdef WIN_NT
int ISC_mutex_init(struct mtx*, const TEXT*);
void ISC_mutex_fini(struct mtx*);
int ISC_mutex_lock(struct mtx*);
int ISC_mutex_unlock(struct mtx*);
int ISC_mutex_init(struct Firebird::mtx*, const TEXT*);
void ISC_mutex_fini(struct Firebird::mtx*);
int ISC_mutex_lock(struct Firebird::mtx*);
int ISC_mutex_unlock(struct Firebird::mtx*);
#endif
ULONG ISC_exception_post(ULONG, const TEXT*);

View File

@ -3346,7 +3346,7 @@ void SharedMemoryBase::mutexLock()
{
#if defined(WIN_NT)
int state = ISC_mutex_lock(&sh_mem_mutex);
int state = ISC_mutex_lock(sh_mem_mutex);
#elif defined(USE_FILELOCKS)
@ -3419,7 +3419,7 @@ bool SharedMemoryBase::mutexLockCond()
{
#if defined(WIN_NT)
return ISC_mutex_lock_cond(&sh_mem_mutex) == 0;
return ISC_mutex_lock_cond(sh_mem_mutex) == 0;
#elif defined(USE_FILELOCKS)
@ -3586,6 +3586,7 @@ SharedMemoryBase::~SharedMemoryBase()
#endif
#ifdef WIN_NT
Arg::StatusVector statusVector;
CloseHandle(sh_mem_interest);
if (!UnmapViewOfFile(sh_mem_header))
{

View File

@ -33,6 +33,7 @@
#include "../jrd/constants.h"
#include "../common/os/path_utils.h"
#include "../common/isc_proto.h"
#include "gen/iberror.h"
#include <direct.h>
#include <io.h> // isatty()

View File

@ -112,9 +112,9 @@ private:
Firebird::Semaphore m_cleanupSemaphore;
#ifdef WIN_NT
struct mtx m_mutex;
struct Firebird::mtx m_mutex;
#else
struct mtx* m_mutex;
struct Firebird::mtx* m_mutex;
#endif
bool m_sharedFileCreated;

View File

@ -80,7 +80,7 @@ private:
void lock();
void unlock();
struct mtx m_mutex;
struct Firebird::mtx m_mutex;
class Guard
{