threads / patch / 21079

patchgenerators/vcproj.pm: remove UNICODE from build

Subject: [PATCH] generators/vcproj.pm: remove UNICODE from build

## tl;dr

2 messages between Sep 28, 2009 and Sep 28, 2009. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Michael Wookey· Sep 28, 2009, 10:46 UTC · lore

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 <michaelwookey@gmail.com>
---
 contrib/buildsystems/Generators/Vcproj.pm |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
Show changes to contrib/buildsystems/Generators/Vcproj.pm +4 −4
diff --git a/contrib/buildsystems/Generators/Vcproj.pm
b/contrib/buildsystems/Generators/Vcproj.pm
index 00ec0c1..a215911 100644
--- a/contrib/buildsystems/Generators/Vcproj.pm
+++ b/contrib/buildsystems/Generators/Vcproj.pm
@@ -173,7 +173,7 @@ sub createLibProject {
 				Optimization="0"
 				InlineFunctionExpansion="1"
 				AdditionalIncludeDirectories="$includes"
-				PreprocessorDefinitions="UNICODE,WIN32,_DEBUG,$defines"
+				PreprocessorDefinitions="WIN32,_DEBUG,$defines"
 				MinimalRebuild="true"
 				RuntimeLibrary="1"
 				UsePrecompiledHeader="0"
@@ -239,7 +239,7 @@ sub createLibProject {
 				InlineFunctionExpansion="1"
 				EnableIntrinsicFunctions="true"
 				AdditionalIncludeDirectories="$includes"
-				PreprocessorDefinitions="UNICODE,WIN32,NDEBUG,$defines"
+				PreprocessorDefinitions="WIN32,NDEBUG,$defines"
 				RuntimeLibrary="0"
 				EnableFunctionLevelLinking="true"
 				UsePrecompiledHeader="0"
@@ -395,7 +395,7 @@ sub createAppProject {
 				Optimization="0"
 				InlineFunctionExpansion="1"
 				AdditionalIncludeDirectories="$includes"
-				PreprocessorDefinitions="UNICODE,WIN32,_DEBUG,$defines"
+				PreprocessorDefinitions="WIN32,_DEBUG,$defines"
 				MinimalRebuild="true"
 				RuntimeLibrary="1"
 				UsePrecompiledHeader="0"
@@ -466,7 +466,7 @@ sub createAppProject {
 				InlineFunctionExpansion="1"
 				EnableIntrinsicFunctions="true"
 				AdditionalIncludeDirectories="$includes"
-				PreprocessorDefinitions="UNICODE,WIN32,NDEBUG,$defines"
+				PreprocessorDefinitions="WIN32,NDEBUG,$defines"
 				RuntimeLibrary="0"
 				EnableFunctionLevelLinking="true"
 				UsePrecompiledHeader="0"
-- 
1.6.5.rc2
Marius Storm-Olsen· Sep 28, 2009, 12:39 UTC · re: Michael Wookey · lore

Re: [PATCH] generators/vcproj.pm: remove UNICODE from build

Michael Wookey said the following on 28.09.2009 12:46:
Show 9 quoted lines
> 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 <michaelwookey@gmail.com>
> ---

After manually editing the patch until it applied (some headers which gt-am didn't like):

     Acked-by: Marius Storm-Olsen <mstormo@gmail.com>

-- .marius

← back to recent threads