Skip to content

Commit 37477b6

Browse files
authored
Merge pull request #388 from rayhayes/L1-Prod
Merge in latest changes for scp.
2 parents 2c781ff + 5de33f1 commit 37477b6

File tree

8 files changed

+393
-194
lines changed

8 files changed

+393
-194
lines changed

contrib/win32/openssh/libssh.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@
266266
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
267267
</ClCompile>
268268
<ClCompile Include="..\..\..\openssl-epoint.c" />
269+
<ClCompile Include="..\..\..\utf8.c" />
269270
</ItemGroup>
270271
<ItemGroup>
271272
<ClInclude Include="$(OpenSSH-Src-Path)crypto-wrap.h" />

contrib/win32/openssh/libssh.vcxproj.filters

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@
294294
<ClCompile Include="..\..\..\openssl-epoint.c">
295295
<Filter>Source Files</Filter>
296296
</ClCompile>
297+
<ClCompile Include="..\..\..\utf8.c">
298+
<Filter>Source Files</Filter>
299+
</ClCompile>
297300
</ItemGroup>
298301
<ItemGroup>
299302
<ClInclude Include="$(OpenSSH-Src-Path)crypto-wrap.h">

contrib/win32/win32compat/w32fd.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -854,11 +854,9 @@ int
854854
w32_ftruncate(int fd, off_t length) {
855855
CHECK_FD(fd);
856856

857-
if (!SetEndOfFile(w32_fd_to_handle(fd)))
858-
return -1;
859-
if (!SetFileValidData(w32_fd_to_handle(fd), length))
857+
if (!SetFilePointer(w32_fd_to_handle(fd), length, 0, FILE_BEGIN))
860858
return -1;
861-
if (!SetFilePointer(w32_fd_to_handle(fd), 0, 0, FILE_BEGIN))
859+
if (!SetEndOfFile(w32_fd_to_handle(fd)))
862860
return -1;
863861

864862
return 0;

openbsd-compat/openbsd-compat.h

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,45 @@ long long strtonum(const char *, long long, long long, const char **);
232232
# define mblen(x, y) (1)
233233
#endif
234234

235+
#ifndef HAVE_WCWIDTH
236+
# define wcwidth(x) (((x) >= 0x20 && (x) <= 0x7e) ? 1 : -1)
237+
/* force our no-op nl_langinfo and mbtowc */
238+
# undef HAVE_NL_LANGINFO
239+
# undef HAVE_MBTOWC
240+
# undef HAVE_LANGINFO_H
241+
#endif
242+
243+
#ifndef HAVE_NL_LANGINFO
244+
# define nl_langinfo(x) ""
245+
#endif
246+
247+
#ifndef HAVE_MBTOWC
248+
int mbtowc(wchar_t *, const char*, size_t);
249+
#endif
250+
251+
235252
#if !defined(HAVE_VASPRINTF) || !defined(HAVE_VSNPRINTF)
236253
# include <stdarg.h>
237254
#endif
238255

256+
/*
257+
* Some platforms unconditionally undefine va_copy() so we define VA_COPY()
258+
* instead. This is known to be the case on at least some configurations of
259+
* AIX with the xlc compiler.
260+
*/
261+
#ifndef VA_COPY
262+
# ifdef HAVE_VA_COPY
263+
# define VA_COPY(dest, src) va_copy(dest, src)
264+
# else
265+
# ifdef HAVE___VA_COPY
266+
# define VA_COPY(dest, src) __va_copy(dest, src)
267+
# else
268+
# define VA_COPY(dest, src) (dest) = (src)
269+
# endif
270+
# endif
271+
#endif
272+
273+
239274
#ifndef HAVE_VASPRINTF
240275
int vasprintf(char **, const char *, va_list);
241276
#endif

openbsd-compat/vis.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
*/
4949
#define VIS_OCTAL 0x01 /* use octal \ddd format */
5050
#define VIS_CSTYLE 0x02 /* use \[nrft0..] where appropriate */
51-
51+
#define VIS_ALL 0x400 /* encode all characters */
5252
/*
5353
* to alter set of characters encoded (default is to encode all
5454
* non-graphic except space, tab, and newline).

0 commit comments

Comments
 (0)