From 301de3ac5c7cf8a5eaaf3c58157251db781841d6 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 24 May 2018 14:59:39 -0700 Subject: fixes #486 Revisit SOVERSION and VERSION fixes #485 Honor BUILD_SHARED_LIBS fixes #483 Don't expose private symbols in shared library fixes #481 Export CMake target This is a "large" commit involving changes that don't affect the code directly, but which have an impact on how we package and build our project. The most significant of these changes is that we now build only either a shared or a static library, depending on the setting of the BUILD_SHARED_LIBS option. We also suppress private symbols from being exposed when the underlying toolchain lets us do so. Minor updates to the way we version the ABI are used, and we now have a nice exported CMake project. To import this project in another, simply do find_package(nng) and you can add target_link_libraries(nng::nng) to your targets. CMake does the rest for you. --- tests/httpclient.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests/httpclient.c') diff --git a/tests/httpclient.c b/tests/httpclient.c index e167587e..96597d0c 100644 --- a/tests/httpclient.c +++ b/tests/httpclient.c @@ -18,6 +18,7 @@ // Basic HTTP client tests. #include "core/nng_impl.h" #include "supplemental/http/http.h" +#include "supplemental/sha1/sha1.c" #include "supplemental/sha1/sha1.h" #include "supplemental/tls/tls.h" @@ -26,8 +27,6 @@ const uint8_t example_sum[20] = { 0x0e, 0x97, 0x3b, 0x59, 0xf4, 0x76, 0x00, 0xc0 }; TestMain("HTTP Client", { - - nni_init(); atexit(nng_fini); Convey("Given a TCP connection to httpbin.org", { @@ -86,9 +85,9 @@ TestMain("HTTP Client", { sz = atoi(cstr); So(sz > 0); - data = nni_alloc(sz); + data = nng_alloc(sz); So(data != NULL); - Reset({ nni_free(data, sz); }); + Reset({ nng_free(data, sz); }); iov.iov_buf = data; iov.iov_len = sz; -- cgit v1.2.3-70-g09d2