On Thu, Apr 26, 2012 at 09:41:34PM -0400, Robert Story wrote:
> NB> But in principle, of course, it would be more correct to use #ifdef
> 
> I googled to see if there was a definitive answer, and there doesn't seem to
> be consensus on the issue.
> 
> I did find that other people have this problem too.. For example, in the
> asterisk source (http://www.asterisk.org/doxygen/trunk/agent_8c-source.html):
> 
> 
> 00021 /* [...]
> 00026  * Also netsnmp has an improper check for HAVE_DMALLOC_H, using
> 00027  *    #if HAVE_DMALLOC_H   instead of #ifdef HAVE_DMALLOC_H
> 00028  * As a countermeasure we define it to 0, however this will fail
> 00029  * when the proper check is implemented.
> 00030  */
>       [...]
> 00046 #ifndef HAVE_DMALLOC_H
> 00047 #define HAVE_DMALLOC_H 0   /* XXX we shouldn't do this */
> 00048 #endif

Sounds like it is time to change this then - at least in the header
files.

And to keep those with work-arounds happy, change to test to

#if defined(HAVE_DMALLOC_H)
#if HAVE_DMALLOC_H
#include <dmalloc.h>
#endif
#endif

/Niels

-- 
Niels Baggesen - @home - Ã…rhus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to