Hi Andy.
There are now two known issues with compiling 5.2 without the SDK installed.
The first is that win32\net-snmp\net-snmp-config.h contains:
#define HAVE_SOCKLEN_T 1
which should only be defined if the Platform SDK is installed.
The second is in agent\mibgroup\mibII\system_mib.c. wProductType is defined in the PSDK WinNT.h file for _OSVERSIONINFOEXA and _OSVERSIONINFOEXW but not in the standard WINBASE.H file included in MSVC.
I think we need to be able to detect if PSDK is installed. Do you know of a way to do this? I looked through the header files trying to find a 'PSDK' define of some sort, but I couldn't find any. I don't really want to just look for some random define that is only defined in the SDK as that could be unreliable and could break in the future.
Off the top of my head I do not know of any way to detect the SDK. If I were doing it in configure I would probably use just that method that you are trying to avoid, test for a header or define.
If we can not automate it, then I think the only alternative is to add a define to net-snmp-config.h such as HAVE_WIN32_PLATFORM_SDK. This is currently defined on the command line when compiling the projects snmpdsdk and netsnmpmibssdk. Using the command line define could solve the second problem as the system_mib.c file is part of netsnmpmibssdk, but it does not help with HAVE_SOCKLEN_T so it would have to go in to net-snmp-config.h.
That is the net-snmp-config.h under the win32 directory, correct? I would not want to alter the global file without testing in all of the Windows build environments.
Adding the define to net-snmp-config.h could be automated when using the build.bat system, MinGW or Cygwin. Users compiling with the MSVC GUI would have to do it manually.
In the gcc environments it could be done easily with configure once we get the test parameters figured out.
Does MinGW detect and use the PSDK?
It can use it, but it needs to be told where it is if I remember correctly. I will have to look into this further.
Alex
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders