aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-08-25 11:11:35 -0700
committerGarrett D'Amore <garrett@damore.org>2017-08-28 11:39:03 -0700
commit601c64ec4f2b8a41fba59d31a987090feeb69e84 (patch)
tree985ec57b3e238b4eed9b42ddaa4736b949df8c6f /CMakeLists.txt
parent595da8102f3e34e95dad351bc55cd45421616723 (diff)
downloadnng-601c64ec4f2b8a41fba59d31a987090feeb69e84.tar.gz
nng-601c64ec4f2b8a41fba59d31a987090feeb69e84.tar.bz2
nng-601c64ec4f2b8a41fba59d31a987090feeb69e84.zip
Introduce utility safe string handling functions.
We have our versions of strdup, strlcat, and strlcpy. This means we can avoid using snprintf() in many cases (saving cycles), and we can get safer checks. We use the platform supplied versions of these if they exist (wrapping with nni_xxx versions.)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d7d05c56..87320843 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -239,6 +239,10 @@ else ()
nng_check_struct_member(msghdr msg_control sys/socket.h NNG_HAVE_MSG_CONTROL)
endif ()
+nng_check_sym (strdup string.h NNG_HAVE_STRDUP)
+nng_check_sym (strlcat string.h NNG_HAVE_STRLCAT)
+nng_check_sym (strlcpy string.h NNG_HAVE_STRLCPY)
+
add_subdirectory (src)
if (NNG_TESTS)