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

Merge recent trunk changes, and especially the fix for the CREATE UNIQUE INDEX

problem of ticket [9a6daf340df99ba9].

FossilOrigin-Name: 5b50a8380b2b678c1646ff303e3696efc1d7d92c
This commit is contained in:
drh
2014-07-30 14:44:24 +00:00
8 changed files with 121 additions and 36 deletions

View File

@@ -1301,22 +1301,28 @@ DWORD sqlite3Win32Wait(HANDLE hObject){
#elif !defined(SQLITE_WIN32_HAS_WIDE)
# define osIsNT() (0)
#else
static int osIsNT(void){
if( sqlite3_os_type==0 ){
# define osIsNT() (sqlite3_win32_is_nt())
#endif
/*
** This function determines if the machine is running a version of Windows
** based on the NT kernel.
*/
int sqlite3_win32_is_nt(void){
if( sqlite3_os_type==0 ){
#if defined(NTDDI_VERSION) && NTDDI_VERSION >= NTDDI_WIN8
OSVERSIONINFOW sInfo;
sInfo.dwOSVersionInfoSize = sizeof(sInfo);
osGetVersionExW(&sInfo);
OSVERSIONINFOW sInfo;
sInfo.dwOSVersionInfoSize = sizeof(sInfo);
osGetVersionExW(&sInfo);
#else
OSVERSIONINFOA sInfo;
sInfo.dwOSVersionInfoSize = sizeof(sInfo);
osGetVersionExA(&sInfo);
OSVERSIONINFOA sInfo;
sInfo.dwOSVersionInfoSize = sizeof(sInfo);
osGetVersionExA(&sInfo);
#endif
sqlite3_os_type = sInfo.dwPlatformId==VER_PLATFORM_WIN32_NT ? 2 : 1;
}
return sqlite3_os_type==2;
sqlite3_os_type = (sInfo.dwPlatformId == VER_PLATFORM_WIN32_NT) ? 2 : 1;
}
#endif
return (sqlite3_os_type == 2);
}
#ifdef SQLITE_WIN32_MALLOC
/*