You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2011/06/09 15:31:11 UTC
svn commit: r1133866 - in /subversion/trunk/subversion:
include/private/svn_debug.h libsvn_subr/debug.c
Author: stsp
Date: Thu Jun 9 13:31:11 2011
New Revision: 1133866
URL: http://svn.apache.org/viewvc?rev=1133866&view=rev
Log:
Revert r1133865 because Windows compilers are too stupid to know about __func__.
Modified:
subversion/trunk/subversion/include/private/svn_debug.h
subversion/trunk/subversion/libsvn_subr/debug.c
Modified: subversion/trunk/subversion/include/private/svn_debug.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_debug.h?rev=1133866&r1=1133865&r2=1133866&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_debug.h (original)
+++ subversion/trunk/subversion/include/private/svn_debug.h Thu Jun 9 13:31:11 2011
@@ -39,8 +39,7 @@ extern "C" {
/* A couple helper functions for the macros below. */
void
-svn_dbg__preamble(const char *file, long line, const char *func,
- FILE *output);
+svn_dbg__preamble(const char *file, long line, FILE *output);
void
svn_dbg__printf(const char *fmt, ...)
__attribute__((format(printf, 1, 2)));
@@ -55,7 +54,7 @@ svn_dbg__printf(const char *fmt, ...)
for breakpoints. */
#ifdef SVN_DBG_QUIET
-#define SVN_DBG(ARGS) svn_dbg__preamble(__FILE__, __LINE__, __func__, NULL)
+#define SVN_DBG(ARGS) svn_dbg__preamble(__FILE__, __LINE__, NULL)
#else
@@ -76,8 +75,8 @@ svn_dbg__printf(const char *fmt, ...)
* Note that these output lines are filtered by our test suite automatically,
* so you don't have to worry about throwing off expected output.
*/
-#define SVN_DBG(ARGS) (svn_dbg__preamble(__FILE__, __LINE__, __func__, \
- SVN_DBG_OUTPUT), svn_dbg__printf ARGS)
+#define SVN_DBG(ARGS) (svn_dbg__preamble(__FILE__, __LINE__, SVN_DBG_OUTPUT), \
+ svn_dbg__printf ARGS)
#endif
Modified: subversion/trunk/subversion/libsvn_subr/debug.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/debug.c?rev=1133866&r1=1133865&r2=1133866&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/debug.c (original)
+++ subversion/trunk/subversion/libsvn_subr/debug.c Thu Jun 9 13:31:11 2011
@@ -43,8 +43,7 @@ quiet_mode(void)
void
-svn_dbg__preamble(const char *file, long line, const char *func,
- FILE *output)
+svn_dbg__preamble(const char *file, long line, FILE *output)
{
debug_output = output;
@@ -60,7 +59,7 @@ svn_dbg__preamble(const char *file, long
else
++slash;
- fprintf(output, "DBG: %s:%4ld:%s(): ", slash, line, func);
+ fprintf(output, "DBG: %s:%4ld: ", slash, line);
}
}
RE: svn commit: r1133866 - in /subversion/trunk/subversion: include/private/svn_debug.h libsvn_subr/debug.c
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: Greg Stein [mailto:gstein@gmail.com]
> Sent: donderdag 9 juni 2011 21:42
> To: dev@subversion.apache.org
> Subject: Re: svn commit: r1133866 - in /subversion/trunk/subversion:
> include/private/svn_debug.h libsvn_subr/debug.c
>
> On Thu, Jun 9, 2011 at 09:31, <st...@apache.org> wrote:
> > Author: stsp
> > Date: Thu Jun 9 13:31:11 2011
> > New Revision: 1133866
> >
> > URL: http://svn.apache.org/viewvc?rev=1133866&view=rev
> > Log:
> > Revert r1133865 because Windows compilers are too stupid to know about
> __func__.
>
> You could do something like:
>
> #ifdef WINDOWS
> #define FUNC ""
> #else
> #define FUNC __func__
> #endif
I think you need more checks: __func__ is part of C99 and we try to be C89
compatible.
On the Microsoft compilers you can use __FUNCTION__
(__FUNCTION is also supported by older gcc versions, before they supported
the standardized __func__)
Bert
Re: svn commit: r1133866 - in /subversion/trunk/subversion:
include/private/svn_debug.h libsvn_subr/debug.c
Posted by Greg Stein <gs...@gmail.com>.
On Thu, Jun 9, 2011 at 09:31, <st...@apache.org> wrote:
> Author: stsp
> Date: Thu Jun 9 13:31:11 2011
> New Revision: 1133866
>
> URL: http://svn.apache.org/viewvc?rev=1133866&view=rev
> Log:
> Revert r1133865 because Windows compilers are too stupid to know about __func__.
You could do something like:
#ifdef WINDOWS
#define FUNC ""
#else
#define FUNC __func__
#endif
>...