From dfa92fba23a35ab87b3bab0cfec53bec5678dde2 Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Thu, 6 May 2010 13:58:26 +0000 Subject: [PATCH] Fixed windows build - thanks to Paul Reeves --- src/jrd/pwd.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/jrd/pwd.cpp b/src/jrd/pwd.cpp index 313c2635e3..248780b3e5 100644 --- a/src/jrd/pwd.cpp +++ b/src/jrd/pwd.cpp @@ -225,6 +225,7 @@ namespace { void SecurityDatabase::fini() { +#ifndef EMBEDDED MutexLockGuard guard(mutex); if (server_shutdown) @@ -238,10 +239,12 @@ void SecurityDatabase::fini() { closeDatabase(); } +#endif //EMBEDDED } void SecurityDatabase::init() { +#ifndef EMBEDDED MutexLockGuard guard(mutex); if (server_shutdown) @@ -256,10 +259,12 @@ void SecurityDatabase::init() status_exception::raise(status); } } +#endif //EMBEDDED } void SecurityDatabase::closeDatabase() { +#ifndef EMBEDDED // assumes mutex is locked if (lookup_req) @@ -273,10 +278,12 @@ void SecurityDatabase::closeDatabase() isc_detach_database(status, &lookup_db); checkStatus("isc_detach_database"); } +#endif //EMBEDDED } void SecurityDatabase::onShutdown() { +#ifndef EMBEDDED MutexLockGuard guard(mutex); if (server_shutdown) @@ -286,6 +293,7 @@ void SecurityDatabase::onShutdown() server_shutdown = true; closeDatabase(); +#endif //EMBEDDED } bool SecurityDatabase::lookupUser(const TEXT* user_name, int* uid, int* gid, TEXT* pwd) @@ -397,17 +405,23 @@ void SecurityDatabase::prepare() void SecurityDatabase::initialize() { +#ifndef EMBEDDED instance->init(); +#endif //EMBEDDED } void SecurityDatabase::shutdown() { +#ifndef EMBEDDED instance->fini(); +#endif //EMBEDDED } int SecurityDatabase::onShutdown(const int, const int, void* me) { +#ifndef EMBEDDED ((SecurityDatabase*) me)->onShutdown(); +#endif //EMBEDDED return FB_SUCCESS; }