Problem: An unconditional config_require adds a file that won't compile for
MingW.

Solution: Don't config that file for MinGW.

Patch:

diff -Naur net-snmp/agent/mibgroup/mibII/interfaces.h
net-snmp-mingw32/agent/mibgroup/mibII/interfaces.h---
net-snmp/agent/mibgroup/mibII/interfaces.h      2004-10-16 20:53:43.000000000
-0500+++ net-snmp-mingw32/agent/mibgroup/mibII/interfaces.h     2004-10-29 
22:36:10.601618653 -0500@@ -6,7 +6,9 @@
 #define _MIBGROUP_INTERFACES_H
 
 config_require(util_funcs)
+#ifndef WIN32
 config_require(if-mib/data_access/interface)
+#endif
 config_arch_require(solaris2, kernel_sunos5)
 /*
  * need get_address in var_route for some platforms (USE_SYSCTL_IFLIST).


Discussion:

Andy and I have both tested the above fix, which only affects configure, and
confirms that it allows MinGW to build. I have also confirmed that it does not
break linux builds.

Dave objects:
On Mon, 01 Nov 2004 10:29:21 +0000 Dave wrote:
DS> > The attached patch fixes the MinGW build.
DS> 
DS>   >> AS> The attached patch fixes the MinGW build.
DS>   >> Uhhh, are you sure? the patch you sent (ifdef WIN32) would break
DS>   >> all the other platforms!
DS> 
DS>   > Yes, I attached the wrong patch, that was the first attempt.
DS> 
DS> is a perfect example of why both Wes and I have been throwing wobblers
DS> at the idea of putting things in quite so late.

I agree, and if Andy or I had acted alone, it's possible that something could
have been broken. But once a little confusion was cleared up, we've got the
right fix. The checks-and-balances system worked.

DS>   Given the discussion that this particular patch has triggered,
DS> I'd strongly suggest that it's probably too close to the wire to
DS> risk applying it now.


DS> Ideally the *only* changes to the 5.2.pre2 tarball would be fixing the
DS> various embedded version stamps.   Perhaps tweak the documentation a bit,
DS> but I personally wouldn't want to see any further changes to the code
DS> or build environment for this release.

- this patch has no code changes. It only affects configure module processing.

- the change is simple enough (2 lines) that even a simple visual inspection
should be reassuring.

- the patch has been tested by the person responsible for the configured
modules and the person who ported to the platform that was broken

- The definition of 'showstoppers' did include 'not building', which
applies for MinGW without this patch.

- Andy put a lot of effort into getting MinGW working for 5.2, and I'd hate to
see it broken for the initial release.


DS>   And if we did, then that would probably mean curring a 5.2.pre3 first.

Again, given the simplicity of the patch, I don't really think that is
necessary.

-- 
Robert Story; NET-SNMP Junkie <http://www.net-snmp.org/>
<irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>

You are lost in a twisty maze of little standards, all different. 


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to