Do any of the compilers we care about not support __func__ or __FUNCTION__?
Christopher R. Hertel
crh at ubiqx.mn.org
Thu Jul 19 13:56:00 MDT 2012
I think a quick review of the use of __FUNCTION__ (a GCC extension) vs.
__func__ (C99 standard) would be in order. I just did a quick grep, and it
looks as though we jump through some hoops to make sure one or the other
exists, but then use both different bits of code.
It probably all works...
On 07/19/2012 12:40 PM, Jeremy Allison wrote:
> On Thu, Jul 19, 2012 at 09:35:09AM -0700, Richard Sharpe wrote:
>> Hi folks,
>> I am sick of seeing things like:
>> DEBUG(5,("read_fd_with_timeout: "
>> "blocking read. EOF from client.\n"));
>> return NT_STATUS_END_OF_FILE;
>> where the name of the calling function has been laboriously typed in
>> ... and there have been cases where code has been moved around and the
>> function name not corrected.
>> Are there compilers we care about that do not support __func__ or
>> equivalent? I would think not because we depend on something like that
>> and __line__ in the DEBUG macros.
> I am the worst offender here. If we can truly depend on __func__
> or __line__ then I'll go on parole and promise to stop doing it
> again :-).
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/ -)----- crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/ -)----- crh at ubiqx.org
More information about the samba-technical