annotate OrthancFramework/Resources/Patches/mongoose-3.1-patch.diff @ 4403:ad646ff506d0

cont openapi
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 23 Dec 2020 18:32:13 +0100
parents d25f4c0fa160
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
e2d68529605f patch for mingw
jodogne
parents: 0
diff changeset
3 @@ -92,8 +92,9 @@
3373
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
4 #define strtoll(x, y, z) strtol(x, y, z)
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
5 #else
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
6 #define __func__ __FUNCTION__
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
7 -#define strtoull(x, y, z) _strtoui64(x, y, z)
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
8 -#define strtoll(x, y, z) _strtoi64(x, y, z)
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
9 +#include <stdlib.h>
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
10 +//#define strtoull(x, y, z) _strtoui64(x, y, z)
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
11 +//#define strtoll(x, y, z) _strtoi64(x, y, z)
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
12 #endif // _MSC_VER
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
13
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
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 @@
3373
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
16 #define MSG_NOSIGNAL 0
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
17 #endif
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
18
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
19 +#if __gnu_hurd__ == 1
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
20 +/**
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
21 + * There is no limit on the length on a path under GNU Hurd, so we set
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
22 + * it to an arbitrary constant.
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
23 + **/
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
24 +#define PATH_MAX 4096
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
25 +#endif
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
26 +
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
27 typedef void * (*mg_thread_func_t)(void *);
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
28
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
29 static const char *http_500_error = "Internal Server Error";
371
0ef82ea18da0 fix attempts for Debian/Hurd and Debian/kFreeBSD
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 102
diff changeset
30 @@ -3844,10 +3853,8 @@
3373
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
31 }
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
32
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
33 static void discard_current_request_from_buffer(struct mg_connection *conn) {
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
34 - char *buffered;
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
35 int buffered_len, body_len;
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
36
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
37 - buffered = conn->buf + conn->request_len;
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
38 buffered_len = conn->data_len - conn->request_len;
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
39 assert(buffered_len >= 0);
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
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 @@
3373
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
42
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
43 // Wait until mg_fini() stops
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
44 while (ctx->stop_flag != 2) {
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
45 +#if defined(__linux__)
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
46 + usleep(100000);
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
47 +#elif defined(_WIN32)
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
48 + Sleep(100);
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
49 +#else
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
50 (void) sleep(0);
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
51 +#endif
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
52 }
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
53 free_context(ctx);
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 1976
diff changeset
54