Mercurial > hg > orthanc
annotate Resources/Patches/mongoose-patch.diff @ 655:93adc693cc60
fix mainline version
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 30 Oct 2013 11:56:28 +0100 |
parents | 0ef82ea18da0 |
children |
rev | line source |
---|---|
371
0ef82ea18da0
fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
1 --- /home/jodogne/Subversion/Orthanc/ThirdPartyDownloads/mongoose/mongoose.c 2012-03-11 23:41:35.000000000 +0100 |
0ef82ea18da0
fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
2 +++ mongoose.c 2013-03-07 10:07:00.566266153 +0100 |
76 | 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() | |
371
0ef82ea18da0
fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
15 @@ -253,6 +254,14 @@ |
0ef82ea18da0
fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
16 #define MSG_NOSIGNAL 0 |
0ef82ea18da0
fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
17 #endif |
0ef82ea18da0
fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
18 |
0ef82ea18da0
fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
19 +#if __gnu_hurd__ == 1 |
0ef82ea18da0
fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
20 +/** |
0ef82ea18da0
fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
21 + * There is no limit on the length on a path under GNU Hurd, so we set |
0ef82ea18da0
fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
22 + * it to an arbitrary constant. |
0ef82ea18da0
fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
23 + **/ |
0ef82ea18da0
fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
24 +#define PATH_MAX 4096 |
0ef82ea18da0
fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
25 +#endif |
0ef82ea18da0
fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
26 + |
0ef82ea18da0
fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
27 typedef void * (*mg_thread_func_t)(void *); |
0ef82ea18da0
fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
28 |
0ef82ea18da0
fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
29 static const char *http_500_error = "Internal Server Error"; |
0ef82ea18da0
fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
30 @@ -3844,10 +3853,8 @@ |
0 | 31 } |
32 | |
33 static void discard_current_request_from_buffer(struct mg_connection *conn) { | |
34 - char *buffered; | |
35 int buffered_len, body_len; | |
36 | |
37 - buffered = conn->buf + conn->request_len; | |
38 buffered_len = conn->data_len - conn->request_len; | |
39 assert(buffered_len >= 0); | |
40 | |
371
0ef82ea18da0
fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
41 @@ -4148,7 +4155,13 @@ |
0 | 42 |
43 // Wait until mg_fini() stops | |
44 while (ctx->stop_flag != 2) { | |
45 +#if defined(__linux) | |
46 + usleep(100000); | |
47 +#elif defined(_WIN32) | |
48 + Sleep(100); | |
49 +#else | |
371
0ef82ea18da0
fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
102
diff
changeset
|
50 (void) sleep(0); |
0 | 51 +#endif |
52 } | |
53 free_context(ctx); | |
54 |