Hello.
Assume that we have a configure option, --disable-foo, with the effect
of setting the symbol NETSNMP_DISABLE_FOO.
Further assume that the foo routines are part of snmplib.
Which version of disabling is the better one:
A)
---foo.h---
extern void foo();
---foo.c---
#ifdef NETSNMP_DISABLE_FOO
void foo() { }
#else
void foo() { /* do foo things */ }
#endif
B)
---foo.h---
#ifdef NETSNMP_DISABLE_FOO
#define foo()
#else
extern void foo();
#endif
---foo.c---
#ifndef NETSNMP_DISABLE_FOO
void foo() { /* do foo things */ }
#endif
C)
---foo.h---
#ifndef NETSNMP_DISABLE_FOO
extern void foo();
#endif
---foo.c---
#ifndef NETSNMP_DISABLE_FOO
void foo() { /* do foo things */ }
#endif
The real case I have is NETSNMP_DISABLE_DEBUG where I am pondering to
either remove or minimize the logging functions.
Anyhow I plan to outright remove the debug_num_tokens and dbg_tokens
symbols (once more defending myself with the "internal" comment above
them) in the DISABLE_DEBUG case.
/MF
------------------------------------------------------------------------------
Download Intel® 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