gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 01/15: Added ability to check for MHD debug builds at ru


From: gnunet
Subject: [libmicrohttpd] 01/15: Added ability to check for MHD debug builds at run-time
Date: Fri, 28 Oct 2022 11:21:50 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 30beb61e117fdfe1f7b1bca602c5c4b1cce33fc5
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Fri Oct 14 11:25:29 2022 +0300

    Added ability to check for MHD debug builds at run-time
---
 src/include/microhttpd.h | 12 ++++++++++--
 src/microhttpd/daemon.c  |  6 ++++++
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 13bfa554..34b35c4f 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -96,7 +96,7 @@ extern "C"
  * they are parsed as decimal numbers.
  * Example: 0x01093001 = 1.9.30-1.
  */
-#define MHD_VERSION 0x00097542
+#define MHD_VERSION 0x00097543
 
 /* If generic headers don't work on your platform, include headers
    which define 'va_list', 'size_t', 'ssize_t', 'intptr_t', 'off_t',
@@ -6186,7 +6186,15 @@ enum MHD_FEATURE
    * unlikely.
    * @note Available since #MHD_VERSION 0x00097540
    */
-  MHD_FEATURE_EXTERN_HASH = 32
+  MHD_FEATURE_EXTERN_HASH = 32,
+
+  /**
+   * Get whether MHD was built with asserts enabled.
+   * For debug builds the error log is always enabled even if 
#MHD_USE_ERROR_LOG
+   * is not specified for daemon.
+   * @note Available since #MHD_VERSION 0x00097543
+   */
+  MHD_FEATURE_DEBUG_BUILD = 33
 };
 
 
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 90a49e91..c5aa3d9d 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -8747,6 +8747,12 @@ MHD_is_feature_supported (enum MHD_FEATURE feature)
 #else
     return MHD_NO;
 #endif
+  case MHD_FEATURE_DEBUG_BUILD:
+#ifdef _DEBUG
+    return MHD_YES;
+#else
+    return MHD_NO;
+#endif
 
   default:
     break;

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]