Bug 1369361 - Backport SQLite fix removing rand_s() in an attempt to avoid Lenovo DLL crashes. r=mak

SQLite check-in 3a2793aa:
https://www.sqlite.org/src/info/3a2793aa65727cbb

MozReview-Commit-ID: 1Q4tGhWLoRu

--HG--
extra : rebase_source : 2513fc52ba46c69a49d41546247c3d61bf852aa2
This commit is contained in:
Chris Peterson 2017-09-12 12:58:59 -07:00
parent 07f69fd053
commit 1e8cda55bd

View File

@ -827,13 +827,6 @@ SQLITE_PRIVATE const char **sqlite3CompileOptions(int *pnOpt){
# define SQLITE_TCLAPI
#endif
/*
** Make sure that rand_s() is available on Windows systems with MSVC 2005
** or higher.
*/
#if defined(_MSC_VER) && _MSC_VER>=1400
# define _CRT_RAND_S
#endif
/*
** Include the header file used to customize the compiler options for MSVC.
@ -43927,9 +43920,6 @@ static int winRandomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
EntropyGatherer e;
UNUSED_PARAMETER(pVfs);
memset(zBuf, 0, nBuf);
#if defined(_MSC_VER) && _MSC_VER>=1400 && !SQLITE_OS_WINCE
rand_s((unsigned int*)zBuf); /* rand_s() is not available with MinGW */
#endif /* defined(_MSC_VER) && _MSC_VER>=1400 */
e.a = (unsigned char*)zBuf;
e.na = nBuf;
e.nXor = 0;