Fix (and likely re-break) the Windows builds:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 16 Apr 2009 18:14:38 +0000 (18:14 +0000)
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 16 Apr 2009 18:14:38 +0000 (18:14 +0000)
  - 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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28067 f5534014-38df-0310-8fa8-9805f1628bb7

config.nmake
gtk/capture_if_details_dlg_win32.c
gtk/file_dlg_win32.c
tools/win32-setup.sh

index b8a957f0d522b18b9362a94149728eadcb42acdf..875106500d22aed3b09f28f2640348233ce187c5 100644 (file)
@@ -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
 
 #
index c0e5ecca1fd15b0dfffc932806908dee2c231ebc..ccffe8062023cbf0c9013c6d854e5977dced4a30 100644 (file)
@@ -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,
index ed54477420c5022b4ef1caeed8a2af1f6434dc13..214e8fb3f151e1ce5651434926e419794fe96f7f 100644 (file)
@@ -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;
index bcd99c5636977b516268eacec5f3c3fe6b75220b..95fe67848c84b74ef703e6ba01321724c7e35c96 100755 (executable)
@@ -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