aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--CMakeOptions.txt2
-rw-r--r--ui/version_info.c14
-rw-r--r--wsutil/unicode-utils.h10
4 files changed, 12 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3364b79e72..b38a12c752 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -459,7 +459,7 @@ set_property(DIRECTORY
"G_DISABLE_SINGLE_INCLUDES"
$<$<OR:$<NOT:$<BOOL:${ENABLE_ASSERT}>>,$<CONFIG:Release>>:WS_DISABLE_ASSERT>
$<$<OR:$<NOT:$<BOOL:${ENABLE_DEBUG}>>,$<CONFIG:Release>>:WS_DISABLE_DEBUG>
- $<$<BOOL:${ENABLE_DEBUG_MBS}>:WS_DEBUG_UTF_8>
+ $<$<OR:$<BOOL:${ENABLE_DEBUG_MBS}>,$<CONFIG:Debug>>:WS_DEBUG_UTF_8>
)
if(WIN32)
diff --git a/CMakeOptions.txt b/CMakeOptions.txt
index eaa1347fa2..daa0356c95 100644
--- a/CMakeOptions.txt
+++ b/CMakeOptions.txt
@@ -54,7 +54,7 @@ option(BUILD_fuzzshark "Build fuzzshark" OFF)
option(ENABLE_WERROR "Treat warnings as errors" ON)
option(ENABLE_DEBUG "Enable debug code" ON)
option(ENABLE_ASSERT "Enable assertions" ON)
-option(ENABLE_DEBUG_MBS "Enable extra debug checks for detecting invalid multibyte (UTF-8) strings" ON)
+option(ENABLE_DEBUG_MBS "Enable extra debug checks for detecting invalid multibyte (UTF-8) strings" OFF)
option(ENABLE_DEBUG_A2W "Enable line directive from .cnf file" OFF)
option(ENABLE_CCACHE "Speed up compiling and linking using ccache if possible" OFF)
diff --git a/ui/version_info.c b/ui/version_info.c
index 40b1950614..f7adb2753e 100644
--- a/ui/version_info.c
+++ b/ui/version_info.c
@@ -208,18 +208,24 @@ get_compiled_version_info(gather_feature_func gather_compile)
#endif
#ifdef WS_DISABLE_DEBUG
- g_string_append(str, ", release build");
+ g_string_append(str, ", release build (");
+#else
+ g_string_append(str, ", debug build (");
#endif
#ifdef WS_DISABLE_ASSERT
- g_string_append(str, ", without assertions");
+ g_string_append(str, "-assert");
+#else
+ g_string_append(str, "+assert");
#endif
#ifdef WS_DEBUG_UTF_8
- g_string_append(str, ", with UTF-8 validation");
+ g_string_append(str, " +utf8");
+#else
+ g_string_append(str, " -utf8");
#endif
- g_string_append(str, ".");
+ g_string_append(str, ").");
end_string(str);
free_features(&l);
diff --git a/wsutil/unicode-utils.h b/wsutil/unicode-utils.h
index 049f0dd1cd..cacb606b4d 100644
--- a/wsutil/unicode-utils.h
+++ b/wsutil/unicode-utils.h
@@ -49,16 +49,6 @@ extern "C" {
#define WS_UTF_8_DEBUG_HERE(str, len) \
_CHECK_UTF_8(LOG_LEVEL_ECHO, str, len)
-#define WS_UTF_8_SANITIZE_STRBUF(buf) \
- do { \
- const char *__uni_endptr; \
- if (!wmem_strbuf_utf8_validate(buf, &__uni_endptr)) { \
- ws_log_utf8(buf->str, buf->len, __uni_endptr); \
- wmem_strbuf_utf8_make_valid(buf); \
- } \
- } while (0)
-
-
WSUTIL_EXPORT
int ws_utf8_seqlen[256];