From 924bce6478d19140a9d3e908dc0be4660ea64b8e Mon Sep 17 00:00:00 2001 From: Constantin Rack Date: Wed, 20 Jan 2016 18:38:52 +0100 Subject: [PATCH 1/3] Problem: build fails due to undefined INT_MAX Solution: include climits Fixes #1720 --- src/zmq.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/zmq.cpp b/src/zmq.cpp index 6cddc44c..d4480c93 100644 --- a/src/zmq.cpp +++ b/src/zmq.cpp @@ -63,6 +63,7 @@ struct iovec { #include #include #include +#include #include "proxy.hpp" #include "socket_base.hpp" From b7d42a4c4bd24e3e0674373a1340a0a62d530626 Mon Sep 17 00:00:00 2001 From: Constantin Rack Date: Wed, 20 Jan 2016 19:18:00 +0100 Subject: [PATCH 2/3] Problem: SIZE_MAX is not defined Solution: include stdint.h --- tests/test_large_msg.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_large_msg.cpp b/tests/test_large_msg.cpp index c0e6f58f..252010ce 100644 --- a/tests/test_large_msg.cpp +++ b/tests/test_large_msg.cpp @@ -28,6 +28,7 @@ */ #include +#include #include "testutil.hpp" int main (void) From 5c9bd5f0cb7d984ecd807ba22d2fc9ffd26f2ed5 Mon Sep 17 00:00:00 2001 From: Constantin Rack Date: Wed, 20 Jan 2016 19:30:21 +0100 Subject: [PATCH 3/3] Problem: SIZE_MAX is not defined in all stdint.h includes Solution: remove debug printf line completely --- tests/test_large_msg.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/test_large_msg.cpp b/tests/test_large_msg.cpp index 252010ce..43b490f1 100644 --- a/tests/test_large_msg.cpp +++ b/tests/test_large_msg.cpp @@ -28,7 +28,6 @@ */ #include -#include #include "testutil.hpp" int main (void) @@ -49,7 +48,6 @@ int main (void) zmq_msg_t msg, rcv; size_t big = 64 + (size_t) INT_MAX; - printf("Large msg: %u %llu %lu\n", INT_MAX, SIZE_MAX, big); rc = zmq_msg_init_size (&msg, big); assert (rc == 0);