diff options
author | Gerald Combs <gerald@wireshark.org> | 2017-12-08 10:44:44 -0800 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-12-10 07:50:14 +0000 |
commit | d0d1eaadf0c92e37b6ed2883583f71b7b9ec3a7e (patch) | |
tree | bde9885f848acad879156692a5c36d3175182182 /cmakeconfig.h.in | |
parent | 3d673da88c5ff4e56cbb3cf713b8c49704e62923 (diff) |
Win32: Add checks for _WIN32_WINNT and NTDDI_VERSION.
Check to see if we're the source of truth for _WIN32_WINNT and
NTDDI_VERSION in config.h and emit a compiler error if we aren't.
Rearrange the #includes in ui/qt/data_printer.cpp so that config.h is
included first. This fixes the following:
136>C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\cmbuild\config.h(411): warning C4005: 'NTDDI_VERSION': macro redefinition (compiling source file C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\ui\qt\utils\data_printer.cpp) [C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\cmbuild\ui\qt\qtui.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared\sdkddkver.h(223): note: see previous definition of 'NTDDI_VERSION' (compiling source file C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\ui\qt\utils\data_printer.cpp)
136>C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\cmbuild\config.h(412): warning C4005: '_WIN32_WINNT': macro redefinition (compiling source file C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\ui\qt\utils\data_printer.cpp) [C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\cmbuild\ui\qt\qtui.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared\sdkddkver.h(213): note: see previous definition of '_WIN32_WINNT' (compiling source file C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\ui\qt\utils\data_printer.cpp)
Change-Id: I90886cb9450463d768d6529ccd678ca11508cde2
Reviewed-on: https://code.wireshark.org/review/24744
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'cmakeconfig.h.in')
-rw-r--r-- | cmakeconfig.h.in | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in index 01810a1ec1..d60c411b6b 100644 --- a/cmakeconfig.h.in +++ b/cmakeconfig.h.in @@ -1,5 +1,8 @@ /* cmakeconfig.h.in */ +#ifndef __CONFIG_H__ +#define __CONFIG_H__ + /* Note: You cannot use earlier #defines in later #cmakedefines (cmake 2.6.2). */ /* Name of package */ @@ -408,7 +411,13 @@ * - The GetWindowsVersion parts of packaging\nsis\wireshark.nsi * - The VersionNT parts of packaging\wix\Prerequisites.wxi */ +# if defined(NTDDI_VERSION) +# error NTDDI_VERSION already defined. +# endif # define NTDDI_VERSION NTDDI_VISTA +# if defined(_WIN32_WINNT) +# error _WIN32_WINNT already defined. +# endif # define _WIN32_WINNT _WIN32_WINNT_VISTA /* WpdPack/INclude/pcap/pcap.h checks for "#if defined(WIN32)" */ @@ -443,3 +452,5 @@ #endif #include <ws_diag_control.h> + +#endif /* __CONFIG_H__ */ |