Skip to content

Commit 6f798b9

Browse files
michaelwookeyspearce
authored andcommitted
generators/vcproj.pm: remove UNICODE from build
Defining UNICODE for MSVC IDE builds results in certain Win32 WIDE API's receiving ANSI strings. The result of which is an invalid use of the API and will end in either data corruption or an application crash. Prevent the use of WIDE API's when building with the MSVC IDE for compatibility with msysGit. Signed-off-by: Michael Wookey <[email protected]> Acked-by: Marius Storm-Olsen <[email protected]> Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent 0484682 commit 6f798b9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

contrib/buildsystems/Generators/Vcproj.pm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ sub createLibProject {
173173
Optimization="0"
174174
InlineFunctionExpansion="1"
175175
AdditionalIncludeDirectories="$includes"
176-
PreprocessorDefinitions="UNICODE,WIN32,_DEBUG,$defines"
176+
PreprocessorDefinitions="WIN32,_DEBUG,$defines"
177177
MinimalRebuild="true"
178178
RuntimeLibrary="1"
179179
UsePrecompiledHeader="0"
@@ -239,7 +239,7 @@ sub createLibProject {
239239
InlineFunctionExpansion="1"
240240
EnableIntrinsicFunctions="true"
241241
AdditionalIncludeDirectories="$includes"
242-
PreprocessorDefinitions="UNICODE,WIN32,NDEBUG,$defines"
242+
PreprocessorDefinitions="WIN32,NDEBUG,$defines"
243243
RuntimeLibrary="0"
244244
EnableFunctionLevelLinking="true"
245245
UsePrecompiledHeader="0"
@@ -395,7 +395,7 @@ sub createAppProject {
395395
Optimization="0"
396396
InlineFunctionExpansion="1"
397397
AdditionalIncludeDirectories="$includes"
398-
PreprocessorDefinitions="UNICODE,WIN32,_DEBUG,$defines"
398+
PreprocessorDefinitions="WIN32,_DEBUG,$defines"
399399
MinimalRebuild="true"
400400
RuntimeLibrary="1"
401401
UsePrecompiledHeader="0"
@@ -466,7 +466,7 @@ sub createAppProject {
466466
InlineFunctionExpansion="1"
467467
EnableIntrinsicFunctions="true"
468468
AdditionalIncludeDirectories="$includes"
469-
PreprocessorDefinitions="UNICODE,WIN32,NDEBUG,$defines"
469+
PreprocessorDefinitions="WIN32,NDEBUG,$defines"
470470
RuntimeLibrary="0"
471471
EnableFunctionLevelLinking="true"
472472
UsePrecompiledHeader="0"

0 commit comments

Comments
 (0)