Avoid using the GetVersionEx functions if they are considered deprecated.
FossilOrigin-Name: afdca29966805ed0d49fd61a161eb3a3919b5963
This commit is contained in:
commit
e1b62513e4
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Add\sadditional\stest\scases\sfor\sskip-scan.
|
||||
D 2013-11-27T01:23:53.318
|
||||
C Avoid\susing\sthe\sGetVersionEx\sfunctions\sif\sthey\sare\sconsidered\sdeprecated.
|
||||
D 2013-11-27T04:00:32.164
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in e1a9b4258bbde53f5636f4e238c65b7e11459e2b
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
@ -206,7 +206,7 @@ F src/os.c b4ad71336fd96f97776f75587cd9e8218288f5be
|
||||
F src/os.h 4a46270a64e9193af4a0aaa3bc2c66dc07c29b3f
|
||||
F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04
|
||||
F src/os_unix.c 143624d9eabb3b997c59cf594e0d06c56edd43e9
|
||||
F src/os_win.c cb3f26205ea785a63ea5bdc21a9c9f9ae3972d0f
|
||||
F src/os_win.c 4323dd0bac4f7a7037fc4cf87fb4692d17f0b108
|
||||
F src/pager.c 2aa4444ffe86e9282d03bc349a4a5e49bd77c0e8
|
||||
F src/pager.h f094af9f6ececfaa8a1e93876905a4f34233fb0c
|
||||
F src/parse.y acee1a9958539e21263362b194594c5255ad2fca
|
||||
@ -1145,7 +1145,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381
|
||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
|
||||
F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
|
||||
P b408d788105efd007e3546f45d5dd15a5dc5688d
|
||||
R d4fd41c1f94c9f73ab9606b0e58d8a6b
|
||||
U drh
|
||||
Z 5fe0b4019eaac7439aed9d81168a0a2a
|
||||
P 1ae4915d4d08ee5ce526c04d1d0cda1078641793 0ea9e4722be10221c99cce5bc48d13c7b34e739f
|
||||
R 1408bb35546f8304605f0cd70b3a2cef
|
||||
U mistachkin
|
||||
Z 11a83dbec42d946c53dc2adfcd9de746
|
||||
|
@ -1 +1 @@
|
||||
1ae4915d4d08ee5ce526c04d1d0cda1078641793
|
||||
afdca29966805ed0d49fd61a161eb3a3919b5963
|
41
src/os_win.c
41
src/os_win.c
@ -59,6 +59,34 @@
|
||||
must be defined."
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Define the required Windows SDK version constants if they are not
|
||||
** already available.
|
||||
*/
|
||||
#ifndef NTDDI_WIN8
|
||||
# define NTDDI_WIN8 0x06020000
|
||||
#endif
|
||||
|
||||
#ifndef NTDDI_WINBLUE
|
||||
# define NTDDI_WINBLUE 0x06030000
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Check if the GetVersionEx[AW] functions should be considered deprecated
|
||||
** and avoid using them in that case. It should be noted here that if the
|
||||
** value of the SQLITE_WIN32_GETVERSIONEX pre-processor macro is zero
|
||||
** (whether via this block or via being manually specified), that implies
|
||||
** the underlying operating system will always be based on the Windows NT
|
||||
** Kernel.
|
||||
*/
|
||||
#ifndef SQLITE_WIN32_GETVERSIONEX
|
||||
# if defined(NTDDI_VERSION) && NTDDI_VERSION >= NTDDI_WINBLUE
|
||||
# define SQLITE_WIN32_GETVERSIONEX 0
|
||||
# else
|
||||
# define SQLITE_WIN32_GETVERSIONEX 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
** This constant should already be defined (in the "WinDef.h" SDK file).
|
||||
*/
|
||||
@ -694,7 +722,8 @@ static struct win_syscall {
|
||||
|
||||
#define osGetTickCount ((DWORD(WINAPI*)(VOID))aSyscall[33].pCurrent)
|
||||
|
||||
#if defined(SQLITE_WIN32_HAS_ANSI)
|
||||
#if defined(SQLITE_WIN32_HAS_ANSI) && defined(SQLITE_WIN32_GETVERSIONEX) && \
|
||||
SQLITE_WIN32_GETVERSIONEX
|
||||
{ "GetVersionExA", (SYSCALL)GetVersionExA, 0 },
|
||||
#else
|
||||
{ "GetVersionExA", (SYSCALL)0, 0 },
|
||||
@ -703,7 +732,8 @@ static struct win_syscall {
|
||||
#define osGetVersionExA ((BOOL(WINAPI*)( \
|
||||
LPOSVERSIONINFOA))aSyscall[34].pCurrent)
|
||||
|
||||
#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE)
|
||||
#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE) && \
|
||||
defined(SQLITE_WIN32_GETVERSIONEX) && SQLITE_WIN32_GETVERSIONEX
|
||||
{ "GetVersionExW", (SYSCALL)GetVersionExW, 0 },
|
||||
#else
|
||||
{ "GetVersionExW", (SYSCALL)0, 0 },
|
||||
@ -1260,11 +1290,10 @@ void sqlite3_win32_sleep(DWORD milliseconds){
|
||||
** WinNT/2K/XP so that we will know whether or not we can safely call
|
||||
** the LockFileEx() API.
|
||||
*/
|
||||
#ifndef NTDDI_WIN8
|
||||
# define NTDDI_WIN8 0x06020000
|
||||
#endif
|
||||
|
||||
#if SQLITE_OS_WINCE || SQLITE_OS_WINRT || !defined(SQLITE_WIN32_HAS_ANSI)
|
||||
#if !defined(SQLITE_WIN32_GETVERSIONEX) || !SQLITE_WIN32_GETVERSIONEX
|
||||
# define osIsNT() (1)
|
||||
#elif SQLITE_OS_WINCE || SQLITE_OS_WINRT || !defined(SQLITE_WIN32_HAS_ANSI)
|
||||
# define osIsNT() (1)
|
||||
#elif !defined(SQLITE_WIN32_HAS_WIDE)
|
||||
# define osIsNT() (0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user