You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2011/06/09 21:41:58 UTC

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

>...

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