mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
For sqlite3_win32_is_nt(), assume WinRT is NT-based.
FossilOrigin-Name: 2f59e71fbf31d2bd788d11197943b2ff3f4046e1
This commit is contained in:
15
src/os_win.c
15
src/os_win.c
@@ -1317,10 +1317,15 @@ void sqlite3_win32_sleep(DWORD milliseconds){
|
||||
** based on the NT kernel.
|
||||
*/
|
||||
int sqlite3_win32_is_nt(void){
|
||||
#if defined(SQLITE_WIN32_GETVERSIONEX) && SQLITE_WIN32_GETVERSIONEX
|
||||
#if SQLITE_OS_WINRT
|
||||
/*
|
||||
** NOTE: The WinRT sub-platform is always assumed to be based on the NT
|
||||
** kernel.
|
||||
*/
|
||||
return 1;
|
||||
#elif defined(SQLITE_WIN32_GETVERSIONEX) && SQLITE_WIN32_GETVERSIONEX
|
||||
if( osInterlockedCompareExchange(&sqlite3_os_type, 0, 0)==0 ){
|
||||
#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE) && \
|
||||
defined(NTDDI_VERSION) && NTDDI_VERSION >= NTDDI_WIN8
|
||||
#if defined(SQLITE_WIN32_HAS_WIDE)
|
||||
OSVERSIONINFOW sInfo;
|
||||
sInfo.dwOSVersionInfoSize = sizeof(sInfo);
|
||||
osGetVersionExW(&sInfo);
|
||||
@@ -1338,6 +1343,10 @@ int sqlite3_win32_is_nt(void){
|
||||
#elif SQLITE_TEST
|
||||
return osInterlockedCompareExchange(&sqlite3_os_type, 2, 2)==2;
|
||||
#else
|
||||
/*
|
||||
** NOTE: All sub-platforms where the GetVersionEx[AW] functions are
|
||||
** deprecated are always assumed to be based on the NT kernel.
|
||||
*/
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user