Do any of the compilers we care about not support __func__ or __FUNCTION__?
Christopher R. Hertel
crh at samba.org
Thu Jul 19 13:25:13 MDT 2012
More than 10 years ago, I rewrote the Debug module to include __func__ if it
was available. If __func__ isn't available on a platform, it *should*
simply be ignored. Some of the code that has the function name hard-coded
is probably from that era--stuff that wasn't cleaned up--or code added by
folks who didn't know that the function name was automatically included.
On 07/19/2012 01:13 PM, Richard Sharpe wrote:
> On Thu, Jul 19, 2012 at 10:17 AM, David Disseldorp <ddiss at suse.de> wrote:
>> On Thu, 19 Jul 2012 09:35:09 -0700
>> Richard Sharpe <realrichardsharpe at gmail.com> wrote:
>>> 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.
>> I totally agree. It's redundant information with the __func__ prefix
>> added by DEBUG, and is often incorrect.
> Actually, David, thanks for explaining what I was really complaining about.
> Yeah, since DEBUG puts the __func__prefix in the log, we don't need to
> repeat the function name. It just clutters things up.
"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