mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
Simplified usage of the function name magic macros
This commit is contained in:
@@ -172,4 +172,19 @@
|
||||
#endif /* ! (MHD_ASAN_ACTIVE && HAVE_SANITIZER_ASAN_INTERFACE_H &&
|
||||
(FUNC_ATTR_PTRCOMPARE_WORKS || 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 */
|
||||
|
||||
@@ -2564,7 +2564,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)
|
||||
@@ -4198,7 +4198,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
|
||||
/* TODO: check whether the next 'switch()' really needed */
|
||||
@@ -4292,7 +4292,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)
|
||||
@@ -4849,7 +4849,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)
|
||||
|
||||
Reference in New Issue
Block a user