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

Revise compiler checks for the rand_s() function.

FossilOrigin-Name: 287f508dd6abc1b9ffdbec6a685ebe79eeac992b
This commit is contained in:
mistachkin
2016-02-15 22:01:24 +00:00
parent 51d5ed97f5
commit bfc9b3f45c
5 changed files with 104 additions and 97 deletions

View File

@@ -5424,8 +5424,8 @@ static int winRandomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
EntropyGatherer e;
UNUSED_PARAMETER(pVfs);
memset(zBuf, 0, nBuf);
#ifdef _MSC_VER
rand_s((int*)zBuf); /* rand_s() is not available with MinGW */
#if defined(_MSC_VER) && _MSC_VER>=1400
rand_s((int*)zBuf); /* rand_s() is not available with MinGW */
#endif
e.a = (unsigned char*)zBuf;
e.na = nBuf;