From 4c2a95eab27a7622008a3365eadaa5fa9824dfbf Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Mon, 16 Oct 2017 12:34:13 +0100 Subject: [PATCH] Problem: test_ctx_options only checks global DRAFT flag Solution: this will break once the tested APIs move from DRAFT to STABLE so instead check for the specific macros. --- tests/test_ctx_options.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_ctx_options.cpp b/tests/test_ctx_options.cpp index 102a5cdc..18c668e7 100644 --- a/tests/test_ctx_options.cpp +++ b/tests/test_ctx_options.cpp @@ -81,7 +81,7 @@ void test_ctx_thread_opts(void* ctx) assert (rc == -1 && errno == EINVAL); rc = zmq_ctx_set(ctx, ZMQ_THREAD_PRIORITY, ZMQ_THREAD_PRIORITY_DFLT); assert (rc == -1 && errno == EINVAL); -#if ZMQ_BUILD_DRAFT_API +#ifdef ZMQ_THREAD_AFFINITY rc = zmq_ctx_set(ctx, ZMQ_THREAD_AFFINITY, ZMQ_THREAD_AFFINITY_DFLT); assert (rc == -1 && errno == EINVAL); #endif @@ -113,7 +113,7 @@ void test_ctx_thread_opts(void* ctx) } -#if ZMQ_BUILD_DRAFT_API +#ifdef ZMQ_THREAD_AFFINITY // test affinity: int cpu_affinity_test = (1 << 0); @@ -145,7 +145,7 @@ int main (void) #endif assert (zmq_ctx_get (ctx, ZMQ_IO_THREADS) == ZMQ_IO_THREADS_DFLT); assert (zmq_ctx_get (ctx, ZMQ_IPV6) == 0); -#if defined (ZMQ_BUILD_DRAFT_AP) +#if defined (ZMQ_MSG_T_SIZE) assert (zmq_ctx_get (ctx, ZMQ_MSG_T_SIZE) == sizeof (zmq_msg_t)); #endif