[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] branch master updated: Fixed conflict with system CPU_CO
From: |
gnunet |
Subject: |
[libmicrohttpd] branch master updated: Fixed conflict with system CPU_COUNT macro |
Date: |
Sun, 25 Oct 2020 21:02:08 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
The following commit(s) were added to refs/heads/master by this push:
new 8cb26dae Fixed conflict with system CPU_COUNT macro
8cb26dae is described below
commit 8cb26daea6f14cf93a8cdf715b8ed823cf298f64
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sun Oct 25 22:52:53 2020 +0300
Fixed conflict with system CPU_COUNT macro
---
src/examples/Makefile.am | 12 ++++++------
src/examples/benchmark.c | 10 +++++-----
src/examples/benchmark_https.c | 10 +++++-----
src/examples/demo.c | 10 +++++-----
src/examples/demo_https.c | 10 +++++-----
src/microhttpd/test_start_stop.c | 11 ++++++-----
src/testcurl/Makefile.am | 2 +-
src/testcurl/https/Makefile.am | 6 +++---
src/testcurl/https/test_https_get_parallel.c | 10 +++++-----
src/testcurl/https/test_https_get_parallel_threads.c | 10 +++++-----
src/testcurl/perf_get.c | 11 ++++++-----
src/testcurl/perf_get_concurrent.c | 19 ++++++++++---------
src/testcurl/test_add_conn.c | 20 ++++++++++----------
src/testcurl/test_concurrent_stop.c | 12 ++++++------
src/testcurl/test_delete.c | 11 ++++++-----
src/testcurl/test_get.c | 10 +++++-----
src/testcurl/test_get_chunked.c | 11 ++++++-----
src/testcurl/test_get_empty.c | 10 +++++-----
src/testcurl/test_get_response_cleanup.c | 11 ++++++-----
src/testcurl/test_get_sendfile.c | 11 ++++++-----
src/testcurl/test_iplimit.c | 10 +++++-----
src/testcurl/test_large_put.c | 10 +++++-----
src/testcurl/test_patch.c | 11 ++++++-----
src/testcurl/test_post.c | 10 +++++-----
src/testcurl/test_post_loop.c | 11 ++++++-----
src/testcurl/test_postform.c | 10 +++++-----
src/testcurl/test_process_headers.c | 11 ++++++-----
src/testcurl/test_put.c | 11 ++++++-----
src/testcurl/test_put_chunked.c | 11 ++++++-----
src/testcurl/test_quiesce.c | 14 +++++++-------
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 = \
AM_CFLAGS = @LIBGCRYPT_CFLAGS@
-CPU_COUNT_DEF = -DCPU_COUNT=$(CPU_COUNT)
+MHD_CPU_COUNT_DEF = -DMHD_CPU_COUNT=$(CPU_COUNT)
if USE_COVERAGE
AM_CFLAGS += --coverage
@@ -128,7 +128,7 @@ demo_SOURCES = \
demo_CFLAGS = \
$(PTHREAD_CFLAGS) $(AM_CFLAGS)
demo_CPPFLAGS = \
- $(AM_CPPFLAGS) $(CPU_COUNT_DEF)
+ $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF)
demo_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
$(PTHREAD_LIBS)
@@ -141,7 +141,7 @@ demo_https_SOURCES = \
demo_https_CFLAGS = \
$(PTHREAD_CFLAGS) $(AM_CFLAGS)
demo_https_CPPFLAGS = \
- $(AM_CPPFLAGS) $(CPU_COUNT_DEF)
+ $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF)
demo_https_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
$(PTHREAD_LIBS)
@@ -152,21 +152,21 @@ endif
benchmark_SOURCES = \
benchmark.c
benchmark_CPPFLAGS = \
- $(AM_CPPFLAGS) $(CPU_COUNT_DEF)
+ $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF)
benchmark_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la
suspend_resume_epoll_SOURCES = \
suspend_resume_epoll.c
suspend_resume_epoll_CPPFLAGS = \
- $(AM_CPPFLAGS) $(CPU_COUNT_DEF)
+ $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF)
suspend_resume_epoll_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la
benchmark_https_SOURCES = \
benchmark_https.c
benchmark_https_CPPFLAGS = \
- $(AM_CPPFLAGS) $(CPU_COUNT_DEF)
+ $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF)
benchmark_https_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la
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 @@
#include "platform.h"
#include <microhttpd.h>
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
#define PAGE \
@@ -42,7 +42,7 @@
* Number of threads to run in the thread pool. Should (roughly) match
* the number of cores on your system.
*/
-#define NUMBER_OF_THREADS CPU_COUNT
+#define NUMBER_OF_THREADS MHD_CPU_COUNT
static unsigned int small_deltas[SMALL];
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 @@
#include "platform.h"
#include <microhttpd.h>
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
#define PAGE \
@@ -42,7 +42,7 @@
* Number of threads to run in the thread pool. Should (roughly) match
* the number of cores on your system.
*/
-#define NUMBER_OF_THREADS CPU_COUNT
+#define NUMBER_OF_THREADS MHD_CPU_COUNT
static unsigned int small_deltas[SMALL];
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 @@
#include <limits.h>
#include <ctype.h>
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
#ifndef PATH_MAX
@@ -58,7 +58,7 @@
* Number of threads to run in the thread pool. Should (roughly) match
* the number of cores on your system.
*/
-#define NUMBER_OF_THREADS CPU_COUNT
+#define NUMBER_OF_THREADS MHD_CPU_COUNT
#ifdef MHD_HAVE_LIBMAGIC
/**
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 @@
#include <limits.h>
#include <ctype.h>
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
#ifndef PATH_MAX
@@ -61,7 +61,7 @@
* Number of threads to run in the thread pool. Should (roughly) match
* the number of cores on your system.
*/
-#define NUMBER_OF_THREADS CPU_COUNT
+#define NUMBER_OF_THREADS MHD_CPU_COUNT
#ifdef MHD_HAVE_LIBMAGIC
/**
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 @@
#include "platform.h"
#include <microhttpd.h>
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
@@ -92,7 +92,8 @@ testMultithreadedPoolGet (int poll_flag)
d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG
| poll_flag,
0, NULL, NULL, &ahc_echo, "GET",
- MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
MHD_OPTION_END);
+ MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
+ MHD_OPTION_END);
if (d == NULL)
return 4;
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
endif
AM_CPPFLAGS = \
--DCPU_COUNT=$(CPU_COUNT) \
+-DMHD_CPU_COUNT=$(CPU_COUNT) \
-I$(top_srcdir) \
-I$(top_srcdir)/src/microhttpd \
-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
.NOTPARALLEL:
-CPU_COUNT_DEF = -DCPU_COUNT=$(CPU_COUNT)
+MHD_CPU_COUNT_DEF = -DMHD_CPU_COUNT=$(CPU_COUNT)
AM_CPPFLAGS = \
-I$(top_srcdir)/src/include \
@@ -83,7 +83,7 @@ test_https_get_parallel_SOURCES = \
tls_test_common.h \
tls_test_common.c
test_https_get_parallel_CPPFLAGS = \
- $(AM_CPPFLAGS) $(CPU_COUNT_DEF)
+ $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF)
test_https_get_parallel_CFLAGS = \
$(PTHREAD_CFLAGS) $(AM_CFLAGS)
test_https_get_parallel_LDADD = \
@@ -107,7 +107,7 @@ test_https_get_parallel_threads_SOURCES = \
tls_test_common.h \
tls_test_common.c
test_https_get_parallel_threads_CPPFLAGS = \
- $(AM_CPPFLAGS) $(CPU_COUNT_DEF)
+ $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF)
test_https_get_parallel_threads_CFLAGS = \
$(PTHREAD_CFLAGS) $(AM_CFLAGS)
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 @@
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
#include "tls_test_common.h"
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 4
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 4
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 4
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 4
#endif
extern const char srv_key_pem[];
@@ -105,7 +105,7 @@ test_parallel_clients (void *cls, int port, const char
*cipher_suite,
int curl_proto_version)
{
int i;
- int client_count = (CPU_COUNT - 1);
+ int client_count = (MHD_CPU_COUNT - 1);
void *client_thread_ret;
pthread_t client_arr[client_count];
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 @@
#endif /* MHD_HTTPS_REQUIRE_GRYPT */
#include "tls_test_common.h"
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 4
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 4
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 4
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 4
#endif
extern const char srv_key_pem[];
@@ -106,7 +106,7 @@ test_parallel_clients (void *cls, int port, const char
*cipher_suite,
int curl_proto_version)
{
int i;
- int client_count = (CPU_COUNT - 1);
+ int client_count = (MHD_CPU_COUNT - 1);
void *client_thread_ret;
pthread_t client_arr[client_count];
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 @@
#include <sys/socket.h>
#endif
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
/**
@@ -360,7 +360,8 @@ testMultithreadedPoolGet (int port, int poll_flag)
d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG
| poll_flag,
port, NULL, NULL, &ahc_echo, "GET",
- MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
MHD_OPTION_END);
+ MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
+ MHD_OPTION_END);
if (d == NULL)
return 16;
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 @@
#include "gauger.h"
#include "mhd_has_in_name.h"
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
/**
@@ -55,11 +55,11 @@
* test (total number of requests will be ROUNDS * PAR).
* Ensure that free ports are not exhausted during test.
*/
-#if CPU_COUNT > 8
+#if MHD_CPU_COUNT > 8
#ifndef _WIN32
-#define ROUNDS (1 + (30000 / 12) / CPU_COUNT)
+#define ROUNDS (1 + (30000 / 12) / MHD_CPU_COUNT)
#else /* _WIN32 */
-#define ROUNDS (1 + (10000 / 12) / CPU_COUNT)
+#define ROUNDS (1 + (10000 / 12) / MHD_CPU_COUNT)
#endif /* _WIN32 */
#else
#define ROUNDS 500
@@ -68,7 +68,7 @@
/**
* How many requests do we do in parallel?
*/
-#define PAR CPU_COUNT
+#define PAR MHD_CPU_COUNT
/**
* Do we use HTTP 1.1?
@@ -372,7 +372,8 @@ testMultithreadedPoolGet (int port, int poll_flag)
d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG
| poll_flag,
port, NULL, NULL, &ahc_echo, "GET",
- MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
MHD_OPTION_END);
+ MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
+ MHD_OPTION_END);
if (d == NULL)
return 16;
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 @@
#include <pthread.h>
#endif /* HAVE_PTHREAD_H */
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
-#if CPU_COUNT > 32
-#undef CPU_COUNT
+#if MHD_CPU_COUNT > 32
+#undef MHD_CPU_COUNT
/* Limit to reasonable value */
-#define CPU_COUNT 32
-#endif /* CPU_COUNT > 32 */
+#define MHD_CPU_COUNT 32
+#endif /* MHD_CPU_COUNT > 32 */
/* Could be increased to facilitate debugging */
#define TIMEOUTS_VAL 5
@@ -700,7 +700,7 @@ startTestMhdDaemon (enum testMhdThreadsType thrType,
| MHD_USE_ERROR_LOG,
*pport, NULL, NULL,
&ahc_echo, "GET",
- MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
+ MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL,
MHD_OPTION_END);
@@ -969,7 +969,7 @@ testMultithreadedPoolGet (enum testMhdPollType pollType)
&d_port);
if (cleanup_test)
- return performTestCleanup (d, 10 * CPU_COUNT);
+ return performTestCleanup (d, 10 * MHD_CPU_COUNT);
return performTestQueries (d, d_port);
}
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 @@
#include <pthread.h>
#include "gauger.h"
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
/**
* How many requests do we do in parallel?
*/
-#define PAR (CPU_COUNT * 4)
+#define PAR (MHD_CPU_COUNT * 4)
/**
* Do we use HTTP 1.1?
@@ -318,7 +318,7 @@ testMultithreadedPoolGet (int port,
port,
NULL, NULL,
&ahc_echo, "GET",
- MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
+ MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
MHD_OPTION_END);
if (d == NULL)
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 @@
#include <unistd.h>
#endif
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
static int oneone;
@@ -296,7 +296,8 @@ testMultithreadedPoolDelete ()
d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG,
port,
NULL, NULL, &ahc_echo, &done_flag,
- MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
MHD_OPTION_END);
+ MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
+ MHD_OPTION_END);
if (d == NULL)
return 16;
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 @@
#include <sys/socket.h>
#endif
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
static int oneone;
@@ -341,7 +341,7 @@ testMultithreadedPoolGet (int poll_flag)
| poll_flag,
global_port, NULL, NULL,
&ahc_echo, "GET",
- MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
+ MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL,
MHD_OPTION_END);
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 @@
#include <unistd.h>
#endif
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
struct CBC
@@ -325,7 +325,8 @@ testMultithreadedPoolGet ()
cbc.pos = 0;
d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG,
port, NULL, NULL, &ahc_echo, "GET",
- MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
MHD_OPTION_END);
+ MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
+ MHD_OPTION_END);
if (d == NULL)
return 16;
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 @@
#include <sys/socket.h>
#endif
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
static int oneone;
@@ -305,7 +305,7 @@ testMultithreadedPoolGet (int poll_flag)
| poll_flag,
global_port, NULL, NULL,
&ahc_echo, "GET",
- MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
+ MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL,
MHD_OPTION_END);
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 @@
#include "mhd_has_in_name.h"
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
#define TESTSTR "/* DO NOT CHANGE THIS LINE */"
@@ -285,7 +285,8 @@ testMultithreadedPoolGet ()
ok = 1;
d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG,
port, NULL, NULL, &ahc_echo, "GET",
- MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
MHD_OPTION_END);
+ MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
+ MHD_OPTION_END);
if (d == NULL)
return 64;
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 @@
#include <unistd.h>
#endif
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
#define TESTSTR \
@@ -284,7 +284,8 @@ testMultithreadedPoolGet ()
cbc.pos = 0;
d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG,
port, NULL, NULL, &ahc_echo, "GET",
- MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
MHD_OPTION_END);
+ MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
+ MHD_OPTION_END);
if (d == NULL)
return 16;
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 @@
#include <windows.h>
#endif
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
static int oneone;
@@ -246,7 +246,7 @@ testMultithreadedPoolGet ()
d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG,
port, NULL, NULL, &ahc_echo, "GET",
MHD_OPTION_PER_IP_CONNECTION_LIMIT, 2,
- MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
+ MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
MHD_OPTION_END);
if (d == NULL)
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 @@
#include "test_helpers.h"
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
static int oneone;
@@ -379,7 +379,7 @@ testPutThreadPool (unsigned int add_flag)
| add_flag,
port,
NULL, NULL, &ahc_echo, &done_flag,
- MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
+ MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
MHD_OPTION_CONNECTION_MEMORY_LIMIT,
(size_t) (incr_read ? 1024 : (PUT_SIZE * 4)),
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 @@
#include <unistd.h>
#endif
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
static int oneone;
@@ -301,7 +301,8 @@ testMultithreadedPoolPut ()
d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG,
port,
NULL, NULL, &ahc_echo, &done_flag,
- MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
MHD_OPTION_END);
+ MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
+ MHD_OPTION_END);
if (d == NULL)
return 16;
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 @@
#include "mhd_has_in_name.h"
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
#define POST_DATA "name=daniel&project=curl"
@@ -341,7 +341,7 @@ testMultithreadedPoolPost ()
cbc.pos = 0;
d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG,
port, NULL, NULL, &ahc_echo, NULL,
- MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
+ MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL,
MHD_OPTION_END);
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 @@
#include <unistd.h>
#endif
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
#define POST_DATA \
@@ -317,7 +317,8 @@ testMultithreadedPoolPost ()
cbc.size = 2048;
d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG,
port, NULL, NULL, &ahc_echo, NULL,
- MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
MHD_OPTION_END);
+ MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
+ MHD_OPTION_END);
if (d == NULL)
return 16;
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 @@
#include "mhd_has_in_name.h"
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
static int oneone;
@@ -361,7 +361,7 @@ testMultithreadedPoolPost ()
cbc.pos = 0;
d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG,
port, NULL, NULL, &ahc_echo, NULL,
- MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
+ MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
MHD_OPTION_NOTIFY_COMPLETED, &completed_cb, NULL,
MHD_OPTION_END);
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 @@
#include <unistd.h>
#endif
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
static int oneone;
@@ -318,7 +318,8 @@ testMultithreadedPoolGet ()
cbc.pos = 0;
d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG,
port, NULL, NULL, &ahc_echo, "GET",
- MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
MHD_OPTION_END);
+ MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
+ MHD_OPTION_END);
if (d == NULL)
return 16;
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 @@
#include <unistd.h>
#endif
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
static int oneone;
@@ -306,7 +306,8 @@ testMultithreadedPoolPut ()
d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG,
port,
NULL, NULL, &ahc_echo, &done_flag,
- MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
MHD_OPTION_END);
+ MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
+ MHD_OPTION_END);
if (d == NULL)
return 16;
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 @@
#include <unistd.h>
#endif
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
struct CBC
@@ -305,7 +305,8 @@ testMultithreadedPoolPut ()
d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG,
port,
NULL, NULL, &ahc_echo, &done_flag,
- MHD_OPTION_THREAD_POOL_SIZE, CPU_COUNT,
MHD_OPTION_END);
+ MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT,
+ MHD_OPTION_END);
if (d == NULL)
return 16;
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 @@
#include <sys/socket.h>
#endif
-#if defined(CPU_COUNT) && (CPU_COUNT + 0) < 2
-#undef CPU_COUNT
+#if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 2
+#undef MHD_CPU_COUNT
#endif
-#if ! defined(CPU_COUNT)
-#define CPU_COUNT 2
+#if ! defined(MHD_CPU_COUNT)
+#define MHD_CPU_COUNT 2
#endif
@@ -553,20 +553,20 @@ main (int argc, char *const *argv)
errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, 0, 0);
errorCount += testGet (MHD_USE_THREAD_PER_CONNECTION
| MHD_USE_INTERNAL_POLLING_THREAD, 0, 0);
- errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, CPU_COUNT, 0);
+ errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, MHD_CPU_COUNT, 0);
if (MHD_YES == MHD_is_feature_supported (MHD_FEATURE_POLL))
{
errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, 0, MHD_USE_POLL);
errorCount += testGet (MHD_USE_THREAD_PER_CONNECTION
| MHD_USE_INTERNAL_POLLING_THREAD, 0,
MHD_USE_POLL);
- errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, CPU_COUNT,
+ errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, MHD_CPU_COUNT,
MHD_USE_POLL);
}
if (MHD_YES == MHD_is_feature_supported (MHD_FEATURE_EPOLL))
{
errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, 0,
MHD_USE_EPOLL);
- errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, CPU_COUNT,
+ errorCount += testGet (MHD_USE_INTERNAL_POLLING_THREAD, MHD_CPU_COUNT,
MHD_USE_EPOLL);
}
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libmicrohttpd] branch master updated: Fixed conflict with system CPU_COUNT macro,
gnunet <=