[Wireshark-dev] Compilation failure on MSVC 6.0 with Platform SDK
When compiling with MSVC 6.0 and the platform SDK, there are failures due to the redefinition of sockaddr_storage in capture_wpcap_packet.c and gtk/capture_if_details_dlg.c. The definition is conditional on the version of MSVC used, whereas the actual definition depends on the version of winsock defined, which is indicated by the symbol _WINSOCK2API_. I think that using this symbol would be preferable. -- Regards, Graham Bloice ___ Wireshark-dev mailing list Wireshark-dev@wireshark.org http://www.wireshark.org/mailman/listinfo/wireshark-dev
Re: [Wireshark-dev] Compilation failure on MSVC 6.0 with Platform SDK
Graham Bloice wrote: > When compiling with MSVC 6.0 and the platform SDK, there are failures > due to the redefinition of sockaddr_storage in capture_wpcap_packet.c > and gtk/capture_if_details_dlg.c. > > The definition is conditional on the version of MSVC used, whereas the > actual definition depends on the version of winsock defined, which is > indicated by the symbol _WINSOCK2API_. I think that using this symbol > would be preferable. > > Ah, thanks for pointing this out. At the time I was implementing this, I got the strong feeling that there might be a better way - but I was just too lazy to find out :-) I've updated both files in SVN 21162. Could you have a try if it works with MSVC 6 & SDK? BTW: Is this official MSDN, or something you've got from the include files? Regards, ULFL ___ Wireshark-dev mailing list Wireshark-dev@wireshark.org http://www.wireshark.org/mailman/listinfo/wireshark-dev
Re: [Wireshark-dev] Compilation failure on MSVC 6.0 with Platform SDK
Ulf Lamping wrote: > Graham Bloice wrote: >> When compiling with MSVC 6.0 and the platform SDK, there are failures >> due to the redefinition of sockaddr_storage in capture_wpcap_packet.c >> and gtk/capture_if_details_dlg.c. >> >> The definition is conditional on the version of MSVC used, whereas the >> actual definition depends on the version of winsock defined, which is >> indicated by the symbol _WINSOCK2API_. I think that using this symbol >> would be preferable. >> >> > Ah, thanks for pointing this out. At the time I was implementing this, I > got the strong feeling that there might be a better way - but I was just > too lazy to find out :-) > > I've updated both files in SVN 21162. > > Could you have a try if it works with MSVC 6 & SDK? > > BTW: Is this official MSDN, or something you've got from the include files? > From the include files. I haven't been able to check your changes yet, but I imagine that they are close to my tests so that they should be OK. I'll check tomorrow. -- Regards, Graham Bloice ___ Wireshark-dev mailing list Wireshark-dev@wireshark.org http://www.wireshark.org/mailman/listinfo/wireshark-dev
Re: [Wireshark-dev] Compilation failure on MSVC 6.0 with Platform SDK
Graham Bloice wrote: > > From the include files. > > I haven't been able to check your changes yet, but I imagine that they > are close to my tests so that they should be OK. I'll check tomorrow. > In the meantime the buildbot found out that MSVC6 without PSDK doesn't compile, as _WINSOCK2API_ is already defined with it - but sockaddr_storage is not. After thinking about it, I've used WINVER for it (which basically should indicate the Platform SDK version), and checked in a change (you may have a look at the two files for details). So at least it's working on MSVC 6 without PSDK and MSVC 2005EE with PSDK. The less recent PSDK probably still in use is MSVC 2002 (and therefore the most probable to fail), we'll see if someone reports a problem on it now (so we might need to tweak the WINVER check). If you can verify MSVC 6 with PSDK, I think we're on the right way ... Regards, ULFL ___ Wireshark-dev mailing list Wireshark-dev@wireshark.org http://www.wireshark.org/mailman/listinfo/wireshark-dev