>>>>> On Thu, 25 Mar 2010 10:07:12 +0100, Magnus Fromreide 
>>>>> <[email protected]> said:

My answer would be "it depends".

IE, each case is likely different unfortunately.  If you had to insert a
gazillion ifdefs that's probably not the right solution.

A word of warning though: We actually got bit once before for changing a
function to a macro and ended up changing it back (and this was a LONG
time ago).  I forget what the issue was it was so long ago.  (if nothing
else, it could be that they weren't including the defining header which
works if it's a function (with a warning) but not if it's a define ;-) )

>> > The real case I have is NETSNMP_DISABLE_DEBUG where
>> > I am pondering to either remove or minimize the logging functions.
>> 
>> But isn't that covered already (using approach B)?
>> See the use of NETSNMP_NO_DEBUGGING in
>> <net-snmp/library/snmp_debug.h>

MF> No, that only changes the access macros, I am going for the functions
MF> below the macros (e.g. debugmsg).

So for this case, I'd probably wrap the functions in
snmplib/snmp_debug.c with a single #ifdef DO_DEBUGGING.  I don't think
there are cases where these functions should be called outside the
macros and we've never advertised otherwise.
-- 
Wes Hardaker
Please mail all replies to [email protected]

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to