comparison Resources/mongoose-patch.diff @ 76:e2d68529605f

patch for mingw
author jodogne
date Mon, 17 Sep 2012 17:32:33 +0200
parents 3959d33612cc
children
comparison
equal deleted inserted replaced
75:8b1428915a46 76:e2d68529605f
1 --- mongoose/mongoose.c 2012-03-11 23:41:35.000000000 +0100 1 --- i/mongoose/mongoose.c 2012-03-11 23:41:35.000000000 +0100
2 +++ mongoose.c 2012-06-22 13:44:40.093202063 +0200 2 +++ mongoose.c 2012-09-17 17:32:01.000000000 +0200
3 @@ -3844,10 +3844,8 @@ 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 @@
4 } 16 }
5 17
6 static void discard_current_request_from_buffer(struct mg_connection *conn) { 18 static void discard_current_request_from_buffer(struct mg_connection *conn) {
7 - char *buffered; 19 - char *buffered;
8 int buffered_len, body_len; 20 int buffered_len, body_len;
9 21
10 - buffered = conn->buf + conn->request_len; 22 - buffered = conn->buf + conn->request_len;
11 buffered_len = conn->data_len - conn->request_len; 23 buffered_len = conn->data_len - conn->request_len;
12 assert(buffered_len >= 0); 24 assert(buffered_len >= 0);
13 25
14 @@ -4148,7 +4146,13 @@ 26 @@ -4148,7 +4147,13 @@
15 27
16 // Wait until mg_fini() stops 28 // Wait until mg_fini() stops
17 while (ctx->stop_flag != 2) { 29 while (ctx->stop_flag != 2) {
18 - (void) sleep(0); 30 - (void) sleep(0);
19 +#if defined(__linux) 31 +#if defined(__linux)