From: mistachkin Date: Sat, 31 Aug 2013 17:01:56 +0000 (+0000) Subject: Enhancements to the Win32 API definition macros. X-Git-Tag: version-3.8.1~106^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=28159a5ee99e55a0f10fb8497a5122112d893222;p=thirdparty%2Fsqlite.git Enhancements to the Win32 API definition macros. FossilOrigin-Name: b1811baab6e35ecb1ba920a7ed3302997758d309 --- diff --git a/manifest b/manifest index 2863afe545..c62353483b 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Avoid\scommenting\sout\s#include\sstatements\swhen\sbuilding\sthe\samalgamation\ssource\scode\sfile. -D 2013-08-31T05:46:42.494 +C Enhancements\sto\sthe\sWin32\sAPI\sdefinition\smacros. +D 2013-08-31T17:01:56.739 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -203,7 +203,7 @@ F src/os.c b4ad71336fd96f97776f75587cd9e8218288f5be F src/os.h 4a46270a64e9193af4a0aaa3bc2c66dc07c29b3f F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04 F src/os_unix.c 243fb37f47dc072fc59839ea241ff0a17c8d76e6 -F src/os_win.c 27ab5a2236e0649bcaa246b5ce80b7289ab31688 +F src/os_win.c 896581ee5a2ad261c3410fc84cfb0639ef2a1d56 F src/pager.c 2aa4444ffe86e9282d03bc349a4a5e49bd77c0e8 F src/pager.h f094af9f6ececfaa8a1e93876905a4f34233fb0c F src/parse.y 27c6b4138497d6f8360ba7847da6ed48033f957f @@ -1109,7 +1109,7 @@ F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac -P b48cfd2dfca70091a52deeeee16619237e1c270b -R b57559fe8be860201c533ce843be8c05 +P 2fca6d784b000fd3a4d6890e38a0b087767f3a7f +R 81d5e6e46adbe46f943b02ea53b00aff U mistachkin -Z 5c7a5afeef353865f26e419014385170 +Z 8550f042a6eaddfa936a0e87c6856786 diff --git a/manifest.uuid b/manifest.uuid index 895cd83cdf..64c97df68b 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -2fca6d784b000fd3a4d6890e38a0b087767f3a7f \ No newline at end of file +b1811baab6e35ecb1ba920a7ed3302997758d309 \ No newline at end of file diff --git a/src/os_win.c b/src/os_win.c index 81265a070e..34b5834eb8 100644 --- a/src/os_win.c +++ b/src/os_win.c @@ -38,7 +38,7 @@ ** Are most of the Win32 ANSI APIs available (i.e. with certain exceptions ** based on the sub-platform)? */ -#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT +#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && !defined(SQLITE_WIN32_NO_ANSI) # define SQLITE_WIN32_HAS_ANSI #endif @@ -46,10 +46,19 @@ ** Are most of the Win32 Unicode APIs available (i.e. with certain exceptions ** based on the sub-platform)? */ -#if SQLITE_OS_WINCE || SQLITE_OS_WINNT || SQLITE_OS_WINRT +#if (SQLITE_OS_WINCE || SQLITE_OS_WINNT || SQLITE_OS_WINRT) && \ + !defined(SQLITE_WIN32_NO_WIDE) # define SQLITE_WIN32_HAS_WIDE #endif +/* +** Make sure at least one set of Win32 APIs is available. +*/ +#if !defined(SQLITE_WIN32_HAS_ANSI) && !defined(SQLITE_WIN32_HAS_WIDE) +# error "At least one of SQLITE_WIN32_HAS_ANSI and SQLITE_WIN32_HAS_WIDE\ + must be defined." +#endif + /* ** Maximum pathname length (in chars) for Win32. This should normally be ** MAX_PATH. @@ -1116,7 +1125,7 @@ void sqlite3_win32_sleep(DWORD milliseconds){ ** WinNT/2K/XP so that we will know whether or not we can safely call ** the LockFileEx() API. */ -#if SQLITE_OS_WINCE || SQLITE_OS_WINRT +#if SQLITE_OS_WINCE || SQLITE_OS_WINRT || !defined(SQLITE_WIN32_HAS_ANSI) # define osIsNT() (1) #elif !defined(SQLITE_WIN32_HAS_WIDE) # define osIsNT() (0)