On Thu, 05 Jul 2007 20:31:53 +0200 Magnus wrote:
MF> On tor, 2007-07-05 at 14:02 +0100, Dave Shield wrote:
MF> > The convenience header file <net-snmp/agent/netsnmp-agent-includes.h>
MF> > can be used to load all the agent-related API declarations, as well as the
MF> > agent configuration settings (USING_XXX).
MF> > 
MF> > These config header files (mib_module_config.h & agent_module_config.h)
MF> > are read in *after* the API header files.  However one of the API header 
files
MF> > (net-snmp/agent/snmp_vars.h) relies on one of these config settings
MF> > (USING_AGENTX_SUBAGENT_MODULE).
MF> 
MF> While I agree with that I think the method is bad - if some header
MF> depends on some other header then the depending header should include
MF> the needed other header, thus I propose that
MF> 
MF> #include <net-snmp/agent/agent_module_config.h>
MF> 
MF> should be added to 
MF> 
MF> net-snmp/agent/snmp_vars.h
MF> 
MF> if this is the path we should go.

I've always felt the same way, but we seem to be the minority. I was always
told to include the needed header in the C source, before the dependent header
was included...

That said, my vote is +/- 0.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to