aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2009-04-16 18:14:38 +0000
committerGerald Combs <gerald@wireshark.org>2009-04-16 18:14:38 +0000
commitc0ebf76780417a82404f5c87e179fc6c1dd12271 (patch)
tree55a0c3f3b7338e655f53786ec175759adf7b8662
parenta7fd8c01f26112721a0d4604d0d083deef3853d5 (diff)
Fix (and likely re-break) the Windows builds:
- Use the latest WinPcap Developer's Pack. - In file_dlg_win32.c, try to fix Visual C++ 6.0 compilation. - #if 0 out a bunch of definitions in capture_if_details_dlg_win32.c that already exist in Ntddndis.h. svn path=/trunk/; revision=28067
-rw-r--r--config.nmake2
-rw-r--r--gtk/capture_if_details_dlg_win32.c2
-rw-r--r--gtk/file_dlg_win32.c42
-rwxr-xr-xtools/win32-setup.sh6
4 files changed, 46 insertions, 6 deletions
diff --git a/config.nmake b/config.nmake
index b8a957f0d5..875106500d 100644
--- a/config.nmake
+++ b/config.nmake
@@ -174,7 +174,7 @@ PANGO_INST_VERSION=1.24
# If you don't have the WPdpack, comment this line out, so that
# PCAP_DIR isn't defined.
#
-PCAP_VERSION=4_0_2
+PCAP_VERSION=4_1_beta5
PCAP_DIR=$(WIRESHARK_LIBS)\WPdpack
#
diff --git a/gtk/capture_if_details_dlg_win32.c b/gtk/capture_if_details_dlg_win32.c
index c0e5ecca1f..ccffe80620 100644
--- a/gtk/capture_if_details_dlg_win32.c
+++ b/gtk/capture_if_details_dlg_win32.c
@@ -155,8 +155,8 @@ struct sockaddr_storage {
#define OID_GEN_TRANSPORT_HEADER_OFFSET 0x00010119
+#if 0
/* Physical medium (OID_GEN_PHYSICAL_MEDIUM) */
-#ifndef _WIN64
typedef enum ndis_phys_medium {
NdisPhysicalMediumUnspecified,
NdisPhysicalMediumWirelessLan,
diff --git a/gtk/file_dlg_win32.c b/gtk/file_dlg_win32.c
index ed54477420..214e8fb3f1 100644
--- a/gtk/file_dlg_win32.c
+++ b/gtk/file_dlg_win32.c
@@ -98,12 +98,24 @@ typedef enum {
#define FILE_DEFAULT_COLOR 2
-
+/*
+ * We should probably test the SDK version instead of the compiler version,
+ * but this should work for our purposes.
+ */
+#if (_MSC_VER <= 1200)
+static UINT CALLBACK open_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param);
+static UINT CALLBACK save_as_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param);
+static UINT CALLBACK merge_file_hook_proc(HWND mf_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param);
+static UINT CALLBACK export_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param);
+static UINT CALLBACK export_raw_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param);
+#else
static UINT_PTR CALLBACK open_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param);
static UINT_PTR CALLBACK save_as_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param);
static UINT_PTR CALLBACK merge_file_hook_proc(HWND mf_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param);
static UINT_PTR CALLBACK export_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param);
static UINT_PTR CALLBACK export_raw_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param);
+#endif /* (_MSC_VER <= 1200) */
+
static void range_update_dynamics(HWND sf_hwnd, packet_range_t *range);
static void range_handle_wm_initdialog(HWND dlg_hwnd, packet_range_t *range);
static void range_handle_wm_command(HWND dlg_hwnd, HWND ctrl, WPARAM w_param, packet_range_t *range);
@@ -179,7 +191,11 @@ win32_open_file (HWND h_wnd) {
ofn->lStructSize = ofnsize;
ofn->hwndOwner = h_wnd;
+#if (_MSC_VER <= 1200)
+ ofn->hInstance = (HINSTANCE) GetWindowLong(h_wnd, GWL_HINSTANCE);
+#else
ofn->hInstance = (HINSTANCE) GetWindowLongPtr(h_wnd, GWLP_HINSTANCE);
+#endif
ofn->lpstrFilter = build_file_type_list(FALSE /*!save*/, NULL);
ofn->lpstrCustomFilter = NULL;
ofn->nMaxCustFilter = 0;
@@ -260,7 +276,11 @@ win32_save_as_file(HWND h_wnd, action_after_save_e action_after_save, gpointer a
ofn->lStructSize = ofnsize;
ofn->hwndOwner = h_wnd;
+#if (_MSC_VER <= 1200)
+ ofn->hInstance = (HINSTANCE) GetWindowLong(h_wnd, GWL_HINSTANCE);
+#else
ofn->hInstance = (HINSTANCE) GetWindowLongPtr(h_wnd, GWLP_HINSTANCE);
+#endif
ofn->lpstrFilter = build_file_type_list(TRUE /*save*/, &save_index);
ofn->lpstrCustomFilter = NULL;
ofn->nMaxCustFilter = 0;
@@ -385,7 +405,11 @@ win32_merge_file (HWND h_wnd) {
ofn->lStructSize = ofnsize;
ofn->hwndOwner = h_wnd;
+#if (_MSC_VER <= 1200)
+ ofn->hInstance = (HINSTANCE) GetWindowLong(h_wnd, GWL_HINSTANCE);
+#else
ofn->hInstance = (HINSTANCE) GetWindowLongPtr(h_wnd, GWLP_HINSTANCE);
+#endif
ofn->lpstrFilter = build_file_type_list(FALSE /*!save*/, NULL);
ofn->lpstrCustomFilter = NULL;
ofn->nMaxCustFilter = 0;
@@ -504,7 +528,11 @@ win32_export_file(HWND h_wnd, export_type_e export_type) {
ofn->lStructSize = ofnsize;
ofn->hwndOwner = h_wnd;
+#if (_MSC_VER <= 1200)
+ ofn->hInstance = (HINSTANCE) GetWindowLong(h_wnd, GWL_HINSTANCE);
+#else
ofn->hInstance = (HINSTANCE) GetWindowLongPtr(h_wnd, GWLP_HINSTANCE);
+#endif
ofn->lpstrFilter = FILE_TYPES_EXPORT;
ofn->lpstrCustomFilter = NULL;
ofn->nMaxCustFilter = 0;
@@ -624,7 +652,11 @@ win32_export_raw_file(HWND h_wnd) {
ofn->lStructSize = ofnsize;
ofn->hwndOwner = h_wnd;
+#if (_MSC_VER <= 1200)
+ ofn->hInstance = (HINSTANCE) GetWindowLong(h_wnd, GWL_HINSTANCE);
+#else
ofn->hInstance = (HINSTANCE) GetWindowLongPtr(h_wnd, GWLP_HINSTANCE);
+#endif
ofn->lpstrFilter = FILE_TYPES_RAW;
ofn->lpstrCustomFilter = NULL;
ofn->nMaxCustFilter = 0;
@@ -703,7 +735,11 @@ win32_export_color_file(HWND h_wnd, gpointer filter_list) {
ofn->lStructSize = ofnsize;
ofn->hwndOwner = h_wnd;
+#if (_MSC_VER <= 1200)
+ ofn->hInstance = (HINSTANCE) GetWindowLong(h_wnd, GWL_HINSTANCE);
+#else
ofn->hInstance = (HINSTANCE) GetWindowLongPtr(h_wnd, GWLP_HINSTANCE);
+#endif
ofn->lpstrFilter = FILE_TYPES_COLOR;
ofn->lpstrCustomFilter = NULL;
ofn->nMaxCustFilter = 0;
@@ -764,7 +800,11 @@ win32_import_color_file(HWND h_wnd, gpointer color_filters) {
ofn->lStructSize = ofnsize;
ofn->hwndOwner = h_wnd;
+#if (_MSC_VER <= 1200)
+ ofn->hInstance = (HINSTANCE) GetWindowLong(h_wnd, GWL_HINSTANCE);
+#else
ofn->hInstance = (HINSTANCE) GetWindowLongPtr(h_wnd, GWLP_HINSTANCE);
+#endif
ofn->lpstrFilter = FILE_TYPES_COLOR;
ofn->lpstrCustomFilter = NULL;
ofn->nMaxCustFilter = 0;
diff --git a/tools/win32-setup.sh b/tools/win32-setup.sh
index bcd99c5636..95fe67848c 100755
--- a/tools/win32-setup.sh
+++ b/tools/win32-setup.sh
@@ -9,7 +9,7 @@
# in order to provide backward compatibility with older trees (e.g. a
# previous release or an older SVN checkout).
# Save previous tag.
-DOWNLOAD_TAG=${DOWNLOAD_TAG:-"2009-03-19"}
+DOWNLOAD_TAG=${DOWNLOAD_TAG:-"2009-04-16"}
WIRESHARK_TARGET_PLATFORM=${WIRESHARK_TARGET_PLATFORM:-"win32"}
DOWNLOAD_PREFIX="http://anonsvn.wireshark.org/wireshark-$WIRESHARK_TARGET_PLATFORM-libs/tags/$DOWNLOAD_TAG/packages/"
@@ -82,7 +82,7 @@ case "$1" in
which which > /dev/null 2>&1 || \
err_exit "Can't find 'which'. Unable to proceed."
- MISSING_APPS=
+ MISSING_APPS=
for APP in $* ; do
APP_PATH=`cygpath --unix $APP`
if [ -x "$APP_PATH" -a ! -d "$APP_PATH" ] ; then
@@ -98,7 +98,7 @@ case "$1" in
done
if [ -n "$MISSING_APPS" ]; then
- echo
+ echo
echo "Can't find: $MISSING_APPS"
err_exit "These are probably optional cygwin packages not yet installed. Try to install them using cygwin's setup.exe!"
fi