1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Build fixes for OSTRACE enhancements.

FossilOrigin-Name: f79c236fc537ecee1ea7448a3e3216a2415561a1
This commit is contained in:
mistachkin
2015-03-31 19:06:46 +00:00
parent 2c32ed7a58
commit d25675f897
7 changed files with 27 additions and 19 deletions

View File

@@ -25,6 +25,14 @@
*/
#include "os_win.h"
/*
** Is the OSTRACE macro defined to actually do something?
*/
#if (defined(SQLITE_DEBUG) && SQLITE_OS_WIN) || \
(defined(SQLITE_TEST) || defined(SQLITE_FORCE_OS_TRACE))
# define SQLITE_WIN32_HAS_OS_TRACE
#endif
/*
** Compiling and using WAL mode requires several APIs that are only
** available in Windows platforms based on the NT kernel.
@@ -2746,7 +2754,7 @@ static int winSync(sqlite3_file *id, int flags){
BOOL rc;
#endif
#if !defined(NDEBUG) || !defined(SQLITE_NO_SYNC) || \
(defined(SQLITE_TEST) && defined(SQLITE_DEBUG))
defined(SQLITE_WIN32_HAS_OS_TRACE)
/*
** Used when SQLITE_NO_SYNC is not defined and by the assert() and/or
** OSTRACE() macros.
@@ -3438,7 +3446,7 @@ struct winShm {
u8 hasMutex; /* True if holding the winShmNode mutex */
u16 sharedMask; /* Mask of shared locks held */
u16 exclMask; /* Mask of exclusive locks held */
#ifdef SQLITE_DEBUG
#if defined(SQLITE_DEBUG) || defined(SQLITE_WIN32_HAS_OS_TRACE)
u8 id; /* Id of this connection with its winShmNode */
#endif
};