From: Paul Durrant Date: Thu, 19 Jul 2018 09:40:40 +0000 (+0100) Subject: Work around bug in VS2017 SDV X-Git-Tag: 9.0.0-rc1~9 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=85fc673b2e93c2533be09fa6599439df58090650;p=pvdrivers%2Fwin%2Fxennet.git Work around bug in VS2017 SDV XENBUS commit 868cd40f (of the same name) introduced a workaround for a quoting bug in SDV. This commit applies a similar workaround for XENNET. Signed-off-by: Paul Durrant --- diff --git a/build.py b/build.py index 290c022..44a1e3c 100755 --- a/build.py +++ b/build.py @@ -268,7 +268,7 @@ def run_sdv(name, dir, vs): '/p:Inputs="/clean"', os.path.join(vs, name)) msbuild(platform, configuration, 'sdv', name + '.vcxproj', - '/p:Inputs="/check:default.sdv"', os.path.join(vs, name)) + '/p:Inputs="/check:default.sdv /debug"', os.path.join(vs, name)) path = [vs, name, 'sdv', 'SDV.DVL.xml'] remove_timestamps(os.path.join(*path)) diff --git a/src/coinst/coinst.c b/src/coinst/coinst.c index f508ead..89547cc 100644 --- a/src/coinst/coinst.c +++ b/src/coinst/coinst.c @@ -49,6 +49,10 @@ #include #include +#define stringify_literal(_text) #_text +#define stringify(_text) stringify_literal(_text) +#define __MODULE__ stringify(PROJECT) + __user_code; #define MAXIMUM_BUFFER_SIZE 1024 diff --git a/src/xennet/dbg_print.h b/src/xennet/dbg_print.h index b8aa99a..3f33319 100644 --- a/src/xennet/dbg_print.h +++ b/src/xennet/dbg_print.h @@ -35,9 +35,9 @@ #include #include -#ifdef _SDV_ -#define __MODULE__ "" -#endif +#define stringify_literal(_text) #_text +#define stringify(_text) stringify_literal(_text) +#define __MODULE__ stringify(PROJECT) #pragma warning(disable:4127) // conditional expression is constant diff --git a/vs2015/xennet/xennet.vcxproj b/vs2015/xennet/xennet.vcxproj index a6827b9..4acae2a 100644 --- a/vs2015/xennet/xennet.vcxproj +++ b/vs2015/xennet/xennet.vcxproj @@ -22,7 +22,7 @@ - __MODULE__="XENNET";NDIS_MINIPORT_DRIVER;NDIS_WDM=1;NDIS61_MINIPORT=1;POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions) + PROJECT=$(ProjectName);NDIS_MINIPORT_DRIVER;NDIS_WDM=1;NDIS61_MINIPORT=1;POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions) $(WindowsSdkDir)\include\km;..\..\include;..\..\include\xen; EnableAllWarnings 4464;4711;4548;4820;4668;4255;6001;6054;28160;28196;30030;30029;%(DisableSpecificWarnings) diff --git a/vs2015/xennet_coinst/xennet_coinst.vcxproj b/vs2015/xennet_coinst/xennet_coinst.vcxproj index 3feda2d..3c901ca 100644 --- a/vs2015/xennet_coinst/xennet_coinst.vcxproj +++ b/vs2015/xennet_coinst/xennet_coinst.vcxproj @@ -20,7 +20,7 @@ $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - __MODULE__="XENNET_COINST";%(PreprocessorDefinitions) + PROJECT=$(ProjectName);;%(PreprocessorDefinitions) EnableAllWarnings 4548;4820;4668;4255;6001;6054;28196;%(DisableSpecificWarnings) true diff --git a/vs2017/xennet/xennet.vcxproj b/vs2017/xennet/xennet.vcxproj index a64d0cb..d602ae0 100644 --- a/vs2017/xennet/xennet.vcxproj +++ b/vs2017/xennet/xennet.vcxproj @@ -22,7 +22,7 @@ - __MODULE__="XENNET";NDIS_MINIPORT_DRIVER;NDIS_WDM=1;NDIS61_MINIPORT=1;POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions) + PROJECT=$(ProjectName);NDIS_MINIPORT_DRIVER;NDIS_WDM=1;NDIS61_MINIPORT=1;POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions) true $(WindowsSdkDir)\include\km;..\..\include;..\..\include\xen; EnableAllWarnings diff --git a/vs2017/xennet_coinst/xennet_coinst.vcxproj b/vs2017/xennet_coinst/xennet_coinst.vcxproj index 4b819b4..aae8494 100644 --- a/vs2017/xennet_coinst/xennet_coinst.vcxproj +++ b/vs2017/xennet_coinst/xennet_coinst.vcxproj @@ -20,7 +20,7 @@ $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - __MODULE__="XENNET_COINST";%(PreprocessorDefinitions) + PROJECT=$(ProjectName);%(PreprocessorDefinitions) EnableAllWarnings 4548;4820;4668;4255;5045;6001;6054;28196;%(DisableSpecificWarnings) true