From 54876ff367370ca3f97addaa69c26af0cea58d2b Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Sun, 3 Dec 2006 21:09:04 +0000 Subject: [PATCH] - default to __cdecl convention for gui / console apps svn path=/trunk/; revision=25050 --- reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp b/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp index b91c9e41db0..fb6fe7d199e 100644 --- a/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp +++ b/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp @@ -357,7 +357,16 @@ MSVCBackend::_generate_vcproj ( const Module& module ) fprintf ( OUT, "\t\t\t\tDetect64BitPortabilityProblems=\"%s\"\r\n", "FALSE"); if ( !module.cplusplus ) fprintf ( OUT, "\t\t\t\tCompileAs=\"1\"\r\n" ); - fprintf ( OUT, "\t\t\t\tCallingConvention=\"%d\"\r\n", 2 ); // 2=__stdcall 0=__cdecl + + if ( module.type == Win32CUI || module.type == Win32GUI ) + { + fprintf ( OUT, "\t\t\t\tCallingConvention=\"%d\"\r\n", 0 ); // 0=__cdecl + } + else + { + fprintf ( OUT, "\t\t\t\tCallingConvention=\"%d\"\r\n", 2 ); // 2=__stdcall + } + fprintf ( OUT, "\t\t\t\tDebugInformationFormat=\"%s\"/>\r\n", speed ? "0" : release ? "3": "4"); // 3=/Zi 4=ZI fprintf ( OUT, "\t\t\t