first steps to support MSVC 2008 Express Edition
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 30 Nov 2007 22:01:05 +0000 (22:01 +0000)
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 30 Nov 2007 22:01:05 +0000 (22:01 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23691 f5534014-38df-0310-8fa8-9805f1628bb7

Makefile.nmake
capture-pcap-util.c
capture-wpcap.c
capture_ui_utils.c
config.h.win32
config.nmake
version_info.c
wiretap/libpcap.c

index 6b972c3070945e87b48bfacd37f71b242d6481d8..4f38e2bfcfcdd102251e488278fdf6b6dc3fdd74 100644 (file)
@@ -856,6 +856,9 @@ install-files2:
 
 install-common-files:
        set copycmd=/y
+!IF "$(MSVC_VARIANT)" == "MSVC2008EE"
+       xcopy "$(MSVCR_DLL)" $(INSTALL_DIR)
+!ENDIF
        if not exist $(INSTALL_DIR) mkdir $(INSTALL_DIR)
 !IFDEF ENABLE_LIBWIRESHARK
        xcopy epan\libwireshark.dll $(INSTALL_DIR) /d
index a9c60ea5add65833a0d5ede896ba881fc6c11ce5..1c24afd485500eb5d0a911397d8a5bcda3acc497 100644 (file)
 
 #ifdef HAVE_LIBPCAP
 
-#include <pcap.h>
-
 #include <glib.h>
 
 #include <stdlib.h>
+#include <stdio.h>
 #include <limits.h>
 #include <string.h>
 
+#include <pcap.h>
+
 #ifdef HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
index f7667f2574ee5c4abeea2488899f24206ec436d0..81d06abecbd6f7f627d00ead31f114c7a0c7d896 100644 (file)
 # include "config.h"
 #endif
 
+#include <stdio.h>
+#include <glib.h>
+#include <gmodule.h>
+
 #ifdef HAVE_LIBPCAP
 #include <pcap.h>
 #endif
 
-#include <glib.h>
-#include <gmodule.h>
-
 #include "capture-pcap-util.h"
 #include "capture-pcap-util-int.h"
 
index 29cc38e7fb973b6cd86939067b5600ced55a814a..1d4b523dc683114dab2484344848cfa897aa5dc6 100644 (file)
@@ -28,6 +28,7 @@
 
 #ifdef HAVE_LIBPCAP
 
+#include <stdio.h>
 #include <string.h>
 #include <glib.h>
 
index 6fad39a462126379983666c488387627e36749d2..617ada715e5dcb3cadc84fe305250de038259c4e 100644 (file)
 #define HAVE_DIRECT_H          1
 #define NEED_INET_ATON_H       1
 #define NEED_INET_V6DEFS_H     1
+/* Visual C 9 (2008) now needs these prototypes */
+#if _MSC_VER == 1500
+#define NTDDI_VERSION NTDDI_WIN2K
+#define _WIN32_WINNT _WIN32_WINNT_WIN2K
+#endif
 #define NEED_GETOPT_H          1
 #define NEED_STRPTIME_H                1
 #define strcasecmp             stricmp
index 9122fc40cc804b162b84618ada53ce3e3018ecd9..9dae3f36d8f06b809cb999d05f853f0d2a45faf3 100644 (file)
@@ -80,6 +80,14 @@ MSVC_VARIANT=MSVC6
 # Visual C++ 8.0, _MSC_VER 1400, msvcr80.dll
 #MSVC_VARIANT=DOTNET20
 
+# "Microsoft Visual C++ 2008 Express Edition"
+# needs additional Platform SDK installation?
+# Visual C++ 9.0, _MSC_VER 1500, msvcr90.dll
+# With this variant, Wireshark will compile but fails to run!
+#
+# THIS VARIANT CURRENTLY WON'T WORK - YOU HAVE BEEN WARNED!
+#MSVC_VARIANT=MSVC2008EE
+
 #
 # Optional: To compile some time critical code from assembler instead of C
 #
@@ -92,6 +100,7 @@ MSVC_VARIANT=MSVC6
 #NASM=c:\progs\nasm\nasm.exe
 
 
+
 ##### Libraries #####
 
 #
@@ -408,7 +417,7 @@ UPX=$(WIRESHARK_LIBS)\upx301w\upx.exe
 #
 !IF "$(MSVC_VARIANT)" == "MSVC6" || "$(MSVC_VARIANT)" == "MSVC2002" || "$(MSVC_VARIANT)" == "DOTNET10" || "$(MSVC_VARIANT)" == "MSVC2003" || "$(MSVC_VARIANT)" == "DOTNET11"
 LOCAL_CFLAGS=/Zi /W3 /MD
-!ELSEIF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
+!ELSEIF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20" || "$(MSVC_VARIANT)" == "MSVC2008EE"
 LOCAL_CFLAGS=/Zi /W3 /MD /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
 !ELSE
 !ERROR MSVC_VARIANT unknown
@@ -488,6 +497,9 @@ VCREDIST_EXE=$(WIRESHARK_LIBS)\vcredist_x86.exe
 # and copy it to the lib folder!!!
 VCREDIST_EXE=$(WIRESHARK_LIBS)\vcredist_x86.exe
 
+!ELSEIF "$(MSVC_VARIANT)" == "MSVC2008EE"
+MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\*.*
+
 !ELSE
 !ERROR MSVC_VARIANT unknown
 !ENDIF
@@ -829,6 +841,8 @@ MSC_VER_REQUIRED=1300
 MSC_VER_REQUIRED=1310
 !ELSEIF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
 MSC_VER_REQUIRED=1400
+!ELSEIF "$(MSVC_VARIANT)" == "MSVC2008EE"
+MSC_VER_REQUIRED=1500
 !ELSE
 !ERROR MSVC_VARIANT unknown
 !ENDIF
index cd6a65070d68debb5c0de9fb3954b00fd882b58a..7b326e7960cc7c08213db151afac753ef01cae5e 100644 (file)
@@ -29,6 +29,7 @@
 #include <glib.h>
 
 #include <stdlib.h>
+#include <stdio.h>
 #include <string.h>
 #include <errno.h>
 
index 7d502c98e8185d8ae13def8449458b2ec8dc5d8a..ace86d1d783a35f7c14a6e1c49307bd6405d12be 100644 (file)
 #include "config.h"
 #endif
 
-#ifdef HAVE_PCAP_H
-#include <pcap.h>
-#endif
-
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
 #include "erf.h"
 #include "libpcap.h"
 
+#ifdef HAVE_PCAP_H
+#include <pcap.h>
+#endif
+
 #ifdef HAVE_PCAP_H
 # ifdef HAVE_SYS_TYPES_H
 #   include <sys/types.h>