On Thu, Oct 26, 2006 at 08:11:42AM -0400, Alex Burger wrote:
> I would like to enable DLL support for the applications including snmpd 
> and snmptrapd.  We currently only support using the library DLL when 
> building the Perl module.
> 
> After some research and testing, it appears that the applications work 
> fine with the library DLL and there doesn't seem to be any issues with 
> data corruption like we originally thought there would be.
> 
> For the applications to work, all extern declared variables in the 
> library that are used by the applications must be changed to 
> NETSNMP_IMPORT.  Most were changed already in the past but some were missed.
> 
> These changes will also fix the problem with SNMP v3 encryption in the 
> Perl module reported recently (SNMPv3 - problem with auth/encr sessions 
> with Perl module).
> 
> The attached patch fixes the externs, and allows for building with the 
> DLL in the MSVC command line build system.
> 
> This should not affect non-Windows in any way, and will only affect 
> Windows by allowing the user to build with the DLL without having to 
> modify the build files by hand.  It will also fix the SNMP v3 issue with 
> Perl.

I've been running Alex's patches (to pre4, at least) on my Win32 box,
and snmpd.exe and the snmp{bulk}walk.exe are working just fine (not exactly
a comprehensive test). I have run them all under the HeapAgent memory
debugger as well without any leaks or other problems.

I don't know how the "do not use the DLL" directive came to pass, but
I have been shipping netsnmp_dll.dll with a project using net-snmp-5.1
without any problems.

But maybe a few thoughts on the patches:

> ++ net-snmp-5.4.pre4.dll/win32/libsnmp_dll/libsnmp.def 

Isn't this built from libsnmp.def.in ?

> +++ net-snmp-5.4.pre4.dll/win32/snmptrapd/Makefile.in Wed Oct 25 08:22:38 2006
> @@ -8,7 +8,7 @@
>  # Set to 1 to allow the building using the DLL version of SNMPLIB.  This is
>  # NOT supported as this program is NOT thread safe and it WILL cause
>  # problems!
> -ALLOW_DLL=0
> +ALLOW_DLL=1

(various Makefile.in)

Shouldn't the "NOT supported" comment be removed, or at least amended?

Otherwise, I would like to have DLL support - it sure makes the
deliverables smaller.

Steve

--- 
Stephen J Friedl | Security Consultant |  UNIX Wizard  |   +1 714 544-6561
www.unixwiz.net  | Tustin, Calif. USA  | Microsoft MVP | [EMAIL PROTECTED]

> diff -ur net-snmp-5.4.pre4.fresh/include/net-snmp/library/snmpTCPDomain.h 
> net-snmp-5.4.pre4.dll/include/net-snmp/library/snmpTCPDomain.h
> --- net-snmp-5.4.pre4.fresh/include/net-snmp/library/snmpTCPDomain.h  Thu Sep 
> 14 20:48:48 2006
> +++ net-snmp-5.4.pre4.dll/include/net-snmp/library/snmpTCPDomain.h    Wed Oct 
> 25 09:59:20 2006
> @@ -23,7 +23,7 @@
>   */
>  
>  #define TRANSPORT_DOMAIN_TCP_IP              1,3,6,1,2,1,100,1,5
> -extern oid netsnmp_snmpTCPDomain[];
> +NETSNMP_IMPORT oid netsnmp_snmpTCPDomain[];
>  
>  netsnmp_transport *netsnmp_tcp_transport(struct sockaddr_in *addr, int 
> local);
>  
> diff -ur net-snmp-5.4.pre4.fresh/include/net-snmp/library/snmpTCPIPv6Domain.h 
> net-snmp-5.4.pre4.dll/include/net-snmp/library/snmpTCPIPv6Domain.h
> --- net-snmp-5.4.pre4.fresh/include/net-snmp/library/snmpTCPIPv6Domain.h      
> Thu Jan 29 09:13:58 2004
> +++ net-snmp-5.4.pre4.dll/include/net-snmp/library/snmpTCPIPv6Domain.h        
> Wed Oct 25 09:59:44 2006
> @@ -14,7 +14,7 @@
>   */
>  
>  #define TRANSPORT_DOMAIN_TCP_IPV6    1,3,6,1,2,1,100,1,6
> -extern oid      netsnmp_TCPIPv6Domain[];
> +NETSNMP_IMPORT oid      netsnmp_TCPIPv6Domain[];
>  
>  netsnmp_transport *netsnmp_tcp6_transport(struct sockaddr_in6 *addr, 
>                                         int local);
> diff -ur net-snmp-5.4.pre4.fresh/include/net-snmp/library/snmpUDPIPv6Domain.h 
> net-snmp-5.4.pre4.dll/include/net-snmp/library/snmpUDPIPv6Domain.h
> --- net-snmp-5.4.pre4.fresh/include/net-snmp/library/snmpUDPIPv6Domain.h      
> Fri Jul 30 16:01:24 2004
> +++ net-snmp-5.4.pre4.dll/include/net-snmp/library/snmpUDPIPv6Domain.h        
> Wed Oct 25 09:59:58 2006
> @@ -14,7 +14,7 @@
>   */
>  
>  #define TRANSPORT_DOMAIN_UDP_IPV6    1,3,6,1,2,1,100,1,2
> -extern oid      netsnmp_UDPIPv6Domain[];
> +NETSNMP_IMPORT oid      netsnmp_UDPIPv6Domain[];
>  
>  netsnmp_transport *snmp_udp6_transport(struct sockaddr_in6 *addr,
>                                         int local);
> diff -ur net-snmp-5.4.pre4.fresh/include/net-snmp/library/snmpUnixDomain.h 
> net-snmp-5.4.pre4.dll/include/net-snmp/library/snmpUnixDomain.h
> --- net-snmp-5.4.pre4.fresh/include/net-snmp/library/snmpUnixDomain.h Thu Sep 
> 14 20:48:48 2006
> +++ net-snmp-5.4.pre4.dll/include/net-snmp/library/snmpUnixDomain.h   Wed Oct 
> 25 10:00:44 2006
> @@ -23,7 +23,7 @@
>   */
>  
>  #define TRANSPORT_DOMAIN_LOCAL       1,3,6,1,2,1,100,1,13
> -extern oid netsnmp_UnixDomain[];
> +NETSNMP_IMPORT oid netsnmp_UnixDomain[];
>  
>  netsnmp_transport *netsnmp_unix_transport(struct sockaddr_un *addr,
>                                            int local);
> diff -ur net-snmp-5.4.pre4.fresh/include/net-snmp/library/snmp_api.h 
> net-snmp-5.4.pre4.dll/include/net-snmp/library/snmp_api.h
> --- net-snmp-5.4.pre4.fresh/include/net-snmp/library/snmp_api.h       Wed Sep 
> 20 16:26:44 2006
> +++ net-snmp-5.4.pre4.dll/include/net-snmp/library/snmp_api.h Wed Oct 25 
> 10:01:10 2006
> @@ -356,9 +356,9 @@
>  #endif
>  #define SNMP_DEFAULT_PRIV_PROTOLEN  USM_LENGTH_OID_TRANSFORM
>  
> -    extern const char *snmp_api_errstring(int);
> -    extern void     snmp_perror(const char *);
> -    extern void     snmp_set_detail(const char *);
> +    NETSNMP_IMPORT const char *snmp_api_errstring(int);
> +    NETSNMP_IMPORT void     snmp_perror(const char *);
> +    NETSNMP_IMPORT void     snmp_set_detail(const char *);
>  
>  #define SNMP_MAX_MSG_SIZE          1472 /* ethernet MTU minus IP/UDP header 
> */
>  #define SNMP_MAX_MSG_V3_HDRS       (4+3+4+7+7+3+7+16)   /* fudge factor=16 */
> diff -ur net-snmp-5.4.pre4.fresh/include/net-snmp/library/snmp_debug.h 
> net-snmp-5.4.pre4.dll/include/net-snmp/library/snmp_debug.h
> --- net-snmp-5.4.pre4.fresh/include/net-snmp/library/snmp_debug.h     Thu Sep 
> 14 20:48:48 2006
> +++ net-snmp-5.4.pre4.dll/include/net-snmp/library/snmp_debug.h       Wed Oct 
> 25 10:01:30 2006
> @@ -270,8 +270,8 @@
>      char  enabled;
>  } netsnmp_token_descr;
>  
> -extern int                 debug_num_tokens;
> -extern netsnmp_token_descr dbg_tokens[MAX_DEBUG_TOKENS];
> +NETSNMP_IMPORT int                 debug_num_tokens;
> +NETSNMP_IMPORT netsnmp_token_descr dbg_tokens[MAX_DEBUG_TOKENS];
>      
>  #ifdef __cplusplus
>  }
> diff -ur net-snmp-5.4.pre4.fresh/include/net-snmp/library/snmp_transport.h 
> net-snmp-5.4.pre4.dll/include/net-snmp/library/snmp_transport.h
> --- net-snmp-5.4.pre4.fresh/include/net-snmp/library/snmp_transport.h Tue Sep 
> 19 10:45:30 2006
> +++ net-snmp-5.4.pre4.dll/include/net-snmp/library/snmp_transport.h   Wed Oct 
> 25 10:01:52 2006
> @@ -22,16 +22,16 @@
>  
>  /*  The standard SNMP domains.  */
>  
> -extern oid      netsnmpUDPDomain[];  /*      = { 1, 3, 6, 1, 6, 1, 1 };  */
> -extern oid      netsnmpCLNSDomain[];    /*      = { 1, 3, 6, 1, 6, 1, 2 };  
> */
> -extern oid      netsnmpCONSDomain[];    /*      = { 1, 3, 6, 1, 6, 1, 3 };  
> */
> -extern oid      netsnmpDDPDomain[];  /*      = { 1, 3, 6, 1, 6, 1, 4 };  */
> -extern oid      netsnmpIPXDomain[];  /*      = { 1, 3, 6, 1, 6, 1, 5 };  */
> -extern size_t   netsnmpUDPDomain_len;
> -extern size_t   netsnmpCLNSDomain_len;
> -extern size_t   netsnmpCONSDomain_len;
> -extern size_t   netsnmpDDPDomain_len;
> -extern size_t   netsnmpIPXDomain_len;
> +NETSNMP_IMPORT oid      netsnmpUDPDomain[];  /*      = { 1, 3, 6, 1, 6, 1, 1 
> };  */
> +NETSNMP_IMPORT oid      netsnmpCLNSDomain[];    /*      = { 1, 3, 6, 1, 6, 
> 1, 2 };  */
> +NETSNMP_IMPORT oid      netsnmpCONSDomain[];    /*      = { 1, 3, 6, 1, 6, 
> 1, 3 };  */
> +NETSNMP_IMPORT oid      netsnmpDDPDomain[];  /*      = { 1, 3, 6, 1, 6, 1, 4 
> };  */
> +NETSNMP_IMPORT oid      netsnmpIPXDomain[];  /*      = { 1, 3, 6, 1, 6, 1, 5 
> };  */
> +NETSNMP_IMPORT size_t   netsnmpUDPDomain_len;
> +NETSNMP_IMPORT size_t   netsnmpCLNSDomain_len;
> +NETSNMP_IMPORT size_t   netsnmpCONSDomain_len;
> +NETSNMP_IMPORT size_t   netsnmpDDPDomain_len;
> +NETSNMP_IMPORT size_t   netsnmpIPXDomain_len;
>  
>  /*  Structure which defines the transport-independent API.  */
>  
> diff -ur net-snmp-5.4.pre4.fresh/include/net-snmp/library/transform_oids.h 
> net-snmp-5.4.pre4.dll/include/net-snmp/library/transform_oids.h
> --- net-snmp-5.4.pre4.fresh/include/net-snmp/library/transform_oids.h Thu Sep 
> 14 20:48:48 2006
> +++ net-snmp-5.4.pre4.dll/include/net-snmp/library/transform_oids.h   Wed Oct 
> 25 10:02:24 2006
> @@ -10,19 +10,19 @@
>   * Numeric MIB names for auth and priv transforms.
>   */
>  
> -extern oid      usmNoAuthProtocol[10];  /* == { 1,3,6,1,6,3,10,1,1,1 }; */
> +NETSNMP_IMPORT oid      usmNoAuthProtocol[10];  /* == { 1,3,6,1,6,3,10,1,1,1 
> }; */
>  #ifndef NETSNMP_DISABLE_MD5
> -extern oid      usmHMACMD5AuthProtocol[10];     /* == { 1,3,6,1,6,3,10,1,1,2 
> }; */
> +NETSNMP_IMPORT oid      usmHMACMD5AuthProtocol[10];     /* == { 
> 1,3,6,1,6,3,10,1,1,2 }; */
>  #endif
> -extern oid      usmHMACSHA1AuthProtocol[10];    /* == { 1,3,6,1,6,3,10,1,1,3 
> }; */
> -extern oid      usmNoPrivProtocol[10];  /* == { 1,3,6,1,6,3,10,1,2,1 }; */
> +NETSNMP_IMPORT oid      usmHMACSHA1AuthProtocol[10];    /* == { 
> 1,3,6,1,6,3,10,1,1,3 }; */
> +NETSNMP_IMPORT oid      usmNoPrivProtocol[10];  /* == { 1,3,6,1,6,3,10,1,2,1 
> }; */
>  #ifndef NETSNMP_DISABLE_DES
> -extern oid      usmDESPrivProtocol[10]; /* == { 1,3,6,1,6,3,10,1,2,2 }; */
> +NETSNMP_IMPORT oid      usmDESPrivProtocol[10]; /* == { 1,3,6,1,6,3,10,1,2,2 
> }; */
>  #endif
>  
>  /* XXX: OIDs not defined yet */
> -extern oid      usmAESPrivProtocol[10]; /* == { 1,3,6,1,6,3,10,1,2,4 }; */
> -extern oid      *usmAES128PrivProtocol; /* backwards compat */
> +NETSNMP_IMPORT oid      usmAESPrivProtocol[10]; /* == { 1,3,6,1,6,3,10,1,2,4 
> }; */
> +NETSNMP_IMPORT oid      *usmAES128PrivProtocol; /* backwards compat */
>  
>  #define USM_AUTH_PROTO_NOAUTH_LEN 10
>  #define USM_AUTH_PROTO_MD5_LEN 10
> diff -ur net-snmp-5.4.pre4.fresh/win32/Makefile-apps.in 
> net-snmp-5.4.pre4.dll/win32/Makefile-apps.in
> --- net-snmp-5.4.pre4.fresh/win32/Makefile-apps.in    Fri Mar 12 14:29:26 2004
> +++ net-snmp-5.4.pre4.dll/win32/Makefile-apps.in      Wed Oct 25 08:22:02 2006
> @@ -8,7 +8,7 @@
>  # Set to 1 to allow the building using the DLL version of SNMPLIB.  This is 
>  # NOT supported as this program is NOT thread safe and it WILL cause
>  # problems!
> -ALLOW_DLL=0
> +ALLOW_DLL=1
>  
>  !IF "$(OS)" == "Windows_NT"
>  NULL=
> diff -ur net-snmp-5.4.pre4.fresh/win32/build.pl 
> net-snmp-5.4.pre4.dll/win32/build.pl
> --- net-snmp-5.4.pre4.fresh/win32/build.pl    Tue Sep  6 20:06:32 2005
> +++ net-snmp-5.4.pre4.dll/win32/build.pl      Wed Oct 25 12:05:48 2006
> @@ -17,6 +17,7 @@
>  my $debug = "disabled";
>  my $configOpts = "";
>  my $cTmp = "";
> +my $linktype = "static";
>  
>  # Prepend win32\ if running from main directory
>  my $current_pwd = `%COMSPEC% /c cd`;
> @@ -50,7 +51,9 @@
>    print "8.  Debug mode:                 " . $debug . "\n";
>    print "9.  IPv6 transports:            " . $b_ipv6 . "\n";
>    print "\n";
> -  print "10. Install development files   " . $install_devel . "\n";
> +  print "10. Link type:                  " . $linktype . "\n";
> +  print "\n";
> +  print "11. Install development files   " . $install_devel . "\n";
>    print "\nF.  Finished - start build\n";
>    print "Q.  Quit - abort build\n\n";
>    print "Select option to set / toggle: ";
> @@ -96,7 +99,7 @@
>        $install = "enabled";
>      }
>    }
> -  elsif ($option eq "10") {
> +  elsif ($option eq "11") {
>      if ($install_devel eq "enabled") {
>        $install_devel = "disabled";
>      }
> @@ -136,6 +139,14 @@
>        $debug = "enabled";
>      }
>    }
> +  elsif ($option eq "10") {
> +    if ($linktype eq "static") {
> +      $linktype = "dynamic";
> +    }
> +    else {
> +      $linktype = "static";
> +    }
> +  }
>    elsif (lc($option) eq "f") {
>      last;
>    }
> @@ -186,7 +197,7 @@
>    system("del ..\\include\\net-snmp\\net-snmp-config.h > NUL: 2>&1");
>    
>    print "Running Configure...\n";
> -  system("perl Configure $configOpts --linktype=static 
> --prefix=\"$install_base\" > configure.out 2>&1") == 0 || die "Build error 
> (see configure.out)";
> +  system("perl Configure $configOpts --linktype=$linktype 
> --prefix=\"$install_base\" > configure.out 2>&1") == 0 || die "Build error 
> (see configure.out)";
>  
>    print "Cleaning...\n";
>    system("nmake /nologo clean > clean.out 2>&1") == 0 || die "Build error 
> (see clean.out)";
> @@ -195,14 +206,16 @@
>    system("nmake /nologo > make.out 2>&1") == 0 || die "Build error (see 
> make.out)";
>  
>    if ($perl eq "enabled") {
> -    print "Running Configure for DLL...\n";
> -    system("perl Configure $configOpts --linktype=dynamic 
> --prefix=\"$install_base\" > perlconfigure.out 2>&1") == 0 || die "Build 
> error (see perlconfigure.out)";
> -
> -    print "Cleaning libraries...\n";
> -    system("nmake /nologo libs_clean >> clean.out 2>&1") == 0 || die "Build 
> error (see clean.out)";
> -
> -    print "Building DLL libraries...\n";
> -    system("nmake /nologo libs > dll.out 2>&1") == 0 || die "Build error 
> (see dll.out)";
> +    if ($linktype eq "static") {
> +      print "Running Configure for DLL...\n";
> +      system("perl Configure $configOpts --linktype=dynamic 
> --prefix=\"$install_base\" > perlconfigure.out 2>&1") == 0 || die "Build 
> error (see perlconfigure.out)";
> +      
> +      print "Cleaning libraries...\n";
> +      system("nmake /nologo libs_clean >> clean.out 2>&1") == 0 || die 
> "Build error (see clean.out)";
> +      
> +      print "Building DLL libraries...\n";
> +      system("nmake /nologo libs > dll.out 2>&1") == 0 || die "Build error 
> (see dll.out)";
> +    }
>     
>      print "Cleaning Perl....\n";
>      system("nmake /nologo perl_clean >> clean.out 2>&1"); # If already 
> cleaned, Makefile is gone so don't worry about errors!
> @@ -248,15 +261,17 @@
>    # Delete net-snmp-config.h from main include folder just in case it was 
> created by a Cygwin or MinGW build
>    system("del ..\\include\\net-snmp\\net-snmp-config.h > NUL: 2>&1");
>  
> -  system("perl Configure $configOpts --linktype=static 
> --prefix=\"$install_base\"") == 0 || die "Build error (see above)";
> +  system("perl Configure $configOpts --linktype=$linktype 
> --prefix=\"$install_base\"") == 0 || die "Build error (see above)";
>    system("nmake /nologo clean") == 0 || die "Build error (see above)";
>    system("nmake /nologo") == 0 || die "Build error (see above)";
>    
>    if ($perl eq "enabled") {
> -    system("perl Configure $configOpts --linktype=dynamic 
> --prefix=\"$install_base\"") == 0 || die "Build error (see above)";
> -    system("nmake /nologo libs_clean") == 0 || die "Build error (see above)";
> -    system("nmake /nologo libs") == 0 || die "Build error (see above)";
> -    
> +    if ($linktype eq "static") {      
> +      system("perl Configure $configOpts --linktype=dynamic 
> --prefix=\"$install_base\"") == 0 || die "Build error (see above)";
> +      system("nmake /nologo libs_clean") == 0 || die "Build error (see 
> above)";
> +      system("nmake /nologo libs") == 0 || die "Build error (see above)";
> +    }
> +      
>      system("nmake /nologo perl_clean"); # If already cleaned, Makefile is 
> gone so don't worry about errors!
>      system("nmake /nologo perl") == 0 || die "Build error (see above)";
>  
> diff -ur net-snmp-5.4.pre4.fresh/win32/libsnmp_dll/libsnmp.def 
> net-snmp-5.4.pre4.dll/win32/libsnmp_dll/libsnmp.def
> --- net-snmp-5.4.pre4.fresh/win32/libsnmp_dll/libsnmp.def     Thu Sep 21 
> 12:15:44 2006
> +++ net-snmp-5.4.pre4.dll/win32/libsnmp_dll/libsnmp.def       Wed Oct 25 
> 08:21:32 2006
> @@ -430,6 +430,20 @@
>          snmp_add_full
>          netsnmp_transport_open_client
>          snmp_oidsubtree_compare
> +        snmp_disable_syslog
> +        snmp_stderrlog_status
> +        sa_find_specific
> +        check_rowstatus_transition
> +        check_storage_transition
> +        netsnmp_view_get
> +        netsnmp_check_vb_rowstatus_value
> +        netsnmp_check_vb_type_and_size
> +        netsnmp_check_vb_type_and_max_size
> +        read_config_save_objid
> +        print_oid_report_enable_mibchildoid
> +        netsnmp_query_walk
> +        netsnmp_query_getnext
> +        netsnmp_query_get
>  ;IPv6        netsnmp_udp6_parse_security
>  ;IPv6        netsnmp_udp6_getSecName
>  ;IPv6        netsnmp_TCPIPv6Domain
> diff -ur net-snmp-5.4.pre4.fresh/win32/libsnmp_dll/libsnmp.def.in 
> net-snmp-5.4.pre4.dll/win32/libsnmp_dll/libsnmp.def.in
> --- net-snmp-5.4.pre4.fresh/win32/libsnmp_dll/libsnmp.def.in  Thu Sep 21 
> 12:15:44 2006
> +++ net-snmp-5.4.pre4.dll/win32/libsnmp_dll/libsnmp.def.in    Wed Oct 25 
> 08:21:26 2006
> @@ -430,6 +430,20 @@
>          snmp_add_full
>          netsnmp_transport_open_client
>          snmp_oidsubtree_compare
> +        snmp_disable_syslog
> +        snmp_stderrlog_status
> +        sa_find_specific
> +        check_rowstatus_transition
> +        check_storage_transition
> +        netsnmp_view_get
> +        netsnmp_check_vb_rowstatus_value
> +        netsnmp_check_vb_type_and_size
> +        netsnmp_check_vb_type_and_max_size
> +        read_config_save_objid
> +        print_oid_report_enable_mibchildoid
> +        netsnmp_query_walk
> +        netsnmp_query_getnext
> +        netsnmp_query_get
>  ;IPv6        netsnmp_udp6_parse_security
>  ;IPv6        netsnmp_udp6_getSecName
>  ;IPv6        netsnmp_TCPIPv6Domain
> diff -ur net-snmp-5.4.pre4.fresh/win32/snmpd/Makefile.in 
> net-snmp-5.4.pre4.dll/win32/snmpd/Makefile.in
> --- net-snmp-5.4.pre4.fresh/win32/snmpd/Makefile.in   Thu Apr 22 10:08:02 2004
> +++ net-snmp-5.4.pre4.dll/win32/snmpd/Makefile.in     Wed Oct 25 08:24:16 2006
> @@ -8,7 +8,7 @@
>  # Set to 1 to allow the building using the DLL version of SNMPLIB.  This is 
>  # NOT supported as this program is NOT thread safe and it WILL cause
>  # problems!
> -ALLOW_DLL=0
> +ALLOW_DLL=1
>  
>  !IF "$(OS)" == "Windows_NT"
>  NULL=
> @@ -46,6 +46,10 @@
>  CPP=cl.exe
>  CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "." /I ".." /I "..\..\snmplib" /I 
> "..\.." /I "..\..\include" /I "..\..\agent" /I "..\..\agent\mibgroup" /D 
> "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\snmpd.pch" /YX 
> /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
>  
> +!IF "$(LINKTYPE)" == "dynamic"
> +CPP_PROJ=$(CPP_PROJ) /D "NMAKE_NETSNMP_USE_DLL"
> +!ENDIF
> +
>  .c{$(INTDIR)}.obj::
>     $(CPP) @<<
>     $(CPP_PROJ) $< 
> @@ -132,6 +136,10 @@
>  
>  CPP=cl.exe
>  CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /I ".." /I "..\..\snmplib" 
> /I "..\.." /I "..\..\include" /I "..\..\agent" /I "..\..\agent\mibgroup" /D 
> "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" 
> /Fp"$(INTDIR)\snmpd.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
> +
> +!IF "$(LINKTYPE)" == "dynamic"
> +CPP_PROJ=$(CPP_PROJ) /D "NMAKE_NETSNMP_USE_DLL"
> +!ENDIF
>  
>  .c{$(INTDIR)}.obj::
>     $(CPP) @<<
> diff -ur net-snmp-5.4.pre4.fresh/win32/snmpdsdk/Makefile.in 
> net-snmp-5.4.pre4.dll/win32/snmpdsdk/Makefile.in
> --- net-snmp-5.4.pre4.fresh/win32/snmpdsdk/Makefile.in        Thu Apr 22 
> 10:08:04 2004
> +++ net-snmp-5.4.pre4.dll/win32/snmpdsdk/Makefile.in  Wed Oct 25 08:23:28 2006
> @@ -8,7 +8,7 @@
>  # Set to 1 to allow the building using the DLL version of SNMPLIB.  This is 
>  # NOT supported as this program is NOT thread safe and it WILL cause
>  # problems!
> -ALLOW_DLL=0
> +ALLOW_DLL=1
>  
>  !IF "$(OS)" == "Windows_NT"
>  NULL=
> @@ -46,6 +46,10 @@
>  CPP=cl.exe
>  CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "." /I ".." /I "..\..\snmplib" /I 
> "..\.." /I "..\..\include" /I "..\..\agent" /I "..\..\agent\mibgroup" /D 
> "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "HAVE_WIN32_PLATFORM_SDK" 
> /Fp"$(INTDIR)\snmpd.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
>  
> +!IF "$(LINKTYPE)" == "dynamic"
> +CPP_PROJ=$(CPP_PROJ) /D "NMAKE_NETSNMP_USE_DLL"
> +!ENDIF
> +
>  .c{$(INTDIR)}.obj::
>     $(CPP) @<<
>     $(CPP_PROJ) $< 
> @@ -132,6 +136,10 @@
>  
>  CPP=cl.exe
>  CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /I ".." /I "..\..\snmplib" 
> /I "..\.." /I "..\..\include" /I "..\..\agent" /I "..\..\agent\mibgroup" /D 
> "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "HAVE_WIN32_PLATFORM_SDK" 
> /FR"$(INTDIR)\\" /Fp"$(INTDIR)\snmpd.pch" /YX /Fo"$(INTDIR)\\" 
> /Fd"$(INTDIR)\\" /FD /c 
> +
> +!IF "$(LINKTYPE)" == "dynamic"
> +CPP_PROJ=$(CPP_PROJ) /D "NMAKE_NETSNMP_USE_DLL"
> +!ENDIF
>  
>  .c{$(INTDIR)}.obj::
>     $(CPP) @<<
> diff -ur net-snmp-5.4.pre4.fresh/win32/snmpnetstat/Makefile.in 
> net-snmp-5.4.pre4.dll/win32/snmpnetstat/Makefile.in
> --- net-snmp-5.4.pre4.fresh/win32/snmpnetstat/Makefile.in     Mon Nov  7 
> 21:45:06 2005
> +++ net-snmp-5.4.pre4.dll/win32/snmpnetstat/Makefile.in       Wed Oct 25 
> 08:23:12 2006
> @@ -8,7 +8,7 @@
>  # Set to 1 to allow the building using the DLL version of SNMPLIB.  This is 
>  # NOT supported as this program is NOT thread safe and it WILL cause
>  # problems!
> -ALLOW_DLL=0
> +ALLOW_DLL=1
>  
>  !IF "$(OS)" == "Windows_NT"
>  NULL=
> @@ -48,6 +48,10 @@
>  CPP=cl.exe
>  CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "." /I ".." /I "..\..\snmplib" /I 
> "..\.." /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" 
> /Fp"$(INTDIR)\$(PROGNAME).pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
>  
> +!IF "$(LINKTYPE)" == "dynamic"
> +CPP_PROJ=$(CPP_PROJ) /D "NMAKE_NETSNMP_USE_DLL"
> +!ENDIF
> +
>  .c{$(INTDIR)}.obj::
>     $(CPP) @<<
>     $(CPP_PROJ) $< 
> @@ -140,6 +144,10 @@
>  
>  CPP=cl.exe
>  CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /I ".." /I "..\..\snmplib" 
> /I "..\.." /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" 
> /FR"$(INTDIR)\\" /Fp"$(INTDIR)\$(PROGNAME).pch" /YX /Fo"$(INTDIR)\\" 
> /Fd"$(INTDIR)\\" /FD /c 
> +
> +!IF "$(LINKTYPE)" == "dynamic"
> +CPP_PROJ=$(CPP_PROJ) /D "NMAKE_NETSNMP_USE_DLL"
> +!ENDIF
>  
>  .c{$(INTDIR)}.obj::
>     $(CPP) @<<
> diff -ur net-snmp-5.4.pre4.fresh/win32/snmptrapd/Makefile.in 
> net-snmp-5.4.pre4.dll/win32/snmptrapd/Makefile.in
> --- net-snmp-5.4.pre4.fresh/win32/snmptrapd/Makefile.in       Mon Aug  1 
> 07:39:06 2005
> +++ net-snmp-5.4.pre4.dll/win32/snmptrapd/Makefile.in Wed Oct 25 08:22:38 2006
> @@ -8,7 +8,7 @@
>  # Set to 1 to allow the building using the DLL version of SNMPLIB.  This is 
>  # NOT supported as this program is NOT thread safe and it WILL cause
>  # problems!
> -ALLOW_DLL=0
> +ALLOW_DLL=1
>  
>  !IF "$(OS)" == "Windows_NT"
>  NULL=
> @@ -44,6 +44,10 @@
>  CPP=cl.exe
>  CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "." /I ".." /I "..\..\snmplib" /I 
> "..\.." /I "..\..\include" /I "..\..\agent\mibgroup" /D "WIN32" /D "NDEBUG" 
> /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\$(PROGNAME).pch" /YX /Fo"$(INTDIR)\\" 
> /Fd"$(INTDIR)\\" /FD /c 
>  
> +!IF "$(LINKTYPE)" == "dynamic"
> +CPP_PROJ=$(CPP_PROJ) /D "NMAKE_NETSNMP_USE_DLL"
> +!ENDIF
> +
>  .c{$(INTDIR)}.obj::
>     $(CPP) @<<
>     $(CPP_PROJ) $< 
> @@ -124,6 +128,10 @@
>  
>  CPP=cl.exe
>  CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "." /I ".." /I "..\..\snmplib" 
> /I "..\.." /I "..\..\include" /I "..\..\agent\mibgroup" /D "WIN32" /D 
> "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" 
> /Fp"$(INTDIR)\$(PROGNAME).pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
> +
> +!IF "$(LINKTYPE)" == "dynamic"
> +CPP_PROJ=$(CPP_PROJ) /D "NMAKE_NETSNMP_USE_DLL"
> +!ENDIF
>  
>  .c{$(INTDIR)}.obj::
>     $(CPP) @<<


-- 
Stephen J Friedl | Security Consultant |  UNIX Wizard  |   +1 714 544-6561
www.unixwiz.net  | Tustin, Calif. USA  | Microsoft MVP | [EMAIL PROTECTED]

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to