You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by go...@apache.org on 2008/09/09 05:46:20 UTC

svn commit: r693357 - in /perl/modperl/trunk/src/modules/perl: modperl_apache_compat.c modperl_common_log.h

Author: gozer
Date: Mon Sep  8 20:46:19 2008
New Revision: 693357

URL: http://svn.apache.org/viewvc?rev=693357&view=rev
Log:
__func__ is gcc-specific, use the safer, cross-platform MP_FUNC instead.

Note: this needed exposing MP_FUNC all the time, not just when MP_TRACE is enabled,
but since it's a preprocessor macro, it will not hurt at all.


Modified:
    perl/modperl/trunk/src/modules/perl/modperl_apache_compat.c
    perl/modperl/trunk/src/modules/perl/modperl_common_log.h

Modified: perl/modperl/trunk/src/modules/perl/modperl_apache_compat.c
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_apache_compat.c?rev=693357&r1=693356&r2=693357&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_apache_compat.c (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_apache_compat.c Mon Sep  8 20:46:19 2008
@@ -36,7 +36,7 @@
         dTHX; \
         Perl_warn(aTHX_ "%s() not available until httpd/%s " \
                         "falling back to %s()", \
-                  __func__, ver, fallback); \
+                  MP_FUNC, ver, fallback); \
     }
 
 /* added in APACHE_2.2.4 */
@@ -59,7 +59,7 @@
         dTHX; \
         Perl_warn(aTHX_ "%s() is deprecated since httpd/%s " \
                         "try using %s() instead", \
-                  __func__, ver, fallback); \
+                  MP_FUNC, ver, fallback); \
     }
 
 AP_DECLARE(const char *) ap_get_server_version(void) {

Modified: perl/modperl/trunk/src/modules/perl/modperl_common_log.h
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_common_log.h?rev=693357&r1=693356&r2=693357&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_common_log.h (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_common_log.h Mon Sep  8 20:46:19 2008
@@ -20,7 +20,6 @@
 #define MP_STRINGIFY(n) MP_STRINGIFY_HELPER(n)
 #define MP_STRINGIFY_HELPER(n) #n
 
-#ifdef MP_TRACE
 #   if defined(__GNUC__)
 #      if (__GNUC__ > 2)
 #         define MP_FUNC __func__
@@ -30,9 +29,6 @@
 #   else
 #      define MP_FUNC __FILE__ ":" MP_STRINGIFY(__LINE__)
 #   endif
-#else
-#   define MP_FUNC NULL
-#endif
 
 #include "modperl_apr_includes.h"
 #include "apr_lib.h"