From 7bff604e704d0ee8f4098632f092b69121b0267a Mon Sep 17 00:00:00 2001 From: manojampalam Date: Sun, 13 Mar 2016 10:14:45 -0700 Subject: [PATCH] Added shellhost project to main solution --- contrib/win32/openssh/Win32-OpenSSH.sln | 12 +++++++++++- .../shell-host => win32compat}/shell-host.c | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) rename contrib/win32/{RedirectedIO-exp/RedirectedIO/shell-host => win32compat}/shell-host.c (98%) diff --git a/contrib/win32/openssh/Win32-OpenSSH.sln b/contrib/win32/openssh/Win32-OpenSSH.sln index 66d3dec..cf518a6 100644 --- a/contrib/win32/openssh/Win32-OpenSSH.sln +++ b/contrib/win32/openssh/Win32-OpenSSH.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 +VisualStudioVersion = 14.0.24720.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssh", "ssh.vcxproj", "{74E69D5E-A1EF-46EA-9173-19A412774104}" ProjectSection(ProjectDependencies) = postProject @@ -122,6 +122,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win32compatUnittests", "win EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win32iocompat", "win32iocompat.vcxproj", "{0D02F0F0-013B-4EE3-906D-86517F3822C0}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssh-shellhost", "ssh-shellhost.vcxproj", "{C0AE8A30-E4FA-49CE-A2B5-0C072C77EC64}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -274,6 +276,14 @@ Global {0D02F0F0-013B-4EE3-906D-86517F3822C0}.Release|x64.Build.0 = Release|x64 {0D02F0F0-013B-4EE3-906D-86517F3822C0}.Release|x86.ActiveCfg = Release|Win32 {0D02F0F0-013B-4EE3-906D-86517F3822C0}.Release|x86.Build.0 = Release|Win32 + {C0AE8A30-E4FA-49CE-A2B5-0C072C77EC64}.Debug|x64.ActiveCfg = Debug|x64 + {C0AE8A30-E4FA-49CE-A2B5-0C072C77EC64}.Debug|x64.Build.0 = Debug|x64 + {C0AE8A30-E4FA-49CE-A2B5-0C072C77EC64}.Debug|x86.ActiveCfg = Debug|Win32 + {C0AE8A30-E4FA-49CE-A2B5-0C072C77EC64}.Debug|x86.Build.0 = Debug|Win32 + {C0AE8A30-E4FA-49CE-A2B5-0C072C77EC64}.Release|x64.ActiveCfg = Release|x64 + {C0AE8A30-E4FA-49CE-A2B5-0C072C77EC64}.Release|x64.Build.0 = Release|x64 + {C0AE8A30-E4FA-49CE-A2B5-0C072C77EC64}.Release|x86.ActiveCfg = Release|Win32 + {C0AE8A30-E4FA-49CE-A2B5-0C072C77EC64}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/contrib/win32/RedirectedIO-exp/RedirectedIO/shell-host/shell-host.c b/contrib/win32/win32compat/shell-host.c similarity index 98% rename from contrib/win32/RedirectedIO-exp/RedirectedIO/shell-host/shell-host.c rename to contrib/win32/win32compat/shell-host.c index 1da8be1..c278be6 100644 --- a/contrib/win32/RedirectedIO-exp/RedirectedIO/shell-host/shell-host.c +++ b/contrib/win32/win32compat/shell-host.c @@ -116,7 +116,8 @@ int wmain(int ac, wchar_t **av) { } /*TODO - pick this up from system32*/ - swprintf(cmd, L"%ls", L"cmd.exe"); + cmd[0] = L'\0'; + GOTO_CLEANUP_ON_ERR(wcscat_s(cmd, MAX_PATH, L"cmd.exe")); ac--; av++; if (ac)