diff options
Diffstat (limited to 'src/os_win.c')
-rw-r--r-- | src/os_win.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/os_win.c b/src/os_win.c index e685e20fa..acb06c69e 100644 --- a/src/os_win.c +++ b/src/os_win.c @@ -26,6 +26,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 }; |