mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-25 20:28:27 +00:00
Fixed mingw build error
This commit is contained in:
1 parent
ea68d7a705
commit
2c813f3e72
3 files changed
+28
-10
No files matched your search
+13
-4
@@ -18,6 +18,17 @@
|
||||
#define _CRT_RAND_S
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1700
|
||||
#define _WIN32_WINNT 0x0400 // Let vc98 pick up wincrypt.h
|
||||
#else
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#endif
|
||||
#endif
|
||||
#ifndef WINVER
|
||||
#define WINVER _WIN32_WINNT
|
||||
#endif
|
||||
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
@@ -45,6 +56,8 @@
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <winsock2.h> // fix missing macros and types
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1700
|
||||
#define __func__ ""
|
||||
typedef __int64 int64_t;
|
||||
@@ -66,13 +79,9 @@ typedef enum { false = 0, true = 1 } bool;
|
||||
|
||||
#include <process.h>
|
||||
#include <winerror.h>
|
||||
#include <winsock2.h> // fix missing macros and types
|
||||
|
||||
// For mg_random()
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1700
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x400 // Let vc98 pick up wincrypt.h
|
||||
#endif
|
||||
#include <wincrypt.h>
|
||||
#pragma comment(lib, "advapi32.lib")
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user