[OpenAFS-devel] rxk5 branch is ready; please test

Jeffrey Hutzelman jhutz@cmu.edu
Fri, 11 Jan 2008 14:32:33 -0500


--On Friday, January 11, 2008 09:22:43 AM -0600 "Douglas E. Engert" 
<deengert@anl.gov> wrote:

>> The correct way to write this is without the ||, taking advantage of the
>> fact that standard C allows string literals to be concatenated by
>> juxtaposition.
>
> The correct way for AFS is it test for HAVE_FUNCTION_MACRO which configure
> will set if the compiler can handle __FUNCTION__. Then again the new
> rxk5/servconn.c
> is the only source  routines in AFS that uses __FUNCTION__ as far as I
> can tell.

I think we're talking about two different issues.

Yes, obviously we shouldn't use __FUNCTION__ if it isn't available.
Unfortunately, I'm pretty sure it's _not_ a preprocessor macro, which means 
you can't test for it with #ifdef -- someone will have to write a real test 
to see if it's there.  Or we could just avoid using it.

But my point wasn't about "how do we deal with __FUNCTION__ not existing", 
or even "what should we use here".  It was lower-level than that -- if what 
you want to do is concatenate __FILE__ and a literal string, the way to do 
so is with juxtaposition.