aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil/CMakeLists.txt
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2021-06-25 04:55:46 +0100
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-06-25 22:06:32 +0000
commit7aae691f7d3c0c419e0b5b424dc2b62b2ded1ab3 (patch)
tree9ff91f1e154772ba7a241a988340a14dc39f654e /wsutil/CMakeLists.txt
parent53704fb971a45340afe4079d9da9fd1427468b29 (diff)
wsutil: Rewrite ws_assert() to minimize dependencies
This includes as little as possible in the assertion header, so that it can be included globally in every file without pulling any unwanted definitions. In particular pulling stdlib.h is avoided because that can have side effects if it wants to include non-portable extensions. It is possible to have side-effects from include glib.h too, for example because of G_LOG_DOMAIN. These side-effects are usually avoidable with careful ordering of pre-processor directives but with multiple levels of indirections it can be hard to track. Better to make it robust to these kinds of failures in the first place. Also integrate with our logger for a cohesive experience (but keep it a private dependency).
Diffstat (limited to 'wsutil/CMakeLists.txt')
-rw-r--r--wsutil/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt
index f26674f603..3957e1988b 100644
--- a/wsutil/CMakeLists.txt
+++ b/wsutil/CMakeLists.txt
@@ -122,6 +122,7 @@ set(WSUTIL_COMMON_FILES
type_util.c
unicode-utils.c
glib-compat.c
+ ws_assert.c
ws_mempbrk.c
ws_pipe.c
wsgcrypt.c