Re: Disabled functions

2010-03-30 Thread Wes Hardaker
> On Thu, 25 Mar 2010 10:07:12 +0100, Magnus Fromreide > 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 fo

Re: Disabled functions

2010-03-25 Thread Robert Story
On Wed, 24 Mar 2010 22:21:56 +0100 Magnus wrote: MF> B) MF> ---foo.h--- MF> #ifdef NETSNMP_DISABLE_FOO MF> #define foo() MF> #else MF> extern void foo(); MF> #endif MF> ---foo.c--- MF> #ifndef NETSNMP_DISABLE_FOO MF> void foo() { /* do foo things */ } MF> #endif B, but I'd but the real function st

Re: Disabled functions

2010-03-25 Thread Magnus Fromreide
On Thu, 2010-03-25 at 08:28 +, Dave Shield wrote: > On 24 March 2010 21:21, Magnus Fromreide wrote: > > Which version of disabling is the better one: > > In general, I'd prefer either A or B. > A has the advantage of allowing us to issue suitable > warning or error messages. > I.e. > > A') >

Re: Disabled functions

2010-03-25 Thread Dave Shield
On 24 March 2010 21:21, Magnus Fromreide wrote: > Which version of disabling is the better one: In general, I'd prefer either A or B. A has the advantage of allowing us to issue suitable warning or error messages. I.e. A') ---foo.c--- #ifdef NETSNMP_DISABLE_FOO void foo() { printf("Foo not suppo