forked from osmocom/wireshark
CMake: Set the Windows build target to Vista.
Set NTDDI_VERSION and _WIN32_WINNT to their Vista values so that ws2tcpip.h will define inet_pton and inet_ntop. Remove the associated compiler version checks so that everyone is on the same page. Add breadcrumbs to the various parts of the code where we set a minimum Windows version. Change-Id: I83bba5fa1024bfbc02e07b120412807ad259e291 Reviewed-on: https://code.wireshark.org/review/24080 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
parent
de6fcf2f21
commit
b7f7bee8cf
|
@ -406,6 +406,16 @@
|
||||||
#cmakedefine YYTEXT_POINTER
|
#cmakedefine YYTEXT_POINTER
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
|
/*
|
||||||
|
* Make sure everyone is using the same API and that it's sufficient
|
||||||
|
* for our needs.
|
||||||
|
* This should match the following:
|
||||||
|
* - The <compatibility><application> section in image\wireshark.exe.manifest.in
|
||||||
|
* - The GetWindowsVersion parts of packaging\nsis\wireshark.nsi
|
||||||
|
* - The VersionNT parts of packaging\wix\Prerequisites.wxi
|
||||||
|
*/
|
||||||
|
# define NTDDI_VERSION NTDDI_VISTA
|
||||||
|
# define _WIN32_WINNT _WIN32_WINNT_VISTA
|
||||||
|
|
||||||
/* WpdPack/INclude/pcap/pcap.h checks for "#if defined(WIN32)" */
|
/* WpdPack/INclude/pcap/pcap.h checks for "#if defined(WIN32)" */
|
||||||
# ifndef WIN32
|
# ifndef WIN32
|
||||||
|
@ -418,20 +428,12 @@
|
||||||
|
|
||||||
/* FIXME: Detection doesn't work */
|
/* FIXME: Detection doesn't work */
|
||||||
# define HAVE_NTDDNDIS_H 1
|
# define HAVE_NTDDNDIS_H 1
|
||||||
/* Visual C 9 (2008), Visual C 10 (2010), Visual C 11 (2012) and Visual C 12 (2013)
|
|
||||||
* need these prototypes
|
|
||||||
* XXX: Can we use MSC_VER >= 1500 ?? */
|
|
||||||
# if _MSC_VER == 1500 || _MSC_VER == 1600 || _MSC_VER == 1700 || _MSC_VER == 1800
|
|
||||||
# define NTDDI_VERSION NTDDI_WINXPSP3
|
|
||||||
# define _WIN32_WINNT _WIN32_WINNT_WINXP
|
|
||||||
# endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Flex (v 2.5.35) uses this symbol to "exclude" unistd.h
|
* Flex (v 2.5.35) uses this symbol to "exclude" unistd.h
|
||||||
*/
|
*/
|
||||||
# define YY_NO_UNISTD_H
|
# define YY_NO_UNISTD_H
|
||||||
|
|
||||||
|
|
||||||
# define strncasecmp strnicmp
|
# define strncasecmp strnicmp
|
||||||
# define popen _popen
|
# define popen _popen
|
||||||
# define pclose _pclose
|
# define pclose _pclose
|
||||||
|
|
|
@ -31,6 +31,11 @@
|
||||||
</trustInfo>
|
</trustInfo>
|
||||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
<application>
|
<application>
|
||||||
|
<!-- This should match the following:
|
||||||
|
- The NTDDI_VERSION and _WIN32_WINNT parts of cmakeconfig.h.in
|
||||||
|
- The GetWindowsVersion parts of packaging\nsis\wireshark.nsi
|
||||||
|
- The VersionNT parts of packaging\wix\Prerequisites.wxi
|
||||||
|
-->
|
||||||
<!-- Windows Vista -->
|
<!-- Windows Vista -->
|
||||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
||||||
<!-- Windows 7 -->
|
<!-- Windows 7 -->
|
||||||
|
|
|
@ -238,6 +238,11 @@ Function .onInit
|
||||||
; Get the Windows version
|
; Get the Windows version
|
||||||
${GetWindowsVersion} $R0
|
${GetWindowsVersion} $R0
|
||||||
|
|
||||||
|
; This should match the following:
|
||||||
|
; - The NTDDI_VERSION and _WIN32_WINNT parts of cmakeconfig.h.in
|
||||||
|
; - The <compatibility><application> section in image\wireshark.exe.manifest.in
|
||||||
|
; - The VersionNT parts of packaging\wix\Prerequisites.wxi
|
||||||
|
|
||||||
; Uncomment to test.
|
; Uncomment to test.
|
||||||
; MessageBox MB_OK "You're running Windows $R0."
|
; MessageBox MB_OK "You're running Windows $R0."
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,11 @@
|
||||||
to ensure the entire fragment is included. -->
|
to ensure the entire fragment is included. -->
|
||||||
<Property Id="IncludePrerequisites">1</Property>
|
<Property Id="IncludePrerequisites">1</Property>
|
||||||
|
|
||||||
|
<!-- This should match the following:
|
||||||
|
- The NTDDI_VERSION and _WIN32_WINNT parts of cmakeconfig.h.in
|
||||||
|
- The <compatibility><application> section in image\wireshark.exe.manifest.in
|
||||||
|
- The GetWindowsVersion parts of packaging\nsis\wireshark.nsi
|
||||||
|
-->
|
||||||
<Condition Message="Windows 2000 is no longer supported. Please install $(var.WiresharkName) 1.2 or 1.0 instead.">
|
<Condition Message="Windows 2000 is no longer supported. Please install $(var.WiresharkName) 1.2 or 1.0 instead.">
|
||||||
<![CDATA[Installed OR (VersionNT < 500) OR (VersionNT > 500)]]>
|
<![CDATA[Installed OR (VersionNT < 500) OR (VersionNT > 500)]]>
|
||||||
</Condition>
|
</Condition>
|
||||||
|
|
Loading…
Reference in New Issue