- Properly set STDCALL as default convention, previous patch incorrectly set it as...
authorAlex Ionescu <aionescu@gmail.com>
Sat, 7 Jan 2006 01:37:37 +0000 (01:37 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Sat, 7 Jan 2006 01:37:37 +0000 (01:37 +0000)
svn path=/trunk/; revision=20640

reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp

index f6c6e04..0b9c67a 100644 (file)
@@ -341,6 +341,7 @@ MSVCBackend::_generate_vcproj ( const Module& module )
                fprintf ( OUT, "\t\t\t\tDetect64BitPortabilityProblems=\"%s\"\r\n", speed ? "FALSE" : "TRUE");\r
                if ( !module.cplusplus )\r
                        fprintf ( OUT, "\t\t\t\tCompileAs=\"1\"\r\n" );\r
+        fprintf ( OUT, "\t\t\t\tCallingConvention=\"%d\"\r\n", (sys || (exe && module.type == Kernel)) ? 2: 1);\r
                fprintf ( OUT, "\t\t\t\tDebugInformationFormat=\"%s\"/>\r\n", speed ? "0" : "4");\r
 \r
                fprintf ( OUT, "\t\t\t<Tool\r\n" );\r
@@ -389,7 +390,6 @@ MSVCBackend::_generate_vcproj ( const Module& module )
                                fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" );\r
                                fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", 3 );\r
                                fprintf ( OUT, "\t\t\t\tDriver=\"%d\"\r\n", 1 );\r
-                               fprintf ( OUT, "\t\t\t\tCallingConvention=\"%d\"\r\n", 2 );\r
                                fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"%s\"\r\n", module.entrypoint == "" ? "DriverEntry" : module.entrypoint.c_str ());\r
                                fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", baseaddr == "" ? "0x10000" : baseaddr.c_str ());       \r
                        }\r
@@ -401,7 +401,6 @@ MSVCBackend::_generate_vcproj ( const Module& module )
                                        fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" );\r
                                        fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", 3 );\r
                                        fprintf ( OUT, "\t\t\t\tDriver=\"%d\"\r\n", 1 );\r
-                                       fprintf ( OUT, "\t\t\t\tCallingConvention=\"%d\"\r\n", 2 );\r
                                        fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"KiSystemStartup\"\r\n" );\r
                                        fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", baseaddr.c_str ());    \r
                                }\r
@@ -409,7 +408,6 @@ MSVCBackend::_generate_vcproj ( const Module& module )
                                {\r
                                        fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /ALIGN:0x20\"\r\n" );\r
                                        fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", 1 );\r
-                                       fprintf ( OUT, "\t\t\t\tCallingConvention=\"%d\"\r\n", 2 );\r
                                        fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" );\r
                                        fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"NtProcessStartup\"\r\n" );\r
                                        fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", baseaddr.c_str ());    \r