diff options
author | dan <Dan Kennedy> | 2024-12-04 18:27:13 +0000 |
---|---|---|
committer | dan <Dan Kennedy> | 2024-12-04 18:27:13 +0000 |
commit | 093c21342c9dc73e2c0c2f46569fd83ba47c9cfe (patch) | |
tree | 57a394ec6f14b548defccf64ee5480c5e9764980 /src | |
parent | 23498de7bee3032e6d9f63ed120d5b26848bd290 (diff) | |
download | sqlite-093c21342c9dc73e2c0c2f46569fd83ba47c9cfe.tar.gz sqlite-093c21342c9dc73e2c0c2f46569fd83ba47c9cfe.zip |
Assume an NT-based OS when running tests if sqlite_os_type is not set.
FossilOrigin-Name: 22e4aeded0a6a691fc7026f3cd90836a289dfc994269f8576d01e28fa478902b
Diffstat (limited to 'src')
-rw-r--r-- | src/os_win.c | 9 | ||||
-rw-r--r-- | src/test_config.c | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/os_win.c b/src/os_win.c index c042ac162..739be79b5 100644 --- a/src/os_win.c +++ b/src/os_win.c @@ -1456,10 +1456,9 @@ int sqlite3_win32_is_nt(void){ } return osInterlockedCompareExchange(&sqlite3_os_type, 2, 2)==2; #elif SQLITE_TEST -#ifdef SQLITE_ENABLE_SETLK_TIMEOUT - return 1; -#endif - return osInterlockedCompareExchange(&sqlite3_os_type, 2, 2)==2; + return osInterlockedCompareExchange(&sqlite3_os_type, 2, 2)==2 + || osInterlockedCompareExchange(&sqlite3_os_type, 0, 0)==0 + ; #else /* ** NOTE: All sub-platforms where the GetVersionEx[AW] functions are @@ -4339,7 +4338,7 @@ static int winShmLock( int bExcl = ((flags & SQLITE_SHM_EXCLUSIVE) ? 1 : 0); int nMs = 0; #ifdef SQLITE_ENABLE_SETLK_TIMEOUT - nMs = pDbFd->iBusyTimeout + nMs = pDbFd->iBusyTimeout; #endif rc = winLockFileTimeout(p->hShm, ofst+WIN_SHM_BASE, n, bExcl, nMs); if( rc==SQLITE_OK ){ diff --git a/src/test_config.c b/src/test_config.c index 20d0faa50..6ad7a9075 100644 --- a/src/test_config.c +++ b/src/test_config.c @@ -88,7 +88,7 @@ static void set_options(Tcl_Interp *interp){ Tcl_SetVar2(interp, "sqlite_options", "win32malloc", "0", TCL_GLOBAL_ONLY); #endif -#ifdef SQLITE_OS_WINRT +#if defined(SQLITE_OS_WINRT) && SQLITE_OS_WINRT Tcl_SetVar2(interp, "sqlite_options", "winrt", "1", TCL_GLOBAL_ONLY); #else Tcl_SetVar2(interp, "sqlite_options", "winrt", "0", TCL_GLOBAL_ONLY); |