annotate Resources/Patches/mongoose-patch.diff @ 138:f333c0398f6e

some hiding
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 10 Oct 2012 16:53:03 +0200
parents 7593b57dc1bf
children 0ef82ea18da0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
76
e2d68529605f patch for mingw
jodogne
parents: 0
diff changeset
1 --- i/mongoose/mongoose.c 2012-03-11 23:41:35.000000000 +0100
e2d68529605f patch for mingw
jodogne
parents: 0
diff changeset
2 +++ mongoose.c 2012-09-17 17:32:01.000000000 +0200
e2d68529605f patch for mingw
jodogne
parents: 0
diff changeset
3 @@ -92,8 +92,9 @@
e2d68529605f patch for mingw
jodogne
parents: 0
diff changeset
4 #define strtoll(x, y, z) strtol(x, y, z)
e2d68529605f patch for mingw
jodogne
parents: 0
diff changeset
5 #else
e2d68529605f patch for mingw
jodogne
parents: 0
diff changeset
6 #define __func__ __FUNCTION__
e2d68529605f patch for mingw
jodogne
parents: 0
diff changeset
7 -#define strtoull(x, y, z) _strtoui64(x, y, z)
e2d68529605f patch for mingw
jodogne
parents: 0
diff changeset
8 -#define strtoll(x, y, z) _strtoi64(x, y, z)
e2d68529605f patch for mingw
jodogne
parents: 0
diff changeset
9 +#include <stdlib.h>
e2d68529605f patch for mingw
jodogne
parents: 0
diff changeset
10 +//#define strtoull(x, y, z) _strtoui64(x, y, z)
e2d68529605f patch for mingw
jodogne
parents: 0
diff changeset
11 +//#define strtoll(x, y, z) _strtoi64(x, y, z)
e2d68529605f patch for mingw
jodogne
parents: 0
diff changeset
12 #endif // _MSC_VER
e2d68529605f patch for mingw
jodogne
parents: 0
diff changeset
13
e2d68529605f patch for mingw
jodogne
parents: 0
diff changeset
14 #define ERRNO GetLastError()
e2d68529605f patch for mingw
jodogne
parents: 0
diff changeset
15 @@ -3844,10 +3845,8 @@
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 static void discard_current_request_from_buffer(struct mg_connection *conn) {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 - char *buffered;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 int buffered_len, body_len;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 - buffered = conn->buf + conn->request_len;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 buffered_len = conn->data_len - conn->request_len;
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 assert(buffered_len >= 0);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
76
e2d68529605f patch for mingw
jodogne
parents: 0
diff changeset
26 @@ -4148,7 +4147,13 @@
0
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 // Wait until mg_fini() stops
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 while (ctx->stop_flag != 2) {
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 - (void) sleep(0);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 +#if defined(__linux)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 + usleep(100000);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 +#elif defined(_WIN32)
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 + Sleep(100);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 +#else
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 +#error Support your platform here
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 +#endif
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 }
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 free_context(ctx);
3959d33612cc initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40