On 12 April 2010 19:16, Bart Van Assche <[email protected]> wrote:
> As far as I know win32/build.bat on the V5.4 branch only works with Visual
> Studio 6.
I'm somewhat surprised (and more than a little disappointed!) to hear
about this problem so late in the release process. Did nobody test
Windows builds following any of the earlier pre-release calls?
I'm appending a patch that seems to fix the build for the simplest
case (i.e. without Platform SDK, OpenSSL, IPv6 or perl support)
This allows the code to build successfully with Visual Studio 2008,
on 5.2.x, 5.3.x and 5.4.x lines.
Can I therefore call for votes as to whether this should be applied
to the two lines currently in release freeze.
(I'm looking at problems with builds with some of the other
parameters enabled, but it seems sensible to keep the
changes as small as possible)
Dave
Index: include/net-snmp/library/snmp_logging.h
===================================================================
--- include/net-snmp/library/snmp_logging.h (revision 18463)
+++ include/net-snmp/library/snmp_logging.h (working copy)
@@ -5,6 +5,7 @@
extern "C" {
#endif
+#include <stdio.h>
#if HAVE_SYSLOG_H
#include <syslog.h>
#endif
Index: win32/net-snmp/net-snmp-config.h.in
===================================================================
--- win32/net-snmp/net-snmp-config.h.in (revision 18463)
+++ win32/net-snmp/net-snmp-config.h.in (working copy)
@@ -4,6 +4,14 @@
#ifndef NET_SNMP_CONFIG_H
#define NET_SNMP_CONFIG_H
+/* _MSC_VER values
+ 1500 = 9.0 (2008)
+ 1400 = 8.0 (2005)
+ 1310 = 7.1 (2003)
+ 1300 = 7.0 (2002)
+ 1200 = 6.0
+*/
+
/* Define HAVE_WIN32_PLATFORM_SDK if you have:
* Microsoft Visual Studio MSVC 6.0 and the Platform SDK (PSDK)
* Microsoft Visual Studio.Net 2002
@@ -1554,7 +1562,10 @@
/* define to 1 if you do not want to set global snmp_errno */
#define DONT_SHARE_ERROR_WITH_OTHER_THREADS 1
+/* Not needed for MSVC 2008 */
+#if _MSC_VER < 1500
#define vsnprintf _vsnprintf
+#endif
#define snprintf _snprintf
#define EADDRINUSE WSAEADDRINUSE
Index: win32/net-snmp/net-snmp-config.h
===================================================================
--- win32/net-snmp/net-snmp-config.h (revision 18463)
+++ win32/net-snmp/net-snmp-config.h (working copy)
@@ -4,6 +4,14 @@
#ifndef NET_SNMP_CONFIG_H
#define NET_SNMP_CONFIG_H
+/* _MSC_VER values
+ 1500 = 9.0 (2008)
+ 1400 = 8.0 (2005)
+ 1310 = 7.1 (2003)
+ 1300 = 7.0 (2002)
+ 1200 = 6.0
+*/
+
/* Define HAVE_WIN32_PLATFORM_SDK if you have:
* Microsoft Visual Studio MSVC 6.0 and the Platform SDK (PSDK)
* Microsoft Visual Studio.Net 2002
@@ -1554,7 +1562,10 @@
/* define to 1 if you do not want to set global snmp_errno */
#define DONT_SHARE_ERROR_WITH_OTHER_THREADS 1
+/* Not needed for MSVC 2008 */
+#if _MSC_VER < 1500
#define vsnprintf _vsnprintf
+#endif
#define snprintf _snprintf
#define EADDRINUSE WSAEADDRINUSE
Index: win32/net-snmp/agent/mib_module_config.h
===================================================================
--- win32/net-snmp/agent/mib_module_config.h (revision 18463)
+++ win32/net-snmp/agent/mib_module_config.h (working copy)
@@ -13,7 +13,7 @@
#define USING_NOTIFICATION_MODULE 1
/* Define if compiling with the notification-log-mib module files. */
-#define USING_NOTIFICATION_LOG_MIB_NOTIFICATION_LOG_MODULE 1
+/* #undef USING_NOTIFICATION_LOG_MIB_NOTIFICATION_LOG_MODULE */
/* Define if compiling with the target module files. */
#define USING_TARGET_MODULE 1
Index: win32/build.pl
===================================================================
--- win32/build.pl (revision 18463)
+++ win32/build.pl (working copy)
@@ -27,7 +27,9 @@
chomp $current_pwd;
}
-if (! (-d $ENV{MSVCDir})) {
+if ( -d $ENV{MSVCDir} || -d $ENV{VCINSTALLDIR}) {
+}
+else {
print "\nPlease run VCVARS32.BAT first to set up the Visual Studio build\n" .
"environment.\n\n";
system("pause");
------------------------------------------------------------------------------
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