Menu

#2641 Possible typo for _WIN32 macro in net-snmp-config.h

64-bit
open
nobody
5
2015-06-22
2015-06-17
Kent
No

After successfully compiling NetSNMP on Windows 7 (MSVC 14.0) I found that the net-snmp-config.h file that was generated was missing a '_' for a macro. The generated code was (for me) on line 1580 as follows:

#ifdef WIN32
#ifndef __MINGW32__
typedef unsigned short mode_t;
#endif
#ifndef HAVE_STDINT_H
. . .

The compiler won't recognize the WIN32 macro which then leads to an error at compile time of "mode_t is undefined." The solution is, of course, simple by adding a '_' prefix when installation is finished. Hopefully tracing this out in the installation files isn't trivial

Discussion

  • Bart Van Assche

    Bart Van Assche - 2015-06-20

    This is not a typo. The use of WIN32 without leading prefix is on purpose. The assumption is that in the project that is used to build the Net-SNMP source code the WIN32 macro is defined.

     
  • Kent

    Kent - 2015-06-22

    Understood, my mistake. Thank you.

     

Log in to post a comment.