[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 120/156: Simplified usage of the function name magic mac
From: |
gnunet |
Subject: |
[libmicrohttpd] 120/156: Simplified usage of the function name magic macros |
Date: |
Sun, 28 May 2023 17:52:53 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to tag v0.9.77
in repository libmicrohttpd.
commit a88af55d0f8fcccbb1c3591318bbd56515f93d3b
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Fri May 19 14:26:43 2023 +0300
Simplified usage of the function name magic macros
---
src/include/mhd_options.h | 15 +++++++++++++++
src/microhttpd/connection.c | 8 ++++----
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/src/include/mhd_options.h b/src/include/mhd_options.h
index a4cc0a36..75fd7b76 100644
--- a/src/include/mhd_options.h
+++ b/src/include/mhd_options.h
@@ -166,4 +166,19 @@
#endif /* ! (MHD_ASAN_ACTIVE && HAVE_SANITIZER_ASAN_INTERFACE_H &&
(FUNC_ATTR_PTRCOMPARE_WOKRS || FUNC_ATTR_NOSANITIZE_WORKS)) */
+
+/**
+ * Automatic string with the name of the current function
+ */
+#if defined(HAVE___FUNC__)
+#define MHD_FUNC_ __func__
+#elif defined(HAVE___FUNCTION__)
+#define MHD_FUNC_ __FUNCTION__
+#elif defined(HAVE___PRETTY_FUNCTION__)
+#define MHD_FUNC_ __PRETTY_FUNCTION__
+#else
+#define MHD_FUNC_ "**name unavailable**"
+#endif
+
+
#endif /* MHD_OPTIONS_H */
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 2aa6344d..8ed4fa36 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -2433,7 +2433,7 @@ MHD_connection_update_event_loop_info (struct
MHD_Connection *connection)
#if DEBUG_STATES
MHD_DLOG (connection->daemon,
_ ("In function %s handling connection at state: %s\n"),
- __FUNCTION__,
+ MHD_FUNC_,
MHD_state_to_string (connection->state));
#endif
switch (connection->state)
@@ -3767,7 +3767,7 @@ MHD_connection_handle_read (struct MHD_Connection
*connection,
#if DEBUG_STATES
MHD_DLOG (connection->daemon,
_ ("In function %s handling connection at state: %s\n"),
- __FUNCTION__,
+ MHD_FUNC_,
MHD_state_to_string (connection->state));
#endif
switch (connection->state)
@@ -3844,7 +3844,7 @@ MHD_connection_handle_write (struct MHD_Connection
*connection)
#if DEBUG_STATES
MHD_DLOG (connection->daemon,
_ ("In function %s handling connection at state: %s\n"),
- __FUNCTION__,
+ MHD_FUNC_,
MHD_state_to_string (connection->state));
#endif
switch (connection->state)
@@ -4409,7 +4409,7 @@ MHD_connection_handle_idle (struct MHD_Connection
*connection)
#if DEBUG_STATES
MHD_DLOG (daemon,
_ ("In function %s handling connection at state: %s\n"),
- __FUNCTION__,
+ MHD_FUNC_,
MHD_state_to_string (connection->state));
#endif
switch (connection->state)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] 137/156: ChangeLog: updated, (continued)
- [libmicrohttpd] 137/156: ChangeLog: updated, gnunet, 2023/05/28
- [libmicrohttpd] 91/156: autoinit_funcs.h: added more macros checks for platform identification, gnunet, 2023/05/28
- [libmicrohttpd] 122/156: tests: fixed code style, gnunet, 2023/05/28
- [libmicrohttpd] 121/156: tests: unified use of function name macros, gnunet, 2023/05/28
- [libmicrohttpd] 127/156: Updated test keys to use SHA-256 hash instead of SHA-1, gnunet, 2023/05/28
- [libmicrohttpd] 135/156: W32 VS projects: target Win8 or later on ARM and ARM64 arches, gnunet, 2023/05/28
- [libmicrohttpd] 136/156: W32 VS projects: added ARM and ARM64 configurations, gnunet, 2023/05/28
- [libmicrohttpd] 102/156: configure: removed 'gettext' from the final report, gnunet, 2023/05/28
- [libmicrohttpd] 109/156: test_client_put_stop: avoid stress-testing the OS, gnunet, 2023/05/28
- [libmicrohttpd] 115/156: test_post: fixed caseless key name match, gnunet, 2023/05/28
- [libmicrohttpd] 120/156: Simplified usage of the function name magic macros,
gnunet <=
- [libmicrohttpd] 131/156: ChangeLog: updated, gnunet, 2023/05/28
- [libmicrohttpd] 138/156: Fixed compiler warning on x32, gnunet, 2023/05/28
- [libmicrohttpd] 78/156: Added tests with single and double folded header, gnunet, 2023/05/28
- [libmicrohttpd] 110/156: digest auth: fixed parallel access to the hash table, gnunet, 2023/05/28
- [libmicrohttpd] 114/156: examples/largepost.c: fixed code style, gnunet, 2023/05/28
- [libmicrohttpd] 125/156: .gitignore: force include all *.{c,h} files, gnunet, 2023/05/28
- [libmicrohttpd] 113/156: examples/largepost.c: fixed caseless method match, gnunet, 2023/05/28
- [libmicrohttpd] 129/156: Detect sysctl() symbols in configure, gnunet, 2023/05/28
- [libmicrohttpd] 98/156: .gitignore: added universal patter to ignore test binaries, gnunet, 2023/05/28
- [libmicrohttpd] 140/156: Added support for custom command for tarball compression, gnunet, 2023/05/28