From 1c0852b1b5dbd0a5464dfbd706591938ca74c7d7 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 8 Jul 2015 14:44:22 +0100 Subject: [PATCH] Do not use __FUNCTION__ as it's unportable. --- src/libserver/buffer.c | 2 +- src/libutil/logger.c | 6 +++--- src/lua/lua_logger.c | 4 ++-- src/smtp_proxy.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/libserver/buffer.c b/src/libserver/buffer.c index 1cb09df46..2e41dd94c 100644 --- a/src/libserver/buffer.c +++ b/src/libserver/buffer.c @@ -33,7 +33,7 @@ #define G_DISPATCHER_ERROR dispatcher_error_quark () #define debug_ip(...) rspamd_conditional_debug (rspamd_main->logger, \ NULL, \ - __FUNCTION__, \ + G_STRFUNC, \ __VA_ARGS__) static void dispatcher_cb (gint fd, short what, void *arg); diff --git a/src/libutil/logger.c b/src/libutil/logger.c index cdbbc0154..5c2670856 100644 --- a/src/libutil/logger.c +++ b/src/libutil/logger.c @@ -226,7 +226,7 @@ rspamd_log_close_priv (rspamd_logger_t *rspamd_log, uid_t uid, gid_t gid) } /* It is safe to use temporary buffer here as it is not static */ file_log_function (NULL, - __FUNCTION__, + G_STRFUNC, rspamd_log->cfg->log_level, tmpbuf, TRUE, @@ -628,7 +628,7 @@ file_log_function (const gchar * log_domain, arg); } file_log_function (log_domain, - __FUNCTION__, + G_STRFUNC, log_level, tmpbuf, forced, @@ -665,7 +665,7 @@ file_log_function (const gchar * log_domain, rspamd_log->saved_function = NULL; } file_log_function (log_domain, - __FUNCTION__, + G_STRFUNC, log_level, tmpbuf, forced, diff --git a/src/lua/lua_logger.c b/src/lua/lua_logger.c index 7108c94a3..dd5d90cc8 100644 --- a/src/lua/lua_logger.c +++ b/src/lua/lua_logger.c @@ -174,14 +174,14 @@ lua_common_log_line (GLogLevelFlags level, lua_State *L, const gchar *msg) if (level == G_LOG_LEVEL_DEBUG) { rspamd_conditional_debug (rspamd_main->logger, NULL, - __FUNCTION__, + G_STRFUNC, "%s", msg); } else { rspamd_common_log_function (rspamd_main->logger, level, - __FUNCTION__, + G_STRFUNC, "%s", msg); } diff --git a/src/smtp_proxy.c b/src/smtp_proxy.c index 281c93b6b..bb53a7e7d 100644 --- a/src/smtp_proxy.c +++ b/src/smtp_proxy.c @@ -657,7 +657,7 @@ smtp_dns_cb (struct rdns_reply *reply, void *arg) /* Parse reverse reply and start resolve of this ip */ if (reply->code != RDNS_RC_NOERROR) { rspamd_conditional_debug (rspamd_main->logger, - NULL, __FUNCTION__, "DNS error: %s", + NULL, G_STRFUNC, "DNS error: %s", rdns_strerror (reply->code)); if (reply->code == RDNS_RC_NXDOMAIN) { @@ -686,7 +686,7 @@ smtp_dns_cb (struct rdns_reply *reply, void *arg) case SMTP_PROXY_STATE_RESOLVE_NORMAL: if (reply->code != RDNS_RC_NOERROR) { rspamd_conditional_debug (rspamd_main->logger, - NULL, __FUNCTION__, "DNS error: %s", + NULL, G_STRFUNC, "DNS error: %s", rdns_strerror (reply->code)); if (reply->code == RDNS_RC_NXDOMAIN) { -- 2.39.5