mirror of
https://github.com/isar/libmdbx.git
synced 2025-10-30 03:08:57 +08:00
mdbx-cmake: #if/#endif instead of cmake-conditions for posix/windows sources.
Change-Id: Ic95bd3ba345160cf1d68c79f11d6560d4c41cb2b
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
|
||||
#if !(defined(_WIN32) || defined(_WIN64)) /* !Windows LCK-implementation */
|
||||
|
||||
#include "internals.h"
|
||||
#include <sys/sem.h>
|
||||
|
||||
@@ -803,3 +805,10 @@ void mdbx_txn_unlock(MDBX_env *env) {
|
||||
mdbx_panic("%s() failed: err %d\n", __func__, rc);
|
||||
mdbx_jitter4testing(true);
|
||||
}
|
||||
|
||||
#else
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4206) /* nonstandard extension used: translation \
|
||||
unit is empty */
|
||||
#endif /* _MSC_VER (warnings) */
|
||||
#endif /* !Windows LCK-implementation */
|
||||
|
||||
@@ -12,17 +12,15 @@
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
|
||||
#include "internals.h"
|
||||
#if defined(_WIN32) || defined(_WIN64) /* Windows LCK-implementation */
|
||||
|
||||
/* PREAMBLE FOR WINDOWS:
|
||||
*
|
||||
* We are not concerned for performance here.
|
||||
* If you are running Windows a performance could NOT be the goal.
|
||||
* Otherwise please use Linux.
|
||||
*
|
||||
* Regards,
|
||||
* LY
|
||||
*/
|
||||
* Otherwise please use Linux. */
|
||||
|
||||
#include "internals.h"
|
||||
|
||||
static void mdbx_winnt_import(void);
|
||||
|
||||
@@ -799,3 +797,5 @@ static void mdbx_winnt_import(void) {
|
||||
mdbx_srwlock_ReleaseExclusive = stub_srwlock_ReleaseExclusive;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* Windows LCK-implementation */
|
||||
|
||||
Reference in New Issue
Block a user