On Tue, Oct 22, 2002 at 12:23:17PM -0700, Wes Hardaker wrote: > After working with Joerg Mayer, who found a few ucd-snmp specific bugs > with respect to the last patch I submitted, I've got a new one to be > used in place of the previous one:
Is the intent that HAVE_UCD_SNMP *not* be defined if you have Net-SNMP? If so, there are some pieces of code that currently interpret HAVE_UCD_SNMP as meaning "we have an SNMP library", e.g.: asn1.h - defines "subid_t" as a "gulong" if HAVE_UCD_SNMP is defined and as a "guint" otherwise; does Net-SNMP define an OID as a sequence of "unsigned long"s or as a sequence of "unsigned int"s? tethereal.c, gtk/main.c, gtk2/main.c - uses HAVE_UCD_SNMP to determine whether it was linked with UCD SNMP or not. Also, when I tried building on Windows with the Net-SNMP library Gilbert made, I got errors compiling "packet-snmp.c" if I didn't define HAVE_NET_SNMP in "config.h.win32" (which gets copied to "config.h" in Windows Visual C++ builds) due to NETSNMP_DS_LIBRARY_ID and the like not being defined. If I *did* define HAVE_NET_SNMP (instead of HAVE_UCD_SNMP), I got the following errors when compiling "packet-snmp.c": C:\Program Files\net-snmp\include\net-snmp/library/system.h(52) : error C2371: 'DIR' : redefinition; different basic types C:\Program Files\gtk-win32\src\glib\gwin32.h(89) : see declaration of 'DIR' C:\Program Files\net-snmp\include\net-snmp/library/system.h(55) : error C2371: 'g_win32_readdir' : redefinition; different basic types C:\Program Files\gtk-win32\src\glib\gwin32.h(95) : see declaration of 'g_win32_readdir' How do I get net-snmp *not* to define DIR and g_win32_readdir, or to define them in ways that don't collide with GLib?