From: Paul Durrant Date: Thu, 19 Jul 2018 09:25:03 +0000 (+0100) Subject: Work around bug in VS2017 SDV X-Git-Tag: 9.0.0-rc1~30 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=e158f7f29a3652a5b6f10e6a070644c1b77ceaa5;p=pvdrivers%2Fwin%2Fxenvif.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 XENVIF. Signed-off-by: Paul Durrant --- diff --git a/build.py b/build.py index fbc92ae..4993ce2 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 36baa24..5fbd3ea 100644 --- a/src/coinst/coinst.c +++ b/src/coinst/coinst.c @@ -40,6 +40,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/xenvif/dbg_print.h b/src/xenvif/dbg_print.h index a31af9e..b645526 100644 --- a/src/xenvif/dbg_print.h +++ b/src/xenvif/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/xenvif/xenvif.vcxproj b/vs2015/xenvif/xenvif.vcxproj index cc39f8d..3be0c18 100644 --- a/vs2015/xenvif/xenvif.vcxproj +++ b/vs2015/xenvif/xenvif.vcxproj @@ -21,7 +21,7 @@ $(WindowsSdkDir)\include\km;..\..\include;..\..\include\xen;%(AdditionalIncludeDirectories) - __MODULE__="XENVIF";POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions) + PROJECT=$(ProjectName);POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions) EnableAllWarnings 4464;4711;4548;4820;4668;4255;6001;6054;28196;30030;30029;%(DisableSpecificWarnings) true diff --git a/vs2015/xenvif_coinst/xenvif_coinst.vcxproj b/vs2015/xenvif_coinst/xenvif_coinst.vcxproj index b8f7a98..3d4c39a 100644 --- a/vs2015/xenvif_coinst/xenvif_coinst.vcxproj +++ b/vs2015/xenvif_coinst/xenvif_coinst.vcxproj @@ -22,7 +22,7 @@ - __MODULE__="XENVIF_COINST";%(PreprocessorDefinitions) + PROJECT=$(ProjectName);%(PreprocessorDefinitions) EnableAllWarnings 4127;4548;4711;4820;4668;4255;6001;6054;28196;%(DisableSpecificWarnings) true diff --git a/vs2017/xenvif/xenvif.vcxproj b/vs2017/xenvif/xenvif.vcxproj index fbbcce7..f2e5d19 100644 --- a/vs2017/xenvif/xenvif.vcxproj +++ b/vs2017/xenvif/xenvif.vcxproj @@ -21,7 +21,7 @@ $(WindowsSdkDir)\include\km;..\..\include;..\..\include\xen;%(AdditionalIncludeDirectories) - __MODULE__="XENVIF";POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions) + PROJECT=$(ProjectName);POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions) true EnableAllWarnings 4464;4711;4770;4548;4820;4668;4255;5045;6001;6054;28196;30030;30029;%(DisableSpecificWarnings) diff --git a/vs2017/xenvif_coinst/xenvif_coinst.vcxproj b/vs2017/xenvif_coinst/xenvif_coinst.vcxproj index ee691ab..4b5faed 100644 --- a/vs2017/xenvif_coinst/xenvif_coinst.vcxproj +++ b/vs2017/xenvif_coinst/xenvif_coinst.vcxproj @@ -22,7 +22,7 @@ - __MODULE__="XENVIF_COINST";%(PreprocessorDefinitions) + PROJECT=$(ProjectName);%(PreprocessorDefinitions) EnableAllWarnings 4127;4548;4711;4820;4668;4255;5045;6001;6054;28196;%(DisableSpecificWarnings) true