mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-18 19:31:02 +00:00
Make mjs & frozen vc98 & vc2017 friendly
PUBLISHED_FROM=7cde8b374d5e318b5cdd69fc5b4de86b2a9552f5
This commit is contained in:
1 parent
6e50fe4475
commit
00d1d2c0e7
2 files changed
+32
-3
No files matched your search
+18
-1
@@ -210,6 +210,12 @@
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
|
||||
#if _MSC_VER < 1700
|
||||
typedef int bool;
|
||||
#else
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1800
|
||||
#define strdup _strdup
|
||||
#endif
|
||||
@@ -323,9 +329,16 @@ typedef struct _stati64 cs_stat_t;
|
||||
#define MG_NET_IF MG_NET_IF_SOCKET
|
||||
#endif
|
||||
|
||||
int rmdir(const char *dirname);
|
||||
unsigned int sleep(unsigned int seconds);
|
||||
|
||||
/* https://stackoverflow.com/questions/16647819/timegm-cross-platform */
|
||||
#define timegm _mkgmtime
|
||||
|
||||
#define gmtime_r(a, b) \
|
||||
do { \
|
||||
*(b) = *gmtime(a); \
|
||||
} while (0)
|
||||
|
||||
#endif /* CS_PLATFORM == CS_P_WINDOWS */
|
||||
#endif /* CS_COMMON_PLATFORMS_PLATFORM_WINDOWS_H_ */
|
||||
#ifdef MG_MODULE_LINES
|
||||
@@ -374,6 +387,7 @@ unsigned int sleep(unsigned int seconds);
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -493,6 +507,7 @@ typedef struct stat cs_stat_t;
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include <machine/endian.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -536,6 +551,7 @@ typedef struct stat cs_stat_t;
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include <machine/endian.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
@@ -642,6 +658,7 @@ int inet_pton(int af, const char *src, void *dst);
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
Reference in new issue
Block a user