diff options
author | Guy Harris <guy@alum.mit.edu> | 2007-12-07 23:58:46 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2007-12-07 23:58:46 +0000 |
commit | 947e70b4b72bf65c8ad5e29d5cc0d7353f031513 (patch) | |
tree | 7901804d8412c5b0248e742c48f65a09151e5c39 | |
parent | 8b87d048e9f98e9261742118cf0664639f88d96c (diff) | |
download | wireshark-947e70b4b72bf65c8ad5e29d5cc0d7353f031513.tar.gz wireshark-947e70b4b72bf65c8ad5e29d5cc0d7353f031513.tar.bz2 wireshark-947e70b4b72bf65c8ad5e29d5cc0d7353f031513.zip |
Delete the *right* config.h.win32.
Copy the MSVC++-version-checking stuff from it into the top-level
config.h.win32, and try to set up config.nmake so that MSC_VER_REQUIRED
is defined in all Makefiles that include config.nmake.
svn path=/trunk/; revision=23802
-rw-r--r-- | config.h.win32 | 8 | ||||
-rw-r--r-- | config.nmake | 35 | ||||
-rw-r--r-- | wiretap/Makefile.nmake | 2 | ||||
-rw-r--r-- | wiretap/config.h.win32 | 60 |
4 files changed, 26 insertions, 79 deletions
diff --git a/config.h.win32 b/config.h.win32 index 1e4e1e583f..fe6b66c66e 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -264,3 +264,11 @@ /* We shouldn't need this under Windows but we'll define it anyway. */ #define HTML_VIEWER "mozilla" + +/* Check for the required _MSC_VER */ +#if MSC_VER_REQUIRED != _MSC_VER +#define WS_TO_STRING2(x) #x +#define WS_TO_STRING(x) WS_TO_STRING2(x) +#pragma message( "_MSC_VER is:" WS_TO_STRING(_MSC_VER) " but required is:" WS_TO_STRING(MSC_VER_REQUIRED) ) +#error Your MSVC_VARIANT setting in config.nmake doesn't match the MS compiler version! +#endif diff --git a/config.nmake b/config.nmake index af4abd9958..98ee4ae365 100644 --- a/config.nmake +++ b/config.nmake @@ -414,6 +414,21 @@ UPX=$(WIRESHARK_LIBS)\upx301w\upx.exe ##### Flags, PATHs and Miscellaneous ##### +# "convert" the MSVC variant into the required MSC compiler version +!IF "$(MSVC_VARIANT)" == "MSVC6" +MSC_VER_REQUIRED=1200 +!ELSEIF "$(MSVC_VARIANT)" == "MSVC2002" || "$(MSVC_VARIANT)" == "DOTNET10" +MSC_VER_REQUIRED=1300 +!ELSEIF "$(MSVC_VARIANT)" == "MSVC2003" || "$(MSVC_VARIANT)" == "DOTNET11" +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 + # Compiler flags: # /W3 warning level 3 (0 less - 4 most, 1 default) # /Zi create .pdb file for debugging @@ -422,9 +437,9 @@ UPX=$(WIRESHARK_LIBS)\upx301w\upx.exe # /D_CRT_NONSTDC_NO_DEPRECATE don't warn for "Deprecated CRT Functions" as MSDN calls this # !IF "$(MSVC_VARIANT)" == "MSVC6" || "$(MSVC_VARIANT)" == "MSVC2002" || "$(MSVC_VARIANT)" == "DOTNET10" || "$(MSVC_VARIANT)" == "MSVC2003" || "$(MSVC_VARIANT)" == "DOTNET11" -LOCAL_CFLAGS=/Zi /W3 /MD +LOCAL_CFLAGS=/Zi /W3 /MD /DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED) !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 +LOCAL_CFLAGS=/Zi /W3 /MD /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED) !ELSE !ERROR MSVC_VARIANT unknown !ENDIF @@ -852,19 +867,3 @@ LIBWIRESHARK_CONFIG= # Construct the path PATH=$(PATH);$(CYGWIN_PATH);$(GLIB_DIR)\bin;$(GETTEXT_DIR)\bin;$(ICONV_DIR)\bin;$(ZLIB_PATH);$(ADNS_PATH) - - -# "convert" the MSVC variant into the required MSC compiler version -!IF "$(MSVC_VARIANT)" == "MSVC6" -MSC_VER_REQUIRED=1200 -!ELSEIF "$(MSVC_VARIANT)" == "MSVC2002" || "$(MSVC_VARIANT)" == "DOTNET10" -MSC_VER_REQUIRED=1300 -!ELSEIF "$(MSVC_VARIANT)" == "MSVC2003" || "$(MSVC_VARIANT)" == "DOTNET11" -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 diff --git a/wiretap/Makefile.nmake b/wiretap/Makefile.nmake index 78e16f0e37..3e5186251c 100644 --- a/wiretap/Makefile.nmake +++ b/wiretap/Makefile.nmake @@ -9,7 +9,7 @@ include ..\Makefile.nmake.inc include Makefile.common CFLAGS=-WX -DYYMALLOC=malloc -DYYFREE=free -DHAVE_CONFIG_H $(GLIB_CFLAGS) $(ZLIB_CFLAGS) /I$(PCAP_DIR)/include \ - -D_U_="" $(LOCAL_CFLAGS) -DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED) + -D_U_="" $(LOCAL_CFLAGS) CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL diff --git a/wiretap/config.h.win32 b/wiretap/config.h.win32 deleted file mode 100644 index 6ad9bcf7dc..0000000000 --- a/wiretap/config.h.win32 +++ /dev/null @@ -1,60 +0,0 @@ -/* $Id$ */ -/* config.h.win32 Generated manually. :-) */ -/* config.h. Generated automatically by configure. */ -/* config.h.in. Generated automatically from configure.in by autoheader. */ - -/* Generated Bison and Flex files test whether __STDC__ is defined - in order to check whether to use ANSI C features such as "const". - - GCC defines it as 1 even if extensions that render the implementation - non-conformant are enabled; Sun's C compiler (and, I think, other - AT&T-derived C compilers) define it as 0 if extensions that render - the implementation non-conformant are enabled; Microsoft Visual C++ - 6.0 doesn't define it at all if extensions that render the implementation - non-conformant are enabled. - - We define it as 0 here, so that those generated files will use - those features (and thus not get type warnings when compiled with - MSVC++). */ -#ifndef __STDC__ -#define __STDC__ 0 -#endif - -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define if you have the <unistd.h> header file. */ -/* #define HAVE_UNISTD_H */ - -/* Define if you have the z library (-lz). */ -@HAVE_LIBZ@ - -/* Define if you have the <sys/stat.h> header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define if you have the <sys/types.h> header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define if you have the <fcntl.h> header file. */ -#define HAVE_FCNTL_H 1 - -/* Name of package */ -#define PACKAGE "libwtap.a" - -/* Version number of package */ -#define VERSION "@VERSION@" - -#define HAVE_WINSOCK2_H 1 -#define HAVE_PCAP_H 1 - -/* Needed for zlib, according to http://www.winimage.com/zLibDll/ */ -/*#define ZLIB_DLL 1 -#define _WINDOWS 1*/ - -/* Check for the required _MSC_VER */ -#if MSC_VER_REQUIRED != _MSC_VER -#define WS_TO_STRING2(x) #x -#define WS_TO_STRING(x) WS_TO_STRING2(x) -#pragma message( "_MSC_VER is:" WS_TO_STRING(_MSC_VER) " but required is:" WS_TO_STRING(MSC_VER_REQUIRED) ) -#error Your MSVC_VARIANT setting in config.nmake doesn't match the MS compiler version! -#endif |