mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-01 13:10:43 +00:00
Merge pull request #2933 from cesanta/win_rng
Windows: added alternative to bcrypt lib
This commit is contained in:
4 files changed
+26
-26
No files matched your search
+4
-5
@@ -415,6 +415,10 @@ static inline int mg_mkdir(const char *path, mode_t mode) {
|
||||
|
||||
#if MG_ARCH == MG_ARCH_WIN32
|
||||
|
||||
#ifndef _CRT_RAND_S
|
||||
#define _CRT_RAND_S
|
||||
#endif
|
||||
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
@@ -470,11 +474,6 @@ typedef enum { false = 0, true = 1 } bool;
|
||||
#endif
|
||||
#include <wincrypt.h>
|
||||
#pragma comment(lib, "advapi32.lib")
|
||||
#else
|
||||
#include <bcrypt.h>
|
||||
#if defined(_MSC_VER)
|
||||
#pragma comment(lib, "bcrypt.lib")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Protect from calls like std::snprintf in app code
|
||||
|
||||
Reference in new issue
Block a user