aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGraham Bloice <graham.bloice@trihedral.com>2015-01-03 20:52:54 +0000
committerGerald Combs <gerald@wireshark.org>2015-01-04 00:26:13 +0000
commitaad1a81b99d4f65d5debf2b34f237081baef03a6 (patch)
tree42d3d6cc720e2317ae6d7c53e24de151cc25846b
parent938485436e7b7c647323a147c8ea1abc33e07564 (diff)
Fix out-of-tree build includes of config.h
If a file in the same directory as config.h, e.g. wireshark-qt.cpp has a #include "config.h", or another header it includes also has a #include "config.h", then an out-of-tree build, e.g. CMake will pick up any in-tree config.h and odd things may happen. The correct form is #include <config.h> which will pick up the out-of-tree version. To find this, introduce a deliberate error and then make an out-of-tree build, noting where it fails and fix that file. If that file includes other files that still cause the build to fail, set the compiler to emit the pre-processed version so you can locate the include with the next errant "config.h". Repeat ad nauseum. Possibly all includes of "config.h" should be changed to <config.h> Revert "CMake: Clobber the top-level config.h before we build." This reverts commit 1f3849ce614aeae5fda742beffe5558e7c2a8b71. Ping-Bug: 10301 Change-Id: Ie567e7cc696fd48f3e730fc27032c5d2a7d8f341 Reviewed-on: https://code.wireshark.org/review/6285 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
-rw-r--r--CMakeLists.txt10
-rw-r--r--codecs/codecs.h2
-rw-r--r--ui/qt/byte_view_tab.h2
-rw-r--r--ui/qt/capture_file.h2
-rw-r--r--ui/qt/capture_file_properties_dialog.h2
-rw-r--r--ui/qt/capture_interfaces_dialog.h2
-rw-r--r--ui/qt/file_set_dialog.h2
-rw-r--r--ui/qt/follow_stream_dialog.h2
-rw-r--r--ui/qt/interface_tree.h2
-rw-r--r--ui/qt/main_window.h2
-rw-r--r--ui/qt/packet_list_model.h2
-rw-r--r--ui/qt/packet_list_record.h2
-rw-r--r--ui/qt/preferences_dialog.h2
-rw-r--r--ui/qt/proto_tree.h2
-rw-r--r--ui/qt/related_packet_delegate.h2
-rw-r--r--ui/qt/simple_dialog.h2
-rw-r--r--ui/qt/splash_overlay.h2
-rw-r--r--ui/qt/traffic_table_dialog.h2
-rw-r--r--ui/qt/wireshark_application.h2
-rw-r--r--wireshark-qt.cpp6
20 files changed, 21 insertions, 31 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8d8f7c2532..125d3008fa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -915,16 +915,6 @@ endif()
set( VERSION ${PROJECT_VERSION} )
set( configure_input "Built with CMake ${CMAKE_VERSION}" )
configure_file(${CMAKE_SOURCE_DIR}/cmakeconfig.h.in ${CMAKE_BINARY_DIR}/config.h)
-
-if(NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
- # Try to run before anything else. Ideally we'd just use add_custom_command(... PRE_BUILD)
- # but that only works for Visual Studio. As it is this likely has a race condition.
- add_custom_target(clean_other_build_system_conflicts ALL
- COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_SOURCE_DIR}/config.h
- DEPENDS ${CMAKE_BINARY_DIR}/config.h ${CMAKE_BINARY_DIR}/version.h
- )
-endif()
-
set( IN_FILES
adns_dll.rc
capchild/doxygen.cfg.in
diff --git a/codecs/codecs.h b/codecs/codecs.h
index 794cd32b63..80d0d71e2f 100644
--- a/codecs/codecs.h
+++ b/codecs/codecs.h
@@ -23,7 +23,7 @@
#ifndef _CODECS_H_
#define _CODECS_H_
-#include "config.h"
+#include <config.h>
#include <epan/epan.h>
#include "ws_symbol_export.h"
diff --git a/ui/qt/byte_view_tab.h b/ui/qt/byte_view_tab.h
index 82aaed340e..c36931a881 100644
--- a/ui/qt/byte_view_tab.h
+++ b/ui/qt/byte_view_tab.h
@@ -22,7 +22,7 @@
#ifndef BYTE_VIEW_TAB_H
#define BYTE_VIEW_TAB_H
-#include "config.h"
+#include <config.h>
#include <epan/packet.h>
#include <epan/proto.h>
diff --git a/ui/qt/capture_file.h b/ui/qt/capture_file.h
index 08f51385a3..3a4742e312 100644
--- a/ui/qt/capture_file.h
+++ b/ui/qt/capture_file.h
@@ -24,7 +24,7 @@
#include <QObject>
-#include "config.h"
+#include <config.h>
#include <glib.h>
diff --git a/ui/qt/capture_file_properties_dialog.h b/ui/qt/capture_file_properties_dialog.h
index 09272a4994..0581a80686 100644
--- a/ui/qt/capture_file_properties_dialog.h
+++ b/ui/qt/capture_file_properties_dialog.h
@@ -24,7 +24,7 @@
#ifndef CAPTURE_FILE_PROPERTIES_DIALOG_H
#define CAPTURE_FILE_PROPERTIES_DIALOG_H
-#include "config.h"
+#include <config.h>
#include <glib.h>
diff --git a/ui/qt/capture_interfaces_dialog.h b/ui/qt/capture_interfaces_dialog.h
index 5ec54d7f6a..89639cdfcf 100644
--- a/ui/qt/capture_interfaces_dialog.h
+++ b/ui/qt/capture_interfaces_dialog.h
@@ -23,7 +23,7 @@
#ifndef CAPTURE_INTERFACES_DIALOG_H
#define CAPTURE_INTERFACES_DIALOG_H
-#include "config.h"
+#include <config.h>
#ifdef HAVE_LIBPCAP
diff --git a/ui/qt/file_set_dialog.h b/ui/qt/file_set_dialog.h
index f8bbe47055..227bf6d19f 100644
--- a/ui/qt/file_set_dialog.h
+++ b/ui/qt/file_set_dialog.h
@@ -22,7 +22,7 @@
#ifndef FILE_SET_DIALOG_H
#define FILE_SET_DIALOG_H
-#include "config.h"
+#include <config.h>
#include <glib.h>
diff --git a/ui/qt/follow_stream_dialog.h b/ui/qt/follow_stream_dialog.h
index 107767d446..aa49b16537 100644
--- a/ui/qt/follow_stream_dialog.h
+++ b/ui/qt/follow_stream_dialog.h
@@ -22,7 +22,7 @@
#ifndef FOLLOW_STREAM_DIALOG_H
#define FOLLOW_STREAM_DIALOG_H
-#include "config.h"
+#include <config.h>
#include <glib.h>
diff --git a/ui/qt/interface_tree.h b/ui/qt/interface_tree.h
index 48b5b5acd9..33c8ed2f19 100644
--- a/ui/qt/interface_tree.h
+++ b/ui/qt/interface_tree.h
@@ -22,7 +22,7 @@
#ifndef INTERFACE_TREE_H
#define INTERFACE_TREE_H
-#include "config.h"
+#include <config.h>
#include <glib.h>
diff --git a/ui/qt/main_window.h b/ui/qt/main_window.h
index a31eeaeea7..3047f27290 100644
--- a/ui/qt/main_window.h
+++ b/ui/qt/main_window.h
@@ -24,7 +24,7 @@
#include <stdio.h>
-#include "config.h"
+#include <config.h>
#include <glib.h>
diff --git a/ui/qt/packet_list_model.h b/ui/qt/packet_list_model.h
index 9c22be5daa..fedde05149 100644
--- a/ui/qt/packet_list_model.h
+++ b/ui/qt/packet_list_model.h
@@ -22,7 +22,7 @@
#ifndef PACKET_LIST_MODEL_H
#define PACKET_LIST_MODEL_H
-#include "config.h"
+#include <config.h>
#include <stdio.h>
diff --git a/ui/qt/packet_list_record.h b/ui/qt/packet_list_record.h
index 5eefa3ff5f..af2b251eb4 100644
--- a/ui/qt/packet_list_record.h
+++ b/ui/qt/packet_list_record.h
@@ -22,7 +22,7 @@
#ifndef PACKET_LIST_RECORD_H
#define PACKET_LIST_RECORD_H
-#include "config.h"
+#include <config.h>
#include <glib.h>
diff --git a/ui/qt/preferences_dialog.h b/ui/qt/preferences_dialog.h
index 1e08d53954..baa17f12af 100644
--- a/ui/qt/preferences_dialog.h
+++ b/ui/qt/preferences_dialog.h
@@ -22,7 +22,7 @@
#ifndef PREFERENCES_DIALOG_H
#define PREFERENCES_DIALOG_H
-#include "config.h"
+#include <config.h>
#include <glib.h>
diff --git a/ui/qt/proto_tree.h b/ui/qt/proto_tree.h
index 54d081bd4d..66426f4aef 100644
--- a/ui/qt/proto_tree.h
+++ b/ui/qt/proto_tree.h
@@ -22,7 +22,7 @@
#ifndef PROTO_TREE_H
#define PROTO_TREE_H
-#include "config.h"
+#include <config.h>
#include <epan/proto.h>
diff --git a/ui/qt/related_packet_delegate.h b/ui/qt/related_packet_delegate.h
index e1a6bcc4a6..db8b1a617a 100644
--- a/ui/qt/related_packet_delegate.h
+++ b/ui/qt/related_packet_delegate.h
@@ -22,7 +22,7 @@
#ifndef RELATED_PACKET_DELEGATE_H
#define RELATED_PACKET_DELEGATE_H
-#include "config.h"
+#include <config.h>
#include "epan/conversation.h"
diff --git a/ui/qt/simple_dialog.h b/ui/qt/simple_dialog.h
index 98ab98598a..2185a9c0dd 100644
--- a/ui/qt/simple_dialog.h
+++ b/ui/qt/simple_dialog.h
@@ -22,7 +22,7 @@
#ifndef SIMPLE_DIALOG_H
#define SIMPLE_DIALOG_H
-#include "config.h"
+#include <config.h>
#include <stdio.h>
diff --git a/ui/qt/splash_overlay.h b/ui/qt/splash_overlay.h
index 775e8f6080..4fc6631b7c 100644
--- a/ui/qt/splash_overlay.h
+++ b/ui/qt/splash_overlay.h
@@ -22,7 +22,7 @@
#ifndef SPLASH_OVERLAY_H
#define SPLASH_OVERLAY_H
-#include "config.h"
+#include <config.h>
#include <glib.h>
diff --git a/ui/qt/traffic_table_dialog.h b/ui/qt/traffic_table_dialog.h
index aac88a40ea..e8b6ba39fb 100644
--- a/ui/qt/traffic_table_dialog.h
+++ b/ui/qt/traffic_table_dialog.h
@@ -22,7 +22,7 @@
#ifndef TRAFFIC_TABLE_DIALOG_H
#define TRAFFIC_TABLE_DIALOG_H
-#include "config.h"
+#include <config.h>
#include "file.h"
diff --git a/ui/qt/wireshark_application.h b/ui/qt/wireshark_application.h
index 48f729cbc5..f66a926e09 100644
--- a/ui/qt/wireshark_application.h
+++ b/ui/qt/wireshark_application.h
@@ -22,7 +22,7 @@
#ifndef WIRESHARK_APPLICATION_H
#define WIRESHARK_APPLICATION_H
-#include "config.h"
+#include <config.h>
#include <glib.h>
diff --git a/wireshark-qt.cpp b/wireshark-qt.cpp
index 1bd2f6d61b..f8b708032b 100644
--- a/wireshark-qt.cpp
+++ b/wireshark-qt.cpp
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include "config.h"
+#include <config.h>
#include <glib.h>
@@ -28,7 +28,7 @@
#endif
#ifdef HAVE_LIBZ
-#include <zlib.h> /* to get the libz version number */
+#include <zlib.h> /* to get the libz version number */
#endif
#ifdef HAVE_GETOPT_H
@@ -407,7 +407,7 @@ int main(int argc, char *argv[])
gboolean arg_error = FALSE;
#ifdef _WIN32
- WSADATA wsaData;
+ WSADATA wsaData;
#endif /* _WIN32 */
char *rf_path;