Fixed conflict with system CPU_COUNT macro

This commit is contained in:
Evgeny Grin (Karlson2k) committed 2020-10-25 22:52:53 +03:00
1 parent 01fec59041
commit 8cb26daea6
30 files changed
+169 -157

No files matched your search

+3 -3
View File
@@ -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 = \
+5 -5
View File
@@ -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 =
@@ -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 =