mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-24 11:54:49 +00:00
Fix build
This commit is contained in:
1 parent
2a3492766f
commit
fb0a9bc7e3
11 files changed
+22
-16
No files matched your search
@@ -30,6 +30,9 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#define MG_INT64_FMT "%" PRId64
|
||||
|
||||
#ifndef MG_ENABLE_DIRLIST
|
||||
#define MG_ENABLE_DIRLIST 1
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+3
-1
@@ -49,6 +49,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
|
||||
@@ -82,8 +83,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) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "arch.h"
|
||||
#include "config.h"
|
||||
|
||||
enum { MG_FS_READ = 1, MG_FS_WRITE = 2, MG_FS_DIR = 4 };
|
||||
|
||||
|
||||
+1
-4
@@ -185,11 +185,8 @@ static size_t p_seek(void *fp, size_t offset) {
|
||||
#endif
|
||||
return (size_t) ftell((FILE *) fp);
|
||||
}
|
||||
|
||||
#else
|
||||
static char *p_realpath(const char *path, char *resolved_path) {
|
||||
(void) path, (void) resolved_path;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int p_stat(const char *path, size_t *size, time_t *mtime) {
|
||||
(void) path, (void) size, (void) mtime;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "arch.h"
|
||||
#include "config.h"
|
||||
#include "fs.h"
|
||||
#include "net.h"
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#include "config.h" // Must go first - important for test++
|
||||
|
||||
#include "util.h"
|
||||
|
||||
#if MG_ARCH == MG_ARCH_UNIX && defined(__APPLE__)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "arch.h"
|
||||
#include "config.h"
|
||||
#include "str.h"
|
||||
|
||||
char *mg_file_read(const char *path, size_t *size);
|
||||
|
||||
Reference in new issue
Block a user