76
|
1 --- i/mongoose/mongoose.c 2012-03-11 23:41:35.000000000 +0100
|
|
2 +++ mongoose.c 2012-09-17 17:32:01.000000000 +0200
|
|
3 @@ -92,8 +92,9 @@
|
|
4 #define strtoll(x, y, z) strtol(x, y, z)
|
|
5 #else
|
|
6 #define __func__ __FUNCTION__
|
|
7 -#define strtoull(x, y, z) _strtoui64(x, y, z)
|
|
8 -#define strtoll(x, y, z) _strtoi64(x, y, z)
|
|
9 +#include <stdlib.h>
|
|
10 +//#define strtoull(x, y, z) _strtoui64(x, y, z)
|
|
11 +//#define strtoll(x, y, z) _strtoi64(x, y, z)
|
|
12 #endif // _MSC_VER
|
|
13
|
|
14 #define ERRNO GetLastError()
|
|
15 @@ -3844,10 +3845,8 @@
|
0
|
16 }
|
|
17
|
|
18 static void discard_current_request_from_buffer(struct mg_connection *conn) {
|
|
19 - char *buffered;
|
|
20 int buffered_len, body_len;
|
|
21
|
|
22 - buffered = conn->buf + conn->request_len;
|
|
23 buffered_len = conn->data_len - conn->request_len;
|
|
24 assert(buffered_len >= 0);
|
|
25
|
76
|
26 @@ -4148,7 +4147,13 @@
|
0
|
27
|
|
28 // Wait until mg_fini() stops
|
|
29 while (ctx->stop_flag != 2) {
|
|
30 - (void) sleep(0);
|
|
31 +#if defined(__linux)
|
|
32 + usleep(100000);
|
|
33 +#elif defined(_WIN32)
|
|
34 + Sleep(100);
|
|
35 +#else
|
|
36 +#error Support your platform here
|
|
37 +#endif
|
|
38 }
|
|
39 free_context(ctx);
|
|
40
|