diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-10-25 22:52:53 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-10-25 22:52:53 +0300 |
commit | 8cb26daea6f14cf93a8cdf715b8ed823cf298f64 (patch) | |
tree | 3fda644f9abdceb75a8fa36c8615da34adf09fa9 /src | |
parent | 01fec59041241ccc8510790c929094262ba8454c (diff) | |
download | libmicrohttpd-8cb26daea6f14cf93a8cdf715b8ed823cf298f64.tar.gz libmicrohttpd-8cb26daea6f14cf93a8cdf715b8ed823cf298f64.zip |
Fixed conflict with system CPU_COUNT macro
Diffstat (limited to 'src')
30 files changed, 169 insertions, 157 deletions
diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am index 1f0a65af..cb101cf9 100644 --- a/src/examples/Makefile.am +++ b/src/examples/Makefile.am | |||
@@ -7,7 +7,7 @@ AM_CPPFLAGS = \ | |||
7 | 7 | ||
8 | AM_CFLAGS = @LIBGCRYPT_CFLAGS@ | 8 | AM_CFLAGS = @LIBGCRYPT_CFLAGS@ |
9 | 9 | ||
10 | CPU_COUNT_DEF = -DCPU_COUNT=$(CPU_COUNT) | 10 | MHD_CPU_COUNT_DEF = -DMHD_CPU_COUNT=$(CPU_COUNT) |
11 | 11 | ||
12 | if USE_COVERAGE | 12 | if USE_COVERAGE |
13 | AM_CFLAGS += --coverage | 13 | AM_CFLAGS += --coverage |
@@ -128,7 +128,7 @@ demo_SOURCES = \ | |||
128 | demo_CFLAGS = \ | 128 | demo_CFLAGS = \ |
129 | $(PTHREAD_CFLAGS) $(AM_CFLAGS) | 129 | $(PTHREAD_CFLAGS) $(AM_CFLAGS) |
130 | demo_CPPFLAGS = \ | 130 | demo_CPPFLAGS = \ |
131 | $(AM_CPPFLAGS) $(CPU_COUNT_DEF) | 131 | $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF) |
132 | demo_LDADD = \ | 132 | demo_LDADD = \ |
133 | $(top_builddir)/src/microhttpd/libmicrohttpd.la \ | 133 | $(top_builddir)/src/microhttpd/libmicrohttpd.la \ |
134 | $(PTHREAD_LIBS) | 134 | $(PTHREAD_LIBS) |
@@ -141,7 +141,7 @@ demo_https_SOURCES = \ | |||
141 | demo_https_CFLAGS = \ | 141 | demo_https_CFLAGS = \ |
142 | $(PTHREAD_CFLAGS) $(AM_CFLAGS) | 142 | $(PTHREAD_CFLAGS) $(AM_CFLAGS) |
143 | demo_https_CPPFLAGS = \ | 143 | demo_https_CPPFLAGS = \ |
144 | $(AM_CPPFLAGS) $(CPU_COUNT_DEF) | 144 | $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF) |
145 | demo_https_LDADD = \ | 145 | demo_https_LDADD = \ |
146 | $(top_builddir)/src/microhttpd/libmicrohttpd.la \ | 146 | $(top_builddir)/src/microhttpd/libmicrohttpd.la \ |
147 | $(PTHREAD_LIBS) | 147 | $(PTHREAD_LIBS) |
@@ -152,21 +152,21 @@ endif | |||
152 | benchmark_SOURCES = \ | 152 | benchmark_SOURCES = \ |
153 | benchmark.c | 153 | benchmark.c |
154 | benchmark_CPPFLAGS = \ | 154 | benchmark_CPPFLAGS = \ |
155 | $(AM_CPPFLAGS) $(CPU_COUNT_DEF) | 155 | $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF) |
156 | benchmark_LDADD = \ | 156 | benchmark_LDADD = \ |
157 | $(top_builddir)/src/microhttpd/libmicrohttpd.la | 157 | $(top_builddir)/src/microhttpd/libmicrohttpd.la |
158 | 158 | ||
159 | suspend_resume_epoll_SOURCES = \ | 159 | suspend_resume_epoll_SOURCES = \ |
160 | suspend_resume_epoll.c | 160 | suspend_resume_epoll.c |
161 | suspend_resume_epoll_CPPFLAGS = \ | 161 | suspend_resume_epoll_CPPFLAGS = \ |
162 | $(AM_CPPFLAGS) $(CPU_COUNT_DEF) | 162 | $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF) |
163 | suspend_resume_epoll_LDADD = \ | 163 | suspend_resume_epoll_LDADD = \ |
164 | $(top_builddir)/src/microhttpd/libmicrohttpd.la | 164 | $(top_builddir)/src/microhttpd/libmicrohttpd.la |
165 | 165 | ||
166 | benchmark_https_SOURCES = \ | 166 | benchmark_https_SOURCES = \ |
167 | benchmark_https.c | 167 | benchmark_https.c |
168 | benchmark_https_CPPFLAGS = \ | 168 | benchmark_https_CPPFLAGS = \ |
169 | $(AM_CPPFLAGS) $(CPU_COUNT_DEF) | 169 | $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF) |
170 | benchmark_https_LDADD = \ | 170 | benchmark_https_LDADD = \ |
171 | $(top_builddir)/src/microhttpd/libmicrohttpd.la | 171 | $(top_builddir)/src/microhttpd/libmicrohttpd.la |
172 | 172 | ||
diff --git a/src/examples/benchmark.c b/src/examples/benchmark.c index 939995c9..8a12704c 100644 --- a/src/examples/benchmark.c +++ b/src/examples/benchmark.c | |||
@@ -25,11 +25,11 @@ | |||
25 | #include "platform.h" | 25 | #include "platform.h" |
26 | #include <microhttpd.h> | 26 | #include <microhttpd.h> |
27 | 27 | ||
28 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 28 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
29 | #undef CPU_COUNT | 29 | #undef MHD_CPU_COUNT |
30 | #endif | 30 | #endif |
31 | #if ! defined(CPU_COUNT) | 31 | #if ! defined(MHD_CPU_COUNT) |
32 | #define CPU_COUNT 2 | 32 | #define MHD_CPU_COUNT 2 |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | #define PAGE \ | 35 | #define PAGE \ |
@@ -42,7 +42,7 @@ | |||
42 | * Number of threads to run in the thread pool. Should (roughly) match | 42 | * Number of threads to run in the thread pool. Should (roughly) match |
43 | * the number of cores on your system. | 43 | * the number of cores on your system. |
44 | */ | 44 | */ |
45 | #define NUMBER_OF_THREADS CPU_COUNT | 45 | #define NUMBER_OF_THREADS MHD_CPU_COUNT |
46 | 46 | ||
47 | static unsigned int small_deltas[SMALL]; | 47 | static unsigned int small_deltas[SMALL]; |
48 | 48 | ||
diff --git a/src/examples/benchmark_https.c b/src/examples/benchmark_https.c index 6f0cd478..2c825616 100644 --- a/src/examples/benchmark_https.c +++ b/src/examples/benchmark_https.c | |||
@@ -25,11 +25,11 @@ | |||
25 | #include "platform.h" | 25 | #include "platform.h" |
26 | #include <microhttpd.h> | 26 | #include <microhttpd.h> |
27 | 27 | ||
28 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 28 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
29 | #undef CPU_COUNT | 29 | #undef MHD_CPU_COUNT |
30 | #endif | 30 | #endif |
31 | #if ! defined(CPU_COUNT) | 31 | #if ! defined(MHD_CPU_COUNT) |
32 | #define CPU_COUNT 2 | 32 | #define MHD_CPU_COUNT 2 |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | #define PAGE \ | 35 | #define PAGE \ |
@@ -42,7 +42,7 @@ | |||
42 | * Number of threads to run in the thread pool. Should (roughly) match | 42 | * Number of threads to run in the thread pool. Should (roughly) match |
43 | * the number of cores on your system. | 43 | * the number of cores on your system. |
44 | */ | 44 | */ |
45 | #define NUMBER_OF_THREADS CPU_COUNT | 45 | #define NUMBER_OF_THREADS MHD_CPU_COUNT |
46 | 46 | ||
47 | static unsigned int small_deltas[SMALL]; | 47 | static unsigned int small_deltas[SMALL]; |
48 | 48 | ||
diff --git a/src/examples/demo.c b/src/examples/demo.c index 9f1beda3..f7ad3fb5 100644 --- a/src/examples/demo.c +++ b/src/examples/demo.c | |||
@@ -41,11 +41,11 @@ | |||
41 | #include <limits.h> | 41 | #include <limits.h> |
42 | #include <ctype.h> | 42 | #include <ctype.h> |
43 | 43 | ||
44 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 44 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
45 | #undef CPU_COUNT | 45 | #undef MHD_CPU_COUNT |
46 | #endif | 46 | #endif |
47 | #if ! defined(CPU_COUNT) | 47 | #if ! defined(MHD_CPU_COUNT) |
48 | #define CPU_COUNT 2 | 48 | #define MHD_CPU_COUNT 2 |
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | #ifndef PATH_MAX | 51 | #ifndef PATH_MAX |
@@ -58,7 +58,7 @@ | |||
58 | * Number of threads to run in the thread pool. Should (roughly) match | 58 | * Number of threads to run in the thread pool. Should (roughly) match |
59 | * the number of cores on your system. | 59 | * the number of cores on your system. |
60 | */ | 60 | */ |
61 | #define NUMBER_OF_THREADS CPU_COUNT | 61 | #define NUMBER_OF_THREADS MHD_CPU_COUNT |
62 | 62 | ||
63 | #ifdef MHD_HAVE_LIBMAGIC | 63 | #ifdef MHD_HAVE_LIBMAGIC |
64 | /** | 64 | /** |
diff --git a/src/examples/demo_https.c b/src/examples/demo_https.c index 205bc863..f7ef6066 100644 --- a/src/examples/demo_https.c +++ b/src/examples/demo_https.c | |||
@@ -44,11 +44,11 @@ | |||
44 | #include <limits.h> | 44 | #include <limits.h> |
45 | #include <ctype.h> | 45 | #include <ctype.h> |
46 | 46 | ||
47 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 47 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
48 | #undef CPU_COUNT | 48 | #undef MHD_CPU_COUNT |
49 | #endif | 49 | #endif |
50 | #if ! defined(CPU_COUNT) | 50 | #if ! defined(MHD_CPU_COUNT) |
51 | #define CPU_COUNT 2 | 51 | #define MHD_CPU_COUNT 2 |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | #ifndef PATH_MAX | 54 | #ifndef PATH_MAX |
@@ -61,7 +61,7 @@ | |||
61 | * Number of threads to run in the thread pool. Should (roughly) match | 61 | * Number of threads to run in the thread pool. Should (roughly) match |
62 | * the number of cores on your system. | 62 | * the number of cores on your system. |
63 | */ | 63 | */ |
64 | #define NUMBER_OF_THREADS CPU_COUNT | 64 | #define NUMBER_OF_THREADS MHD_CPU_COUNT |
65 | 65 | ||
66 | #ifdef MHD_HAVE_LIBMAGIC | 66 | #ifdef MHD_HAVE_LIBMAGIC |
67 | /** | 67 | /** |
diff --git a/src/microhttpd/test_start_stop.c b/src/microhttpd/test_start_stop.c index 9cd3abf2..db2d0684 100644 --- a/src/microhttpd/test_start_stop.c +++ b/src/microhttpd/test_start_stop.c | |||
@@ -27,11 +27,11 @@ | |||
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include <microhttpd.h> | 28 | #include <microhttpd.h> |
29 | 29 | ||
30 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 30 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
31 | #undef CPU_COUNT | 31 | #undef MHD_CPU_COUNT |
32 | #endif | 32 | #endif |
33 | #if ! defined(CPU_COUNT) | 33 | #if ! defined(MHD_CPU_COUNT) |
34 | #define CPU_COUNT 2 | 34 | #define MHD_CPU_COUNT 2 |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | 37 | ||
@@ -92,7 +92,8 @@ testMultithreadedPoolGet (int poll_flag) | |||
92 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG | 92 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG |
93 | | poll_flag, | 93 | | poll_flag, |
94 | 0, NULL, NULL, &ahc_echo, "GET", | 94 | 0, NULL, NULL, &ahc_echo, "GET", |
95 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); | 95 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
96 | MHD_OPTION_END); | ||
96 | if (d == NULL) | 97 | if (d == NULL) |
97 | return 4; | 98 | return 4; |
98 | MHD_stop_daemon (d); | 99 | MHD_stop_daemon (d); |
diff --git a/src/testcurl/Makefile.am b/src/testcurl/Makefile.am index 6587c79a..ac5830eb 100644 --- a/src/testcurl/Makefile.am +++ b/src/testcurl/Makefile.am | |||
@@ -10,7 +10,7 @@ if ENABLE_HTTPS | |||
10 | endif | 10 | endif |
11 | 11 | ||
12 | AM_CPPFLAGS = \ | 12 | AM_CPPFLAGS = \ |
13 | -DCPU_COUNT=$(CPU_COUNT) \ | 13 | -DMHD_CPU_COUNT=$(CPU_COUNT) \ |
14 | -I$(top_srcdir) \ | 14 | -I$(top_srcdir) \ |
15 | -I$(top_srcdir)/src/microhttpd \ | 15 | -I$(top_srcdir)/src/microhttpd \ |
16 | -I$(top_srcdir)/src/include \ | 16 | -I$(top_srcdir)/src/include \ |
diff --git a/src/testcurl/https/Makefile.am b/src/testcurl/https/Makefile.am index fd7f3964..7d395ed1 100644 --- a/src/testcurl/https/Makefile.am +++ b/src/testcurl/https/Makefile.am | |||
@@ -17,7 +17,7 @@ endif | |||
17 | 17 | ||
18 | .NOTPARALLEL: | 18 | .NOTPARALLEL: |
19 | 19 | ||
20 | CPU_COUNT_DEF = -DCPU_COUNT=$(CPU_COUNT) | 20 | MHD_CPU_COUNT_DEF = -DMHD_CPU_COUNT=$(CPU_COUNT) |
21 | 21 | ||
22 | AM_CPPFLAGS = \ | 22 | AM_CPPFLAGS = \ |
23 | -I$(top_srcdir)/src/include \ | 23 | -I$(top_srcdir)/src/include \ |
@@ -83,7 +83,7 @@ test_https_get_parallel_SOURCES = \ | |||
83 | tls_test_common.h \ | 83 | tls_test_common.h \ |
84 | tls_test_common.c | 84 | tls_test_common.c |
85 | test_https_get_parallel_CPPFLAGS = \ | 85 | test_https_get_parallel_CPPFLAGS = \ |
86 | $(AM_CPPFLAGS) $(CPU_COUNT_DEF) | 86 | $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF) |
87 | test_https_get_parallel_CFLAGS = \ | 87 | test_https_get_parallel_CFLAGS = \ |
88 | $(PTHREAD_CFLAGS) $(AM_CFLAGS) | 88 | $(PTHREAD_CFLAGS) $(AM_CFLAGS) |
89 | test_https_get_parallel_LDADD = \ | 89 | test_https_get_parallel_LDADD = \ |
@@ -107,7 +107,7 @@ test_https_get_parallel_threads_SOURCES = \ | |||
107 | tls_test_common.h \ | 107 | tls_test_common.h \ |
108 | tls_test_common.c | 108 | tls_test_common.c |
109 | test_https_get_parallel_threads_CPPFLAGS = \ | 109 | test_https_get_parallel_threads_CPPFLAGS = \ |
110 | $(AM_CPPFLAGS) $(CPU_COUNT_DEF) | 110 | $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF) |
111 | test_https_get_parallel_threads_CFLAGS = \ | 111 | test_https_get_parallel_threads_CFLAGS = \ |
112 | $(PTHREAD_CFLAGS) $(AM_CFLAGS) | 112 | $(PTHREAD_CFLAGS) $(AM_CFLAGS) |
113 | test_https_get_parallel_threads_LDADD = \ | 113 | test_https_get_parallel_threads_LDADD = \ |
diff --git a/src/testcurl/https/test_https_get_parallel.c b/src/testcurl/https/test_https_get_parallel.c index aa7f8d58..af5345bc 100644 --- a/src/testcurl/https/test_https_get_parallel.c +++ b/src/testcurl/https/test_https_get_parallel.c | |||
@@ -36,11 +36,11 @@ | |||
36 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ | 36 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ |
37 | #include "tls_test_common.h" | 37 | #include "tls_test_common.h" |
38 | 38 | ||
39 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 4 | 39 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 4 |
40 | #undef CPU_COUNT | 40 | #undef MHD_CPU_COUNT |
41 | #endif | 41 | #endif |
42 | #if ! defined(CPU_COUNT) | 42 | #if ! defined(MHD_CPU_COUNT) |
43 | #define CPU_COUNT 4 | 43 | #define MHD_CPU_COUNT 4 |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | extern const char srv_key_pem[]; | 46 | extern const char srv_key_pem[]; |
@@ -105,7 +105,7 @@ test_parallel_clients (void *cls, int port, const char *cipher_suite, | |||
105 | int curl_proto_version) | 105 | int curl_proto_version) |
106 | { | 106 | { |
107 | int i; | 107 | int i; |
108 | int client_count = (CPU_COUNT - 1); | 108 | int client_count = (MHD_CPU_COUNT - 1); |
109 | void *client_thread_ret; | 109 | void *client_thread_ret; |
110 | pthread_t client_arr[client_count]; | 110 | pthread_t client_arr[client_count]; |
111 | struct https_test_data client_args = | 111 | struct https_test_data client_args = |
diff --git a/src/testcurl/https/test_https_get_parallel_threads.c b/src/testcurl/https/test_https_get_parallel_threads.c index 470072cb..969bd45e 100644 --- a/src/testcurl/https/test_https_get_parallel_threads.c +++ b/src/testcurl/https/test_https_get_parallel_threads.c | |||
@@ -38,11 +38,11 @@ | |||
38 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ | 38 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ |
39 | #include "tls_test_common.h" | 39 | #include "tls_test_common.h" |
40 | 40 | ||
41 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 4 | 41 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 4 |
42 | #undef CPU_COUNT | 42 | #undef MHD_CPU_COUNT |
43 | #endif | 43 | #endif |
44 | #if ! defined(CPU_COUNT) | 44 | #if ! defined(MHD_CPU_COUNT) |
45 | #define CPU_COUNT 4 | 45 | #define MHD_CPU_COUNT 4 |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | extern const char srv_key_pem[]; | 48 | extern const char srv_key_pem[]; |
@@ -106,7 +106,7 @@ test_parallel_clients (void *cls, int port, const char *cipher_suite, | |||
106 | int curl_proto_version) | 106 | int curl_proto_version) |
107 | { | 107 | { |
108 | int i; | 108 | int i; |
109 | int client_count = (CPU_COUNT - 1); | 109 | int client_count = (MHD_CPU_COUNT - 1); |
110 | void *client_thread_ret; | 110 | void *client_thread_ret; |
111 | pthread_t client_arr[client_count]; | 111 | pthread_t client_arr[client_count]; |
112 | struct https_test_data client_args = | 112 | struct https_test_data client_args = |
diff --git a/src/testcurl/perf_get.c b/src/testcurl/perf_get.c index 4a903e39..d80db06e 100644 --- a/src/testcurl/perf_get.c +++ b/src/testcurl/perf_get.c | |||
@@ -51,11 +51,11 @@ | |||
51 | #include <sys/socket.h> | 51 | #include <sys/socket.h> |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 54 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
55 | #undef CPU_COUNT | 55 | #undef MHD_CPU_COUNT |
56 | #endif | 56 | #endif |
57 | #if ! defined(CPU_COUNT) | 57 | #if ! defined(MHD_CPU_COUNT) |
58 | #define CPU_COUNT 2 | 58 | #define MHD_CPU_COUNT 2 |
59 | #endif | 59 | #endif |
60 | 60 | ||
61 | /** | 61 | /** |
@@ -360,7 +360,8 @@ testMultithreadedPoolGet (int port, int poll_flag) | |||
360 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG | 360 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG |
361 | | poll_flag, | 361 | | poll_flag, |
362 | port, NULL, NULL, &ahc_echo, "GET", | 362 | port, NULL, NULL, &ahc_echo, "GET", |
363 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); | 363 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
364 | MHD_OPTION_END); | ||
364 | if (d == NULL) | 365 | if (d == NULL) |
365 | return 16; | 366 | return 16; |
366 | if (0 == port) | 367 | if (0 == port) |
diff --git a/src/testcurl/perf_get_concurrent.c b/src/testcurl/perf_get_concurrent.c index a0c5ebb1..c58890cc 100644 --- a/src/testcurl/perf_get_concurrent.c +++ b/src/testcurl/perf_get_concurrent.c | |||
@@ -43,11 +43,11 @@ | |||
43 | #include "gauger.h" | 43 | #include "gauger.h" |
44 | #include "mhd_has_in_name.h" | 44 | #include "mhd_has_in_name.h" |
45 | 45 | ||
46 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 46 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
47 | #undef CPU_COUNT | 47 | #undef MHD_CPU_COUNT |
48 | #endif | 48 | #endif |
49 | #if ! defined(CPU_COUNT) | 49 | #if ! defined(MHD_CPU_COUNT) |
50 | #define CPU_COUNT 2 | 50 | #define MHD_CPU_COUNT 2 |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | /** | 53 | /** |
@@ -55,11 +55,11 @@ | |||
55 | * test (total number of requests will be ROUNDS * PAR). | 55 | * test (total number of requests will be ROUNDS * PAR). |
56 | * Ensure that free ports are not exhausted during test. | 56 | * Ensure that free ports are not exhausted during test. |
57 | */ | 57 | */ |
58 | #if CPU_COUNT > 8 | 58 | #if MHD_CPU_COUNT > 8 |
59 | #ifndef _WIN32 | 59 | #ifndef _WIN32 |
60 | #define ROUNDS (1 + (30000 / 12) / CPU_COUNT) | 60 | #define ROUNDS (1 + (30000 / 12) / MHD_CPU_COUNT) |
61 | #else /* _WIN32 */ | 61 | #else /* _WIN32 */ |
62 | #define ROUNDS (1 + (10000 / 12) / CPU_COUNT) | 62 | #define ROUNDS (1 + (10000 / 12) / MHD_CPU_COUNT) |
63 | #endif /* _WIN32 */ | 63 | #endif /* _WIN32 */ |
64 | #else | 64 | #else |
65 | #define ROUNDS 500 | 65 | #define ROUNDS 500 |
@@ -68,7 +68,7 @@ | |||
68 | /** | 68 | /** |
69 | * How many requests do we do in parallel? | 69 | * How many requests do we do in parallel? |
70 | */ | 70 | */ |
71 | #define PAR CPU_COUNT | 71 | #define PAR MHD_CPU_COUNT |
72 | 72 | ||
73 | /** | 73 | /** |
74 | * Do we use HTTP 1.1? | 74 | * Do we use HTTP 1.1? |
@@ -372,7 +372,8 @@ testMultithreadedPoolGet (int port, int poll_flag) | |||
372 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG | 372 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG |
373 | | poll_flag, | 373 | | poll_flag, |
374 | port, NULL, NULL, &ahc_echo, "GET", | 374 | port, NULL, NULL, &ahc_echo, "GET", |
375 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); | 375 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
376 | MHD_OPTION_END); | ||
376 | if (d == NULL) | 377 | if (d == NULL) |
377 | return 16; | 378 | return 16; |
378 | if (0 == port) | 379 | if (0 == port) |
diff --git a/src/testcurl/test_add_conn.c b/src/testcurl/test_add_conn.c index dbb1af8b..b78cd013 100644 --- a/src/testcurl/test_add_conn.c +++ b/src/testcurl/test_add_conn.c | |||
@@ -51,17 +51,17 @@ | |||
51 | #include <pthread.h> | 51 | #include <pthread.h> |
52 | #endif /* HAVE_PTHREAD_H */ | 52 | #endif /* HAVE_PTHREAD_H */ |
53 | 53 | ||
54 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 54 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
55 | #undef CPU_COUNT | 55 | #undef MHD_CPU_COUNT |
56 | #endif | 56 | #endif |
57 | #if ! defined(CPU_COUNT) | 57 | #if ! defined(MHD_CPU_COUNT) |
58 | #define CPU_COUNT 2 | 58 | #define MHD_CPU_COUNT 2 |
59 | #endif | 59 | #endif |
60 | #if CPU_COUNT > 32 | 60 | #if MHD_CPU_COUNT > 32 |
61 | #undef CPU_COUNT | 61 | #undef MHD_CPU_COUNT |
62 | /* Limit to reasonable value */ | 62 | /* Limit to reasonable value */ |
63 | #define CPU_COUNT 32 | 63 | #define MHD_CPU_COUNT 32 |
64 | #endif /* CPU_COUNT > 32 */ | 64 | #endif /* MHD_CPU_COUNT > 32 */ |
65 | 65 | ||
66 | /* Could be increased to facilitate debugging */ | 66 | /* Could be increased to facilitate debugging */ |
67 | #define TIMEOUTS_VAL 5 | 67 | #define TIMEOUTS_VAL 5 |
@@ -700,7 +700,7 @@ startTestMhdDaemon (enum testMhdThreadsType thrType, | |||
700 | | MHD_USE_ERROR_LOG, | 700 | | MHD_USE_ERROR_LOG, |
701 | *pport, NULL, NULL, | 701 | *pport, NULL, NULL, |
702 | &ahc_echo, "GET", | 702 | &ahc_echo, "GET", |
703 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, | 703 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
704 | MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL, | 704 | MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL, |
705 | MHD_OPTION_END); | 705 | MHD_OPTION_END); |
706 | 706 | ||
@@ -969,7 +969,7 @@ testMultithreadedPoolGet (enum testMhdPollType pollType) | |||
969 | &d_port); | 969 | &d_port); |
970 | 970 | ||
971 | if (cleanup_test) | 971 | if (cleanup_test) |
972 | return performTestCleanup (d, 10 * CPU_COUNT); | 972 | return performTestCleanup (d, 10 * MHD_CPU_COUNT); |
973 | 973 | ||
974 | return performTestQueries (d, d_port); | 974 | return performTestQueries (d, d_port); |
975 | } | 975 | } |
diff --git a/src/testcurl/test_concurrent_stop.c b/src/testcurl/test_concurrent_stop.c index 842a35c6..7def86a8 100644 --- a/src/testcurl/test_concurrent_stop.c +++ b/src/testcurl/test_concurrent_stop.c | |||
@@ -33,17 +33,17 @@ | |||
33 | #include <pthread.h> | 33 | #include <pthread.h> |
34 | #include "gauger.h" | 34 | #include "gauger.h" |
35 | 35 | ||
36 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 36 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
37 | #undef CPU_COUNT | 37 | #undef MHD_CPU_COUNT |
38 | #endif | 38 | #endif |
39 | #if ! defined(CPU_COUNT) | 39 | #if ! defined(MHD_CPU_COUNT) |
40 | #define CPU_COUNT 2 | 40 | #define MHD_CPU_COUNT 2 |
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | /** | 43 | /** |
44 | * How many requests do we do in parallel? | 44 | * How many requests do we do in parallel? |
45 | */ | 45 | */ |
46 | #define PAR (CPU_COUNT * 4) | 46 | #define PAR (MHD_CPU_COUNT * 4) |
47 | 47 | ||
48 | /** | 48 | /** |
49 | * Do we use HTTP 1.1? | 49 | * Do we use HTTP 1.1? |
@@ -318,7 +318,7 @@ testMultithreadedPoolGet (int port, | |||
318 | port, | 318 | port, |
319 | NULL, NULL, | 319 | NULL, NULL, |
320 | &ahc_echo, "GET", | 320 | &ahc_echo, "GET", |
321 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, | 321 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
322 | MHD_OPTION_END); | 322 | MHD_OPTION_END); |
323 | if (d == NULL) | 323 | if (d == NULL) |
324 | return 16; | 324 | return 16; |
diff --git a/src/testcurl/test_delete.c b/src/testcurl/test_delete.c index ae62311b..400aa499 100644 --- a/src/testcurl/test_delete.c +++ b/src/testcurl/test_delete.c | |||
@@ -37,11 +37,11 @@ | |||
37 | #include <unistd.h> | 37 | #include <unistd.h> |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 40 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
41 | #undef CPU_COUNT | 41 | #undef MHD_CPU_COUNT |
42 | #endif | 42 | #endif |
43 | #if ! defined(CPU_COUNT) | 43 | #if ! defined(MHD_CPU_COUNT) |
44 | #define CPU_COUNT 2 | 44 | #define MHD_CPU_COUNT 2 |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | static int oneone; | 47 | static int oneone; |
@@ -296,7 +296,8 @@ testMultithreadedPoolDelete () | |||
296 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, | 296 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, |
297 | port, | 297 | port, |
298 | NULL, NULL, &ahc_echo, &done_flag, | 298 | NULL, NULL, &ahc_echo, &done_flag, |
299 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); | 299 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
300 | MHD_OPTION_END); | ||
300 | if (d == NULL) | 301 | if (d == NULL) |
301 | return 16; | 302 | return 16; |
302 | if (0 == port) | 303 | if (0 == port) |
diff --git a/src/testcurl/test_get.c b/src/testcurl/test_get.c index 964cfe5f..bf9d78ea 100644 --- a/src/testcurl/test_get.c +++ b/src/testcurl/test_get.c | |||
@@ -48,11 +48,11 @@ | |||
48 | #include <sys/socket.h> | 48 | #include <sys/socket.h> |
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 51 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
52 | #undef CPU_COUNT | 52 | #undef MHD_CPU_COUNT |
53 | #endif | 53 | #endif |
54 | #if ! defined(CPU_COUNT) | 54 | #if ! defined(MHD_CPU_COUNT) |
55 | #define CPU_COUNT 2 | 55 | #define MHD_CPU_COUNT 2 |
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | static int oneone; | 58 | static int oneone; |
@@ -341,7 +341,7 @@ testMultithreadedPoolGet (int poll_flag) | |||
341 | | poll_flag, | 341 | | poll_flag, |
342 | global_port, NULL, NULL, | 342 | global_port, NULL, NULL, |
343 | &ahc_echo, "GET", | 343 | &ahc_echo, "GET", |
344 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, | 344 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
345 | MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL, | 345 | MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL, |
346 | MHD_OPTION_END); | 346 | MHD_OPTION_END); |
347 | if (d == NULL) | 347 | if (d == NULL) |
diff --git a/src/testcurl/test_get_chunked.c b/src/testcurl/test_get_chunked.c index cab4e1b5..aa753314 100644 --- a/src/testcurl/test_get_chunked.c +++ b/src/testcurl/test_get_chunked.c | |||
@@ -40,11 +40,11 @@ | |||
40 | #include <unistd.h> | 40 | #include <unistd.h> |
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 43 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
44 | #undef CPU_COUNT | 44 | #undef MHD_CPU_COUNT |
45 | #endif | 45 | #endif |
46 | #if ! defined(CPU_COUNT) | 46 | #if ! defined(MHD_CPU_COUNT) |
47 | #define CPU_COUNT 2 | 47 | #define MHD_CPU_COUNT 2 |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | struct CBC | 50 | struct CBC |
@@ -325,7 +325,8 @@ testMultithreadedPoolGet () | |||
325 | cbc.pos = 0; | 325 | cbc.pos = 0; |
326 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, | 326 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, |
327 | port, NULL, NULL, &ahc_echo, "GET", | 327 | port, NULL, NULL, &ahc_echo, "GET", |
328 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); | 328 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
329 | MHD_OPTION_END); | ||
329 | if (d == NULL) | 330 | if (d == NULL) |
330 | return 16; | 331 | return 16; |
331 | if (0 == port) | 332 | if (0 == port) |
diff --git a/src/testcurl/test_get_empty.c b/src/testcurl/test_get_empty.c index 52718acb..6d6c3166 100644 --- a/src/testcurl/test_get_empty.c +++ b/src/testcurl/test_get_empty.c | |||
@@ -47,11 +47,11 @@ | |||
47 | #include <sys/socket.h> | 47 | #include <sys/socket.h> |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 50 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
51 | #undef CPU_COUNT | 51 | #undef MHD_CPU_COUNT |
52 | #endif | 52 | #endif |
53 | #if ! defined(CPU_COUNT) | 53 | #if ! defined(MHD_CPU_COUNT) |
54 | #define CPU_COUNT 2 | 54 | #define MHD_CPU_COUNT 2 |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | static int oneone; | 57 | static int oneone; |
@@ -305,7 +305,7 @@ testMultithreadedPoolGet (int poll_flag) | |||
305 | | poll_flag, | 305 | | poll_flag, |
306 | global_port, NULL, NULL, | 306 | global_port, NULL, NULL, |
307 | &ahc_echo, "GET", | 307 | &ahc_echo, "GET", |
308 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, | 308 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
309 | MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL, | 309 | MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL, |
310 | MHD_OPTION_END); | 310 | MHD_OPTION_END); |
311 | if (d == NULL) | 311 | if (d == NULL) |
diff --git a/src/testcurl/test_get_response_cleanup.c b/src/testcurl/test_get_response_cleanup.c index 026fd254..db6ba54f 100644 --- a/src/testcurl/test_get_response_cleanup.c +++ b/src/testcurl/test_get_response_cleanup.c | |||
@@ -53,11 +53,11 @@ | |||
53 | 53 | ||
54 | #include "mhd_has_in_name.h" | 54 | #include "mhd_has_in_name.h" |
55 | 55 | ||
56 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 56 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
57 | #undef CPU_COUNT | 57 | #undef MHD_CPU_COUNT |
58 | #endif | 58 | #endif |
59 | #if ! defined(CPU_COUNT) | 59 | #if ! defined(MHD_CPU_COUNT) |
60 | #define CPU_COUNT 2 | 60 | #define MHD_CPU_COUNT 2 |
61 | #endif | 61 | #endif |
62 | 62 | ||
63 | #define TESTSTR "/* DO NOT CHANGE THIS LINE */" | 63 | #define TESTSTR "/* DO NOT CHANGE THIS LINE */" |
@@ -285,7 +285,8 @@ testMultithreadedPoolGet () | |||
285 | ok = 1; | 285 | ok = 1; |
286 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, | 286 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, |
287 | port, NULL, NULL, &ahc_echo, "GET", | 287 | port, NULL, NULL, &ahc_echo, "GET", |
288 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); | 288 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
289 | MHD_OPTION_END); | ||
289 | if (d == NULL) | 290 | if (d == NULL) |
290 | return 64; | 291 | return 64; |
291 | if (0 == port) | 292 | if (0 == port) |
diff --git a/src/testcurl/test_get_sendfile.c b/src/testcurl/test_get_sendfile.c index 0095731e..1a444607 100644 --- a/src/testcurl/test_get_sendfile.c +++ b/src/testcurl/test_get_sendfile.c | |||
@@ -40,11 +40,11 @@ | |||
40 | #include <unistd.h> | 40 | #include <unistd.h> |
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 43 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
44 | #undef CPU_COUNT | 44 | #undef MHD_CPU_COUNT |
45 | #endif | 45 | #endif |
46 | #if ! defined(CPU_COUNT) | 46 | #if ! defined(MHD_CPU_COUNT) |
47 | #define CPU_COUNT 2 | 47 | #define MHD_CPU_COUNT 2 |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | #define TESTSTR \ | 50 | #define TESTSTR \ |
@@ -284,7 +284,8 @@ testMultithreadedPoolGet () | |||
284 | cbc.pos = 0; | 284 | cbc.pos = 0; |
285 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, | 285 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, |
286 | port, NULL, NULL, &ahc_echo, "GET", | 286 | port, NULL, NULL, &ahc_echo, "GET", |
287 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); | 287 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
288 | MHD_OPTION_END); | ||
288 | if (d == NULL) | 289 | if (d == NULL) |
289 | return 16; | 290 | return 16; |
290 | if (0 == port) | 291 | if (0 == port) |
diff --git a/src/testcurl/test_iplimit.c b/src/testcurl/test_iplimit.c index 3b61f827..405f2777 100644 --- a/src/testcurl/test_iplimit.c +++ b/src/testcurl/test_iplimit.c | |||
@@ -45,11 +45,11 @@ | |||
45 | #include <windows.h> | 45 | #include <windows.h> |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 48 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
49 | #undef CPU_COUNT | 49 | #undef MHD_CPU_COUNT |
50 | #endif | 50 | #endif |
51 | #if ! defined(CPU_COUNT) | 51 | #if ! defined(MHD_CPU_COUNT) |
52 | #define CPU_COUNT 2 | 52 | #define MHD_CPU_COUNT 2 |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | static int oneone; | 55 | static int oneone; |
@@ -246,7 +246,7 @@ testMultithreadedPoolGet () | |||
246 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, | 246 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, |
247 | port, NULL, NULL, &ahc_echo, "GET", | 247 | port, NULL, NULL, &ahc_echo, "GET", |
248 | MHD_OPTION_PER_IP_CONNECTION_LIMIT, 2, | 248 | MHD_OPTION_PER_IP_CONNECTION_LIMIT, 2, |
249 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, | 249 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
250 | MHD_OPTION_END); | 250 | MHD_OPTION_END); |
251 | if (d == NULL) | 251 | if (d == NULL) |
252 | return 16; | 252 | return 16; |
diff --git a/src/testcurl/test_large_put.c b/src/testcurl/test_large_put.c index d93942e4..8a2df37b 100644 --- a/src/testcurl/test_large_put.c +++ b/src/testcurl/test_large_put.c | |||
@@ -38,11 +38,11 @@ | |||
38 | 38 | ||
39 | #include "test_helpers.h" | 39 | #include "test_helpers.h" |
40 | 40 | ||
41 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 41 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
42 | #undef CPU_COUNT | 42 | #undef MHD_CPU_COUNT |
43 | #endif | 43 | #endif |
44 | #if ! defined(CPU_COUNT) | 44 | #if ! defined(MHD_CPU_COUNT) |
45 | #define CPU_COUNT 2 | 45 | #define MHD_CPU_COUNT 2 |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | static int oneone; | 48 | static int oneone; |
@@ -379,7 +379,7 @@ testPutThreadPool (unsigned int add_flag) | |||
379 | | add_flag, | 379 | | add_flag, |
380 | port, | 380 | port, |
381 | NULL, NULL, &ahc_echo, &done_flag, | 381 | NULL, NULL, &ahc_echo, &done_flag, |
382 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, | 382 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
383 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, | 383 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, |
384 | (size_t) (incr_read ? 1024 : (PUT_SIZE * 4)), | 384 | (size_t) (incr_read ? 1024 : (PUT_SIZE * 4)), |
385 | MHD_OPTION_END); | 385 | MHD_OPTION_END); |
diff --git a/src/testcurl/test_patch.c b/src/testcurl/test_patch.c index 6be3ab30..d87b9263 100644 --- a/src/testcurl/test_patch.c +++ b/src/testcurl/test_patch.c | |||
@@ -37,11 +37,11 @@ | |||
37 | #include <unistd.h> | 37 | #include <unistd.h> |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 40 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
41 | #undef CPU_COUNT | 41 | #undef MHD_CPU_COUNT |
42 | #endif | 42 | #endif |
43 | #if ! defined(CPU_COUNT) | 43 | #if ! defined(MHD_CPU_COUNT) |
44 | #define CPU_COUNT 2 | 44 | #define MHD_CPU_COUNT 2 |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | static int oneone; | 47 | static int oneone; |
@@ -301,7 +301,8 @@ testMultithreadedPoolPut () | |||
301 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, | 301 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, |
302 | port, | 302 | port, |
303 | NULL, NULL, &ahc_echo, &done_flag, | 303 | NULL, NULL, &ahc_echo, &done_flag, |
304 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); | 304 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
305 | MHD_OPTION_END); | ||
305 | if (d == NULL) | 306 | if (d == NULL) |
306 | return 16; | 307 | return 16; |
307 | if (0 == port) | 308 | if (0 == port) |
diff --git a/src/testcurl/test_post.c b/src/testcurl/test_post.c index d591ab8b..ab8f4cb2 100644 --- a/src/testcurl/test_post.c +++ b/src/testcurl/test_post.c | |||
@@ -45,11 +45,11 @@ | |||
45 | 45 | ||
46 | #include "mhd_has_in_name.h" | 46 | #include "mhd_has_in_name.h" |
47 | 47 | ||
48 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 48 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
49 | #undef CPU_COUNT | 49 | #undef MHD_CPU_COUNT |
50 | #endif | 50 | #endif |
51 | #if ! defined(CPU_COUNT) | 51 | #if ! defined(MHD_CPU_COUNT) |
52 | #define CPU_COUNT 2 | 52 | #define MHD_CPU_COUNT 2 |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | #define POST_DATA "name=daniel&project=curl" | 55 | #define POST_DATA "name=daniel&project=curl" |
@@ -341,7 +341,7 @@ testMultithreadedPoolPost () | |||
341 | cbc.pos = 0; | 341 | cbc.pos = 0; |
342 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, | 342 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, |
343 | port, NULL, NULL, &ahc_echo, NULL, | 343 | port, NULL, NULL, &ahc_echo, NULL, |
344 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, | 344 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
345 | MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, | 345 | MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, |
346 | MHD_OPTION_END); | 346 | MHD_OPTION_END); |
347 | if (d == NULL) | 347 | if (d == NULL) |
diff --git a/src/testcurl/test_post_loop.c b/src/testcurl/test_post_loop.c index 95e1a0f3..831d8821 100644 --- a/src/testcurl/test_post_loop.c +++ b/src/testcurl/test_post_loop.c | |||
@@ -38,11 +38,11 @@ | |||
38 | #include <unistd.h> | 38 | #include <unistd.h> |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 41 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
42 | #undef CPU_COUNT | 42 | #undef MHD_CPU_COUNT |
43 | #endif | 43 | #endif |
44 | #if ! defined(CPU_COUNT) | 44 | #if ! defined(MHD_CPU_COUNT) |
45 | #define CPU_COUNT 2 | 45 | #define MHD_CPU_COUNT 2 |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | #define POST_DATA \ | 48 | #define POST_DATA \ |
@@ -317,7 +317,8 @@ testMultithreadedPoolPost () | |||
317 | cbc.size = 2048; | 317 | cbc.size = 2048; |
318 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, | 318 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, |
319 | port, NULL, NULL, &ahc_echo, NULL, | 319 | port, NULL, NULL, &ahc_echo, NULL, |
320 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); | 320 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
321 | MHD_OPTION_END); | ||
321 | if (d == NULL) | 322 | if (d == NULL) |
322 | return 16; | 323 | return 16; |
323 | if (0 == port) | 324 | if (0 == port) |
diff --git a/src/testcurl/test_postform.c b/src/testcurl/test_postform.c index 18a0fc62..3ed43687 100644 --- a/src/testcurl/test_postform.c +++ b/src/testcurl/test_postform.c | |||
@@ -43,11 +43,11 @@ | |||
43 | 43 | ||
44 | #include "mhd_has_in_name.h" | 44 | #include "mhd_has_in_name.h" |
45 | 45 | ||
46 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 46 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
47 | #undef CPU_COUNT | 47 | #undef MHD_CPU_COUNT |
48 | #endif | 48 | #endif |
49 | #if ! defined(CPU_COUNT) | 49 | #if ! defined(MHD_CPU_COUNT) |
50 | #define CPU_COUNT 2 | 50 | #define MHD_CPU_COUNT 2 |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | static int oneone; | 53 | static int oneone; |
@@ -361,7 +361,7 @@ testMultithreadedPoolPost () | |||
361 | cbc.pos = 0; | 361 | cbc.pos = 0; |
362 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, | 362 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, |
363 | port, NULL, NULL, &ahc_echo, NULL, | 363 | port, NULL, NULL, &ahc_echo, NULL, |
364 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, | 364 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
365 | MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, | 365 | MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL, |
366 | MHD_OPTION_END); | 366 | MHD_OPTION_END); |
367 | if (d == NULL) | 367 | if (d == NULL) |
diff --git a/src/testcurl/test_process_headers.c b/src/testcurl/test_process_headers.c index 5784f5b7..8756858b 100644 --- a/src/testcurl/test_process_headers.c +++ b/src/testcurl/test_process_headers.c | |||
@@ -37,11 +37,11 @@ | |||
37 | #include <unistd.h> | 37 | #include <unistd.h> |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 40 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
41 | #undef CPU_COUNT | 41 | #undef MHD_CPU_COUNT |
42 | #endif | 42 | #endif |
43 | #if ! defined(CPU_COUNT) | 43 | #if ! defined(MHD_CPU_COUNT) |
44 | #define CPU_COUNT 2 | 44 | #define MHD_CPU_COUNT 2 |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | static int oneone; | 47 | static int oneone; |
@@ -318,7 +318,8 @@ testMultithreadedPoolGet () | |||
318 | cbc.pos = 0; | 318 | cbc.pos = 0; |
319 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, | 319 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, |
320 | port, NULL, NULL, &ahc_echo, "GET", | 320 | port, NULL, NULL, &ahc_echo, "GET", |
321 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); | 321 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
322 | MHD_OPTION_END); | ||
322 | if (d == NULL) | 323 | if (d == NULL) |
323 | return 16; | 324 | return 16; |
324 | if (0 == port) | 325 | if (0 == port) |
diff --git a/src/testcurl/test_put.c b/src/testcurl/test_put.c index c582a418..b8adbb70 100644 --- a/src/testcurl/test_put.c +++ b/src/testcurl/test_put.c | |||
@@ -37,11 +37,11 @@ | |||
37 | #include <unistd.h> | 37 | #include <unistd.h> |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 40 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
41 | #undef CPU_COUNT | 41 | #undef MHD_CPU_COUNT |
42 | #endif | 42 | #endif |
43 | #if ! defined(CPU_COUNT) | 43 | #if ! defined(MHD_CPU_COUNT) |
44 | #define CPU_COUNT 2 | 44 | #define MHD_CPU_COUNT 2 |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | static int oneone; | 47 | static int oneone; |
@@ -306,7 +306,8 @@ testMultithreadedPoolPut () | |||
306 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, | 306 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, |
307 | port, | 307 | port, |
308 | NULL, NULL, &ahc_echo, &done_flag, | 308 | NULL, NULL, &ahc_echo, &done_flag, |
309 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); | 309 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
310 | MHD_OPTION_END); | ||
310 | if (d == NULL) | 311 | if (d == NULL) |
311 | return 16; | 312 | return 16; |
312 | if (0 == port) | 313 | if (0 == port) |
diff --git a/src/testcurl/test_put_chunked.c b/src/testcurl/test_put_chunked.c index e393523d..090e6ebc 100644 --- a/src/testcurl/test_put_chunked.c +++ b/src/testcurl/test_put_chunked.c | |||
@@ -37,11 +37,11 @@ | |||
37 | #include <unistd.h> | 37 | #include <unistd.h> |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 40 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
41 | #undef CPU_COUNT | 41 | #undef MHD_CPU_COUNT |
42 | #endif | 42 | #endif |
43 | #if ! defined(CPU_COUNT) | 43 | #if ! defined(MHD_CPU_COUNT) |
44 | #define CPU_COUNT 2 | 44 | #define MHD_CPU_COUNT 2 |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | struct CBC | 47 | struct CBC |
@@ -305,7 +305,8 @@ testMultithreadedPoolPut () | |||
305 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, | 305 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, |
306 | port, | 306 | port, |
307 | NULL, NULL, &ahc_echo, &done_flag, | 307 | NULL, NULL, &ahc_echo, &done_flag, |
308 | MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT, MHD_OPTION_END); | 308 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
309 | MHD_OPTION_END); | ||
309 | if (d == NULL) | 310 | if (d == NULL) |
310 | return 16; | 311 | return 16; |
311 | if (0 == port) | 312 | if (0 == port) |
diff --git a/src/testcurl/test_quiesce.c b/src/testcurl/test_quiesce.c index ac0ade30..0c4ad001 100644 --- a/src/testcurl/test_quiesce.c +++ b/src/testcurl/test_quiesce.c | |||
@@ -40,11 +40,11 @@ | |||
40 | #include <sys/socket.h> | 40 | #include <sys/socket.h> |
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | #if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2 | 43 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2 |
44 | #undef CPU_COUNT | 44 | #undef MHD_CPU_COUNT |
45 | #endif | 45 | #endif |
46 | #if ! defined(CPU_COUNT) | 46 | #if ! defined(MHD_CPU_COUNT) |
47 | #define CPU_COUNT 2 | 47 | #define MHD_CPU_COUNT 2 |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | 50 | ||
@@ -553,20 +553,20 @@ main (int argc, char *const *argv) | |||
553 | errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, 0, 0); | 553 | errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, 0, 0); |
554 | errorCount += testGet (MHD_USE_THREAD_PER_CONNECTION | 554 | errorCount += testGet (MHD_USE_THREAD_PER_CONNECTION |
555 | | MHD_USE_INTERNAL_POLLING_THREAD, 0, 0); | 555 | | MHD_USE_INTERNAL_POLLING_THREAD, 0, 0); |
556 | errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, CPU_COUNT, 0); | 556 | errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, MHD_CPU_COUNT, 0); |
557 | if (MHD_YES == MHD_is_feature_supported (MHD_FEATURE_POLL)) | 557 | if (MHD_YES == MHD_is_feature_supported (MHD_FEATURE_POLL)) |
558 | { | 558 | { |
559 | errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, 0, MHD_USE_POLL); | 559 | errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, 0, MHD_USE_POLL); |
560 | errorCount += testGet (MHD_USE_THREAD_PER_CONNECTION | 560 | errorCount += testGet (MHD_USE_THREAD_PER_CONNECTION |
561 | | MHD_USE_INTERNAL_POLLING_THREAD, 0, | 561 | | MHD_USE_INTERNAL_POLLING_THREAD, 0, |
562 | MHD_USE_POLL); | 562 | MHD_USE_POLL); |
563 | errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, CPU_COUNT, | 563 | errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, MHD_CPU_COUNT, |
564 | MHD_USE_POLL); | 564 | MHD_USE_POLL); |
565 | } | 565 | } |
566 | if (MHD_YES == MHD_is_feature_supported (MHD_FEATURE_EPOLL)) | 566 | if (MHD_YES == MHD_is_feature_supported (MHD_FEATURE_EPOLL)) |
567 | { | 567 | { |
568 | errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, 0, MHD_USE_EPOLL); | 568 | errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, 0, MHD_USE_EPOLL); |
569 | errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, CPU_COUNT, | 569 | errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, MHD_CPU_COUNT, |
570 | MHD_USE_EPOLL); | 570 | MHD_USE_EPOLL); |
571 | } | 571 | } |
572 | } | 572 | } |