libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 7eef6dd3e45975012afcc03ba30dfb951984910f
parent d9c37e01a930966bcc714cd0e5d78d28be8662b0
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Mon,  6 Jun 2022 14:36:52 +0300

Excluded build on the new string functions when they are unused

Diffstat:
Msrc/microhttpd/Makefile.am | 8++++++--
Msrc/microhttpd/mhd_str.c | 4++++
Msrc/microhttpd/mhd_str.h | 3+++
3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am @@ -258,7 +258,11 @@ endif if HAVE_ANYAUTH check_PROGRAMS += \ - test_auth_parse test_str_quote + test_auth_parse +endif +if ENABLE_DAUTH +check_PROGRAMS += \ + test_str_quote endif TESTS = $(check_PROGRAMS) @@ -435,7 +439,7 @@ test_sha1_SOURCES = \ sha1.c sha1.h mhd_bithelpers.h mhd_byteorder.h mhd_align.h test_auth_parse_SOURCES = \ - test_auth_parse.c gen_auth.c gen_auth.h mhd_str.h mhd_str.c + test_auth_parse.c gen_auth.c gen_auth.h mhd_str.h mhd_str.c mhd_assert.h test_str_quote_SOURCES = \ test_str_quote.c mhd_str.h mhd_str.c mhd_assert.h diff --git a/src/microhttpd/mhd_str.c b/src/microhttpd/mhd_str.c @@ -1387,6 +1387,7 @@ MHD_bin_to_hex (const void *bin, } +#ifdef DAUTH_SUPPORT bool MHD_str_equal_quoted_bin_n (const char *quoted, size_t quoted_len, @@ -1440,3 +1441,6 @@ MHD_str_unquote (const char *quoted, } return w; } + + +#endif /* DAUTH_SUPPORT */ diff --git a/src/microhttpd/mhd_str.h b/src/microhttpd/mhd_str.h @@ -475,6 +475,7 @@ MHD_bin_to_hex (const void *bin, size_t size, char *hex); +#ifdef DAUTH_SUPPORT /** * Check two strings for equality, "unquoting" the first string from quoted * form as specified by RFC7230#section-3.2.6 and RFC7694#quoted.strings. @@ -520,4 +521,6 @@ MHD_str_unquote (const char *quoted, size_t quoted_len, char *result); +#endif /* DAUTH_SUPPORT */ + #endif /* MHD_STR_H */