mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-24 06:25:35 +02:00
3-6 C12
Changes enabling ssh.exe on the new posix wrapper
This commit is contained in:
parent
2a87a620ce
commit
e4c233e95c
16
channels.c
16
channels.c
@ -101,10 +101,10 @@
|
||||
#include "authfd.h"
|
||||
#include "pathnames.h"
|
||||
|
||||
#ifdef WIN32_FIXME
|
||||
#define isatty(a) WSHELPisatty(a)
|
||||
#define SFD_TYPE_CONSOLE 4
|
||||
#endif
|
||||
//#ifdef WIN32_FIXME
|
||||
//#define isatty(a) WSHELPisatty(a)
|
||||
//#define SFD_TYPE_CONSOLE 4
|
||||
//#endif
|
||||
|
||||
|
||||
/* -- channel core */
|
||||
@ -1700,7 +1700,9 @@ channel_handle_rfd(Channel *c, fd_set *readset, fd_set *writeset)
|
||||
len = read(c->rfd, buf, sizeof(buf));
|
||||
#ifdef WIN32_FIXME
|
||||
if (len == 0) {
|
||||
if ( get_sfd_type(c->rfd) == SFD_TYPE_CONSOLE)
|
||||
|
||||
//if ( get_sfd_type(c->rfd) == SFD_TYPE_CONSOLE)
|
||||
if(isatty(c->rfd))
|
||||
return 1; // in Win32 console read, there may be no data, but is ok
|
||||
}
|
||||
#endif
|
||||
@ -2239,7 +2241,7 @@ channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
|
||||
* Winsock can't support this sort of fdset reallocation
|
||||
*/
|
||||
|
||||
#ifndef WIN32_FIXME
|
||||
#if(1)//ndef WIN32_FIXME
|
||||
|
||||
nfdset = howmany(n+1, NFDBITS);
|
||||
/* Explicitly test here, because xrealloc isn't always called */
|
||||
@ -2257,7 +2259,7 @@ channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
|
||||
|
||||
*maxfdp = n;
|
||||
|
||||
#ifdef WIN32_FIXME
|
||||
#if(0)//def WIN32_FIXME
|
||||
|
||||
if (*readsetp == NULL)
|
||||
{
|
||||
|
@ -118,7 +118,7 @@
|
||||
#ifdef WIN32_FIXME
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define isatty(a) WSHELPisatty(a)
|
||||
//#define isatty(a) WSHELPisatty(a)
|
||||
|
||||
// Windows Console screen size change related
|
||||
extern int ScreenX;
|
||||
|
@ -8,6 +8,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssh", "ssh.vcxproj", "{74E6
|
||||
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
|
||||
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
|
||||
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
|
||||
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
|
||||
{8660C2FE-9874-432D-B047-E042BB41DBE0} = {8660C2FE-9874-432D-B047-E042BB41DBE0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
|
@ -73,18 +73,22 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<OutDir>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<OutDir>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
|
@ -180,18 +180,22 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<OutDir>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<OutDir>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
|
@ -76,24 +76,28 @@
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<TargetName>ssh</TargetName>
|
||||
<OutDir>$(OpenSSH-Bin-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<TargetName>ssh</TargetName>
|
||||
<OutDir>$(OpenSSH-Bin-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(OpenSSH-Bin-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<TargetName>ssh</TargetName>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(OpenSSH-Bin-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<TargetName>ssh</TargetName>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
@ -112,7 +116,7 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;win32compat.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>win32iocompat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;win32compat.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>targetos.manifest</AdditionalManifestFiles>
|
||||
@ -134,7 +138,7 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Debug-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;win32compat.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>win32iocompat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;win32compat.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>targetos.manifest</AdditionalManifestFiles>
|
||||
@ -158,7 +162,7 @@
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-Win32-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;win32compat.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>win32iocompat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;win32compat.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>targetos.manifest</AdditionalManifestFiles>
|
||||
@ -183,7 +187,7 @@
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalLibraryDirectories>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);$(OpenSSL-x64-Release-Path)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;win32compat.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>win32iocompat.lib;bcrypt.lib;Userenv.lib;Ws2_32.lib;Secur32.lib;Shlwapi.lib;openbsd_compat.lib;libssh.lib;win32compat.lib;libeay32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>targetos.manifest</AdditionalManifestFiles>
|
||||
|
@ -70,23 +70,27 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(OpenSSH-Lib-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>USE_MSCNG;_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
@ -101,7 +105,7 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>USE_MSCNG;_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
@ -113,7 +117,7 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_MSCNG;_WIN32_WINNT=0x501;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
@ -124,7 +128,7 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Release-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_MSCNG;_WIN32_WINNT=0x501;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
@ -150,8 +154,6 @@
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)\contrib\win32\win32compat\lsalogon.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)\contrib\win32\win32compat\lsastring.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)\contrib\win32\win32compat\pwd.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)\contrib\win32\win32compat\sfds.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)\contrib\win32\win32compat\socket.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)\contrib\win32\win32compat\startupneeds.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)\contrib\win32\win32compat\strcasecmp.c" />
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)\contrib\win32\win32compat\stringhelp.c" />
|
||||
|
@ -54,12 +54,6 @@
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)\contrib\win32\win32compat\pwd.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)\contrib\win32\win32compat\sfds.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)\contrib\win32\win32compat\socket.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)\contrib\win32\win32compat\startupneeds.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -81,10 +75,10 @@
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)\contrib\win32\win32compat\win32auth.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)\contrib\win32\win32compat\cng_kex.c">
|
||||
<ClCompile Include="..\win32compat\cng_dh.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\win32compat\cng_openssl_dh.c">
|
||||
<ClCompile Include="$(OpenSSH-Src-Path)\contrib\win32\win32compat\cng_openssl_dh.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
@ -134,8 +128,5 @@
|
||||
<ClInclude Include="$(OpenSSH-Src-Path)\contrib\win32\win32compat\cng_kex.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\win32compat\cng-wrap.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -74,27 +74,30 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<TargetName>ssh</TargetName>
|
||||
<TargetName>win32compatUnittests</TargetName>
|
||||
<OutDir>$(OpenSSH-Bin-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<TargetName>win32compatUnittests</TargetName>
|
||||
<OutDir>$(OpenSSH-Bin-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(OpenSSH-Bin-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<TargetName>ssh</TargetName>
|
||||
<TargetName>win32compatUnittests</TargetName>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(OpenSSH-Bin-Path)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\$(TargetName)\</IntDir>
|
||||
<TargetName>ssh</TargetName>
|
||||
<TargetName>win32compatUnittests</TargetName>
|
||||
<IncludePath>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
@ -103,7 +106,8 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>
|
||||
</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
@ -126,7 +130,8 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>
|
||||
</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
@ -150,7 +155,8 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x501;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>
|
||||
</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@ -174,7 +180,8 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x501;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<AdditionalIncludeDirectories>$(OpenSSH-Src-Path)contrib\win32\win32compat\inc</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>
|
||||
</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
|
@ -1,6 +0,0 @@
|
||||
#ifndef COMPAT_SELECT_H
|
||||
#define COMPAT_SELECT_H 1
|
||||
|
||||
/* Compatibility header to avoid lots of #ifdef _WIN32's in includes.h */
|
||||
|
||||
#endif
|
@ -1,203 +0,0 @@
|
||||
#ifndef _LIBWINSOCKHELP_SOCKET_H_
|
||||
#define _LIBWINSOCKHELP_SOCKET_H_ 1
|
||||
|
||||
/* Include the original header */
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#define _WIN32_WINNT 0x501
|
||||
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <winsock2.h>
|
||||
#include <Ws2tcpip.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
/* Set to 1 (macros as function decl's) or 0 (simple macros) depending upon needs */
|
||||
#define NEED_FUNC_MACROS 0
|
||||
|
||||
|
||||
/* Declare our indirection functions */
|
||||
FILE* WSHELPfdopen(int sfd, const char *mode);
|
||||
int WSHELPfstat(int sfd, struct stat *buf);
|
||||
int WSHELPisatty (int sfd);
|
||||
int WSHELPpipe(int *pfds);
|
||||
int WSHELPdup (int oldfd);
|
||||
int WSHELPdup2(int oldfd, int newfd);
|
||||
int WSHELPopen (const char *pathname, int flags, ...);
|
||||
int WSHELPwopen(const wchar_t *pathname, int flags, ...);
|
||||
int WSHELPcreat (const char *pathname, int mode);
|
||||
int WSHELPsocket (int af, int type, int protocol);
|
||||
int WSHELPsetsockopt (int sfd, int level, int optname, const char* optval, int optlen);
|
||||
int WSHELPgetsockopt(int sfd, int level, int optname, char* optval, int* optlen);
|
||||
int WSHELPgetsockname(int sfd, struct sockaddr* name, int* namelen);
|
||||
int WSHELPgetpeername(int sfd, struct sockaddr* name, int* namelen);
|
||||
int WSHELPioctlsocket(int sfd, long cmd, u_long* argp);
|
||||
int WSHELPlisten (int sfd, int backlog);
|
||||
int WSHELPbind (int sfd, const struct sockaddr *name, int namelen);
|
||||
int WSHELPconnect (int sfd, const struct sockaddr* name, int namelen);
|
||||
int WSHELPshutdown(int sfd, int how);
|
||||
int WSHELPaccept(int sfd, struct sockaddr* addr, int* addrlen);
|
||||
int WSHELPselect (int sfds, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, const struct timeval *timeout);
|
||||
|
||||
|
||||
/* Other helpers */
|
||||
void WSHELPinitialize();
|
||||
int map_standard_descriptor(int *fd);
|
||||
void allocate_standard_descriptor(int fd);
|
||||
|
||||
|
||||
/* Redirect callers of socket functions to use our indirection functions */
|
||||
#if NEED_FUNC_MACROS
|
||||
#define isatty(sfd) WSHELPisatty(sfd)
|
||||
#define fstat(sfd, buf) WSHELPfstat(sfd, buf)
|
||||
#define fdopen(sfd, mode) WSHELPfdopen(sfd, mode)
|
||||
#define pipe(pfds) WSHELPpipe(pfds)
|
||||
#define dup(oldfd) WSHELPdup(oldfd)
|
||||
#define socket(af, type, protocol) WSHELPsocket(af, type, protocol)
|
||||
#define setsockopt(sfd, level, optname, optval, optlen) WSHELPsetsockopt(sfd, level, optname, optval, optlen)
|
||||
#define getsockopt(sfd, level, optname, optval, optlen) WSHELPgetsockopt(sfd, level, optname, optval, optlen)
|
||||
#define getsockname(sfd, name, namelen) WSHELPgetsockname(sfd, name, namelen)
|
||||
#define getpeername(sfd, name, namelen) WSHELPgetpeername(sfd, name, namelen)
|
||||
#define ioctlsocket(sfd, cmd, argp) WSHELPioctlsocket(sfd, cmd, argp)
|
||||
#define listen(sfd, backlog) WSHELPlisten(sfd, backlog)
|
||||
#define bind(sfd, name, namelen) WSHELPbind(sfd, name, namelen)
|
||||
#define connect(sfd, name, namelen) WSHELPconnect(sfd, name, namelen)
|
||||
#define shutdown(sfd, how) WSHELPshutdown(sfd, how)
|
||||
#define accept(sfd, addr, addrlen) WSHELPaccept(sfd, addr, addrlen)
|
||||
#define select(sfds, readsfds, writesfds, exceptsfds, timeout) WSHELPselect(sfds, readsfds, writesfds, exceptsfds, timeout)
|
||||
#else /* NEED_FUNC_MACROS */
|
||||
//#define isatty WSHELPisatty
|
||||
#define fstat WSHELPfstat
|
||||
#define fdopen WSHELPfdopen
|
||||
#define pipe WSHELPpipe
|
||||
#define socket WSHELPsocket
|
||||
#define dup WSHELPdup
|
||||
#define dup2 WSHELPdup2
|
||||
#define open WSHELPopen
|
||||
#define creat WSHELPcreat
|
||||
#define setsockopt WSHELPsetsockopt
|
||||
#define getsockopt WSHELPgetsockopt
|
||||
#define getsockname WSHELPgetsockname
|
||||
#define getpeername WSHELPgetpeername
|
||||
#define ioctlsocket WSHELPioctlsocket
|
||||
#define listen WSHELPlisten
|
||||
#define bind WSHELPbind
|
||||
#define connect WSHELPconnect
|
||||
#define shutdown WSHELPshutdown
|
||||
#define accept WSHELPaccept
|
||||
#define select WSHELPselect
|
||||
#endif /* NEED_FUNC_MACROS */
|
||||
|
||||
/* Declare new functions */
|
||||
int socketpair(int socks[2]);
|
||||
|
||||
/* Debug helpers */
|
||||
void debug_sfd(int sfd);
|
||||
|
||||
/* Include the original header */
|
||||
#include <io.h>
|
||||
|
||||
/* Declare our indirection functions */
|
||||
int WSHELPread(int sfd, void *dst, unsigned int max);
|
||||
int WSHELPwrite(int sfd, const void *buf, unsigned int max);
|
||||
int WSHELPclose(int sfd);
|
||||
|
||||
/* Redirect callers of io functions to use our indirection functions */
|
||||
#if NEED_FUNC_MACROS
|
||||
#define read(fd, dst, max) WSHELPread(fd, dst, max)
|
||||
#define write(fd, buf, max) WSHELPwrite(fd, buf, max)
|
||||
#define close(fd) WSHELPclose(fd)
|
||||
#else /* NEED_FUNC_MACROS */
|
||||
#define read WSHELPread
|
||||
#define write WSHELPwrite
|
||||
#define close WSHELPclose
|
||||
#endif /* NEED_FUNC_MACROS */
|
||||
|
||||
#ifndef sleep
|
||||
#define sleep(a) Sleep(1000 * a)
|
||||
#endif
|
||||
|
||||
/* Shutdown constants */
|
||||
#define SHUT_WR SD_SEND
|
||||
#define SHUT_RD SD_RECEIVE
|
||||
#define SHUT_RDWR SD_BOTH
|
||||
|
||||
/* Other constants */
|
||||
#define IN_LOOPBACKNET 127 /* 127.* is the loopback network */
|
||||
#define MAXHOSTNAMELEN 64
|
||||
|
||||
|
||||
/* Errno helpers */
|
||||
#ifndef ENETDOWN
|
||||
#define ENETDOWN WSAENETDOWN
|
||||
#endif
|
||||
#ifndef EAFNOSUPPORT
|
||||
#define EAFNOSUPPORT WSAEAFNOSUPPORT
|
||||
#endif
|
||||
#ifndef EINPROGRESS
|
||||
#define EINPROGRESS WSAEINPROGRESS
|
||||
#endif
|
||||
#ifndef EXX
|
||||
#define EXX WSAEMFILE
|
||||
#endif
|
||||
#ifndef EXX1
|
||||
#define EXX1 WSAENOBUFS
|
||||
#endif
|
||||
#ifndef EPROTONOSUPPORT
|
||||
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
|
||||
#endif
|
||||
#ifndef EPROTOTYPE
|
||||
#define EPROTOTYPE WSAEPROTOTYPE
|
||||
#endif
|
||||
#ifndef ESOCKTNOSUPPORT
|
||||
#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
|
||||
#endif
|
||||
#ifndef EADDRINUSE
|
||||
#define EADDRINUSE WSAEADDRINUSE
|
||||
#endif
|
||||
#ifndef EISCONN
|
||||
#define EISCONN WSAEISCONN
|
||||
#endif
|
||||
#ifndef ENOTSOCK
|
||||
#define ENOTSOCK WSAENOTSOCK
|
||||
#endif
|
||||
#ifndef EOPNOTSUPP
|
||||
#define EOPNOTSUPP WSAENOTSUPP
|
||||
#endif
|
||||
#ifndef EALREADY
|
||||
#define EALREADY WSAEALREADY
|
||||
#endif
|
||||
#ifndef ECONNREFUSED
|
||||
#define ECONNREFUSED WSAECONNREFUSED
|
||||
#endif
|
||||
#ifndef ENOTUNREACH
|
||||
#define ENOTUNREACH WSAENOTUNREACH
|
||||
#endif
|
||||
#ifndef EHOSTUNREACH
|
||||
#define EHOSTUNREACH WSAEHOSTUNREACH
|
||||
#endif
|
||||
#ifndef ETIMEDOUT
|
||||
#define ETIMEDOUT WSAETIMEDOUT
|
||||
#endif
|
||||
#ifndef EWOULDBLOCK
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#endif
|
||||
#ifndef EACCES
|
||||
#define EACCES WSAEACCESS
|
||||
#endif
|
||||
#ifndef ECONNRESET
|
||||
#define ECONNRESET WSAECONNRESET
|
||||
#endif
|
||||
#ifndef ENOPROTOOPT
|
||||
#define ENOPROTOOPT WSAENOPROTOOPT
|
||||
#endif
|
||||
#ifndef EPFNOSUPPORT
|
||||
#define EPFNOSUPPORT WSAEPFNOSUPPORT
|
||||
#endif
|
||||
#ifndef ENOTCONN
|
||||
#define ENOTCONN WSAENOTCONN
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
@ -1,23 +0,0 @@
|
||||
#ifndef COMPAT_UNISTD_H
|
||||
#define COMPAT_UNISTD_H 1
|
||||
|
||||
|
||||
/* Compatibility header to avoid lots of #ifdefs in includes.h on Win32 */
|
||||
|
||||
#include <sys/uio.h>
|
||||
#include <conio.h>
|
||||
#include <direct.h>
|
||||
|
||||
/* We can't put these in string.h since we can't easily override that header, so here they are */
|
||||
#if !defined(HAVE_STRCASECMP) && !defined(__MINGW32__)
|
||||
size_t strcasecmp(const char *left, const char *right);
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_STRNCASECMP) && !defined(__MINGW32__)
|
||||
size_t strncasecmp(const char *left, const char *right, size_t n);
|
||||
#endif
|
||||
|
||||
int gettimeofday (struct timeval *tv, void *tz);
|
||||
/* End of prototypes in the wrong file */
|
||||
|
||||
#endif
|
@ -88,8 +88,8 @@ void ConInputInitParams(void)
|
||||
SetConsoleMode(hInput, (dwMode & ~(ENABLE_LINE_INPUT |
|
||||
ENABLE_ECHO_INPUT | ENABLE_PROCESSED_INPUT | ENABLE_MOUSE_INPUT)) | ENABLE_WINDOW_INPUT );
|
||||
|
||||
extern int glob_itissshclient;
|
||||
glob_itissshclient = 1; // tell our contrib/win32/win32compat/socket.c code it is for ssh client side
|
||||
//extern int glob_itissshclient;
|
||||
//glob_itissshclient = 1; // tell our contrib/win32/win32compat/socket.c code it is for ssh client side
|
||||
|
||||
}
|
||||
|
||||
|
12
includes.h
12
includes.h
@ -24,7 +24,7 @@
|
||||
|
||||
#ifdef WIN32
|
||||
#undef __USE_W32_SOCKETS
|
||||
#include <winsock2.h>
|
||||
//#include <winsock2.h>
|
||||
#include <sys/compat-types.h>
|
||||
#endif
|
||||
|
||||
@ -189,10 +189,10 @@
|
||||
|
||||
#include "entropy.h"
|
||||
|
||||
#ifdef WIN32_FIXME
|
||||
#define signal(X, Y)
|
||||
#define alarm(X)
|
||||
#define mysignal(X, Y)
|
||||
#endif
|
||||
//#ifdef WIN32_FIXME
|
||||
// #define signal(X, Y)
|
||||
// #define alarm(X)
|
||||
// #define mysignal(X, Y)
|
||||
//#endif
|
||||
|
||||
#endif /* INCLUDES_H */
|
||||
|
4
nchan.c
4
nchan.c
@ -77,7 +77,7 @@
|
||||
|
||||
#ifdef WIN32_FIXME
|
||||
|
||||
void StopSocketThreads();
|
||||
//void StopSocketThreads();
|
||||
|
||||
#endif
|
||||
|
||||
@ -136,7 +136,7 @@ chan_rcvd_oclose1(Channel *c)
|
||||
|
||||
#ifdef WIN32_FIXME
|
||||
|
||||
StopSocketThreads();
|
||||
//StopSocketThreads();
|
||||
|
||||
#endif
|
||||
|
||||
|
8
packet.c
8
packet.c
@ -1314,7 +1314,7 @@ ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
|
||||
struct timeval timeout, start, *timeoutp = NULL;
|
||||
|
||||
DBG(debug("packet_read()"));
|
||||
#ifndef WIN32_FIXME
|
||||
#if(1)//ndef WIN32_FIXME
|
||||
setp = calloc(howmany(state->connection_in + 1,
|
||||
NFDBITS), sizeof(fd_mask));
|
||||
#else
|
||||
@ -1352,7 +1352,7 @@ ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
|
||||
* Otherwise, wait for some data to arrive, add it to the
|
||||
* buffer, and try again.
|
||||
*/
|
||||
#ifndef WIN32_FIXME
|
||||
#if(1)//ndef WIN32_FIXME
|
||||
memset(setp, 0, howmany(state->connection_in + 1,
|
||||
NFDBITS) * sizeof(fd_mask));
|
||||
#else
|
||||
@ -2092,7 +2092,7 @@ ssh_packet_write_wait(struct ssh *ssh)
|
||||
int ret, r, ms_remain = 0;
|
||||
struct timeval start, timeout, *timeoutp = NULL;
|
||||
struct session_state *state = ssh->state;
|
||||
#ifndef WIN32_FIXME
|
||||
#if(1)//ndef WIN32_FIXME
|
||||
setp = calloc(howmany(state->connection_out + 1,
|
||||
NFDBITS), sizeof(fd_mask));
|
||||
#else
|
||||
@ -2104,7 +2104,7 @@ ssh_packet_write_wait(struct ssh *ssh)
|
||||
return SSH_ERR_ALLOC_FAIL;
|
||||
ssh_packet_write_poll(ssh);
|
||||
while (ssh_packet_have_data_to_write(ssh)) {
|
||||
#ifndef WIN32_FIXME
|
||||
#if(1)//ndef WIN32_FIXME
|
||||
memset(setp, 0, howmany(state->connection_out + 1,
|
||||
NFDBITS) * sizeof(fd_mask));
|
||||
#else
|
||||
|
@ -52,9 +52,9 @@
|
||||
#include <conio.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
extern int PassInputFd;
|
||||
//extern int PassInputFd;
|
||||
extern int PassOutputFd;
|
||||
extern int PassErrorFd;
|
||||
//extern int PassErrorFd;
|
||||
|
||||
#endif
|
||||
|
||||
@ -335,7 +335,7 @@ read_passphrase(const char *prompt, int flags)
|
||||
* Show prompt for user.
|
||||
*/
|
||||
|
||||
_write(PassErrorFd, prompt, strlen(prompt));
|
||||
write(STDERR_FILENO, prompt, strlen(prompt));
|
||||
|
||||
len = retr = 0;
|
||||
int bufsize = sizeof(buf);
|
||||
@ -368,7 +368,7 @@ read_passphrase(const char *prompt, int flags)
|
||||
}
|
||||
|
||||
buf[len] = '\0' ; // get rid of the cr/lf
|
||||
_write(PassErrorFd,"\n", strlen("\n")); // show a newline as we do not echo password or the line
|
||||
write(STDERR_FILENO,"\n", strlen("\n")); // show a newline as we do not echo password or the line
|
||||
|
||||
ret = xstrdup(buf);
|
||||
|
||||
|
@ -91,7 +91,7 @@
|
||||
#include "ssherr.h"
|
||||
|
||||
#ifdef WIN32_FIXME
|
||||
#define isatty(a) WSHELPisatty(a)
|
||||
//#define isatty(a) WSHELPisatty(a)
|
||||
#endif
|
||||
|
||||
extern ServerOptions options;
|
||||
|
@ -85,7 +85,7 @@
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define isatty(a) WSHELPisatty(a)
|
||||
// #define isatty(a) WSHELPisatty(a)
|
||||
|
||||
#define mkdir(a, b) _mkdir(a)
|
||||
|
||||
|
28
ssh.c
28
ssh.c
@ -117,14 +117,14 @@
|
||||
#ifdef WIN32_FIXME
|
||||
|
||||
#include <sys/stat.h>
|
||||
#define isatty(a) WSHELPisatty(a)
|
||||
//#define isatty(a) WSHELPisatty(a)
|
||||
#define mkdir(a, b) _mkdir(a)
|
||||
|
||||
extern HANDLE proxy_command_handle;
|
||||
extern DWORD proxy_command_pid;
|
||||
|
||||
extern int PassInputFd;
|
||||
extern int PassOutputFd;
|
||||
//extern int PassInputFd;
|
||||
//extern int PassOutputFd;
|
||||
|
||||
char dotsshdir[MAX_PATH];
|
||||
|
||||
@ -640,11 +640,11 @@ main(int ac, char **av)
|
||||
* Initialize wrapped stdio.
|
||||
*/
|
||||
|
||||
WSHELPinitialize();
|
||||
w32posix_initialize();
|
||||
|
||||
allocate_standard_descriptor(STDIN_FILENO);
|
||||
/* allocate_standard_descriptor(STDIN_FILENO);
|
||||
allocate_standard_descriptor(STDOUT_FILENO);
|
||||
allocate_standard_descriptor(STDERR_FILENO);
|
||||
allocate_standard_descriptor(STDERR_FILENO);*/
|
||||
|
||||
#endif
|
||||
|
||||
@ -1082,15 +1082,15 @@ main(int ac, char **av)
|
||||
if (options.passInputHandle_)
|
||||
{
|
||||
debug3("Redirecting pass input to %d...\n", options.passInputHandle_);
|
||||
|
||||
PassInputFd = _open_osfhandle(options.passInputHandle_, O_RDONLY);
|
||||
abort();
|
||||
//PassInputFd = _open_osfhandle(options.passInputHandle_, O_RDONLY);
|
||||
}
|
||||
|
||||
if (options.passOutputHandle_)
|
||||
{
|
||||
debug3("Redirecting pass prompt output to %d...\n", options.passOutputHandle_);
|
||||
|
||||
PassOutputFd = _open_osfhandle(options.passOutputHandle_, O_WRONLY);
|
||||
abort();
|
||||
//PassOutputFd = _open_osfhandle(options.passOutputHandle_, O_WRONLY);
|
||||
}
|
||||
|
||||
// create various Windows user home directory based file names
|
||||
@ -1544,8 +1544,8 @@ main(int ac, char **av)
|
||||
ConInit( STD_OUTPUT_HANDLE, TRUE ); //init the output console surface for us to write
|
||||
}
|
||||
else {
|
||||
extern int glob_itissshclient;
|
||||
glob_itissshclient = 1; // tell our contrib/win32/win32compat/socket.c code it is for ssh client side
|
||||
//extern int glob_itissshclient;
|
||||
//glob_itissshclient = 1; // tell our contrib/win32/win32compat/socket.c code it is for ssh client side
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2066,8 +2066,8 @@ ssh_session2_open(void)
|
||||
#ifdef WIN32_FIXME
|
||||
else {
|
||||
// make stdio duplicated ports of above binary mode so no CRLF xlate
|
||||
_setmode(sfd_to_fd(in), O_BINARY);
|
||||
_setmode(sfd_to_fd(out), O_BINARY);
|
||||
//_setmode(sfd_to_fd(in), O_BINARY);
|
||||
//_setmode(sfd_to_fd(out), O_BINARY);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -239,8 +239,8 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command)
|
||||
|
||||
debug("Creating socket pairs for proxy process...");
|
||||
|
||||
socketpair(sockin);
|
||||
socketpair(sockout);
|
||||
pipe(sockin);
|
||||
pipe(sockout);
|
||||
|
||||
debug("sockin[0]: %d sockin[1]: %d", sockin[0], sockin[1]);
|
||||
debug("sockout[0]: %d sockout[1]: %d", sockout[0], sockout[1]);
|
||||
@ -492,7 +492,7 @@ timeout_connect(int sockfd, const struct sockaddr *serv_addr,
|
||||
goto done;
|
||||
}
|
||||
|
||||
#ifndef WIN32_FIXME
|
||||
#if(1)//ndef WIN32_FIXME
|
||||
fdset = xcalloc(howmany(sockfd + 1, NFDBITS),
|
||||
sizeof(fd_mask));
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user