summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--openbsd-compat/bsd-cygwin_util.c3
-rw-r--r--openbsd-compat/bsd-cygwin_util.h4
-rw-r--r--scp.c3
-rw-r--r--sftp-server.c5
5 files changed, 15 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index b612b0247..918c843bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
120010414 120010414
2 - Sync with OpenBSD glob.c, strlcat.c and vis.c changes 2 - Sync with OpenBSD glob.c, strlcat.c and vis.c changes
3 - Cygwin sftp/sftp-server binary mode patch from Corinna Vinschen
4 <vinschen@redhat.com>
3 5
420010413 620010413
5 - OpenBSD CVS Sync 7 - OpenBSD CVS Sync
@@ -5052,4 +5054,4 @@
5052 - Wrote replacements for strlcpy and mkdtemp 5054 - Wrote replacements for strlcpy and mkdtemp
5053 - Released 1.0pre1 5055 - Released 1.0pre1
5054 5056
5055$Id: ChangeLog,v 1.1108 2001/04/13 14:22:33 djm Exp $ 5057$Id: ChangeLog,v 1.1109 2001/04/13 14:28:42 djm Exp $
diff --git a/openbsd-compat/bsd-cygwin_util.c b/openbsd-compat/bsd-cygwin_util.c
index ea981be50..36f13e3f0 100644
--- a/openbsd-compat/bsd-cygwin_util.c
+++ b/openbsd-compat/bsd-cygwin_util.c
@@ -15,12 +15,11 @@
15 15
16#include "includes.h" 16#include "includes.h"
17 17
18RCSID("$Id: bsd-cygwin_util.c,v 1.3 2001/02/18 01:30:56 djm Exp $"); 18RCSID("$Id: bsd-cygwin_util.c,v 1.4 2001/04/13 14:28:42 djm Exp $");
19 19
20#ifdef HAVE_CYGWIN 20#ifdef HAVE_CYGWIN
21 21
22#include <fcntl.h> 22#include <fcntl.h>
23#include <io.h>
24#include <stdlib.h> 23#include <stdlib.h>
25#include <sys/vfs.h> 24#include <sys/vfs.h>
26#include <windows.h> 25#include <windows.h>
diff --git a/openbsd-compat/bsd-cygwin_util.h b/openbsd-compat/bsd-cygwin_util.h
index e2d4b4dae..7879501e0 100644
--- a/openbsd-compat/bsd-cygwin_util.h
+++ b/openbsd-compat/bsd-cygwin_util.h
@@ -13,13 +13,15 @@
13 * binary mode on Windows systems. 13 * binary mode on Windows systems.
14 */ 14 */
15 15
16/* $Id: bsd-cygwin_util.h,v 1.3 2001/02/18 01:30:56 djm Exp $ */ 16/* $Id: bsd-cygwin_util.h,v 1.4 2001/04/13 14:28:43 djm Exp $ */
17 17
18#ifndef _BSD_CYGWIN_UTIL_H 18#ifndef _BSD_CYGWIN_UTIL_H
19#define _BSD_CYGWIN_UTIL_H 19#define _BSD_CYGWIN_UTIL_H
20 20
21#ifdef HAVE_CYGWIN 21#ifdef HAVE_CYGWIN
22 22
23#include <io.h>
24
23int binary_open(const char *filename, int flags, ...); 25int binary_open(const char *filename, int flags, ...);
24int binary_pipe(int fd[2]); 26int binary_pipe(int fd[2]);
25int check_nt_auth(int pwd_authenticated, uid_t uid); 27int check_nt_auth(int pwd_authenticated, uid_t uid);
diff --git a/scp.c b/scp.c
index d317a71e1..c654cb66f 100644
--- a/scp.c
+++ b/scp.c
@@ -291,6 +291,9 @@ main(argc, argv)
291 case 't': /* "to" */ 291 case 't': /* "to" */
292 iamremote = 1; 292 iamremote = 1;
293 tflag = 1; 293 tflag = 1;
294#ifdef HAVE_CYGWIN
295 setmode(0, O_BINARY);
296#endif
294 break; 297 break;
295 default: 298 default:
296 usage(); 299 usage();
diff --git a/sftp-server.c b/sftp-server.c
index 0695a9824..75c19c8a6 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -1043,6 +1043,11 @@ main(int ac, char **av)
1043 in = dup(STDIN_FILENO); 1043 in = dup(STDIN_FILENO);
1044 out = dup(STDOUT_FILENO); 1044 out = dup(STDOUT_FILENO);
1045 1045
1046#ifdef HAVE_CYGWIN
1047 setmode(in, O_BINARY);
1048 setmode(out, O_BINARY);
1049#endif
1050
1046 max = 0; 1051 max = 0;
1047 if (in > max) 1052 if (in > max)
1048 max = in; 1053 max = in;