Fix build

This commit is contained in:
Sergey Lyubka committed 2021-12-21 18:16:12 +00:00
1 parent 2a3492766f
commit fb0a9bc7e3
11 files changed
+22 -16

No files matched your search

+9 -1
View File
@@ -330,7 +330,10 @@ struct timeval {
#include <unistd.h>
#define MG_INT64_FMT "%" PRId64
#ifndef MG_ENABLE_DIRLIST
#define MG_ENABLE_DIRLIST 1
#endif
#endif
@@ -384,6 +387,7 @@ typedef enum { false = 0, true = 1 } bool;
// Protect from calls like std::snprintf in app code
// See https://github.com/cesanta/mongoose/issues/1047
#ifndef __cplusplus
#define sleep(x) Sleep(x)
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#ifndef strdup // For MSVC with _DEBUG, see #1359
@@ -417,8 +421,9 @@ typedef int socklen_t;
#define MG_INT64_FMT "%I64d"
#undef MG_ENABLE_DIRLIST
#ifndef MG_ENABLE_DIRLIST
#define MG_ENABLE_DIRLIST 1
#endif
// https://lgtm.com/rules/2154840805/ -gmtime, localtime, ctime and asctime
static __inline struct tm *gmtime_r(time_t *t, struct tm *tm) {
@@ -598,6 +603,7 @@ void mg_timer_poll(unsigned long current_time_ms);
char *mg_file_read(const char *path, size_t *size);
bool mg_file_write(const char *path, const void *buf, size_t len);
bool mg_file_printf(const char *path, const char *fmt, ...);
@@ -664,6 +670,7 @@ unsigned long mg_millis(void);
enum { MG_FS_READ = 1, MG_FS_WRITE = 2, MG_FS_DIR = 4 };
// Filesystem API functions
@@ -860,6 +867,7 @@ void mg_mgr_wakeup(struct mg_connection *pipe);
struct mg_http_header {
struct mg_str name; // Header name
struct mg_str value; // Header value