comparison OrthancFramework/Resources/Patches/mongoose-3.1-patch.diff @ 4044:d25f4c0fa160 framework

splitting code into OrthancFramework and OrthancServer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 10 Jun 2020 20:30:34 +0200
parents Resources/Patches/mongoose-3.1-patch.diff@4a8e8a96b233
children
comparison
equal deleted inserted replaced
4043:6c6239aec462 4044:d25f4c0fa160
1 --- /home/jodogne/Subversion/Orthanc/ThirdPartyDownloads/mongoose/mongoose.c 2012-03-11 23:41:35.000000000 +0100
2 +++ mongoose.c 2013-03-07 10:07:00.566266153 +0100
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 @@ -253,6 +254,14 @@
16 #define MSG_NOSIGNAL 0
17 #endif
18
19 +#if __gnu_hurd__ == 1
20 +/**
21 + * There is no limit on the length on a path under GNU Hurd, so we set
22 + * it to an arbitrary constant.
23 + **/
24 +#define PATH_MAX 4096
25 +#endif
26 +
27 typedef void * (*mg_thread_func_t)(void *);
28
29 static const char *http_500_error = "Internal Server Error";
30 @@ -3844,10 +3853,8 @@
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
41 @@ -4148,7 +4155,13 @@
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
50 (void) sleep(0);
51 +#endif
52 }
53 free_context(ctx);
54