Upgrade msys OpenSSH 6.6p1
[msysgit.git] / src / openssh / patches / 0002-Fix-for-msys.patch
blob6bba6134c5c01d450a81928cb865dabfb8134c65
1 From ae9c9e8dc5a84bec785a27b78a9b1fc5b0766ad8 Mon Sep 17 00:00:00 2001
2 From: Hiroshi Shirosaki <h.shirosaki@gmail.com>
3 Date: Tue, 24 Jun 2014 13:45:22 +0900
4 Subject: [PATCH 2/4] Fix for msys
6 Based on the patch.
7 https://github.com/Alexpux/MSYS2-packages/blob/master/openssh/openssh-6.3p1-msys2.patch
8 ---
9 config.guess | 3 +++
10 configure.ac | 2 +-
11 contrib/cygwin/Makefile | 2 +-
12 openbsd-compat/bsd-cygwin_util.c | 2 +-
13 regress/agent-ptrace.sh | 2 +-
14 regress/reexec.sh | 2 +-
15 regress/sftp-cmds.sh | 4 ++--
16 regress/test-exec.sh | 7 +++++++
17 8 files changed, 17 insertions(+), 7 deletions(-)
19 diff --git a/config.guess b/config.guess
20 index b94cde8..f2a785f 100644
21 --- a/config.guess
22 +++ b/config.guess
23 @@ -851,6 +851,9 @@ EOF
24 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
25 echo x86_64-unknown-cygwin
26 exit ;;
27 + amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
28 + echo x86_64-unknown-msys
29 + exit ;;
30 p*:CYGWIN*:*)
31 echo powerpcle-unknown-cygwin
32 exit ;;
33 diff --git a/configure.ac b/configure.ac
34 index 7c6ce08..9f1b966 100644
35 --- a/configure.ac
36 +++ b/configure.ac
37 @@ -529,7 +529,7 @@ case "$host" in
38 AC_DEFINE([DISABLE_UTMP], [1], [Define if you don't want to use utmp])
39 AC_DEFINE([DISABLE_WTMP], [1], [Define if you don't want to use wtmp])
41 -*-*-cygwin*)
42 +*-*-cygwin* | *-*-msys*)
43 check_for_libcrypt_later=1
44 LIBS="$LIBS /usr/lib/textreadmode.o"
45 AC_DEFINE([HAVE_CYGWIN], [1], [Define if you are on Cygwin])
46 diff --git a/contrib/cygwin/Makefile b/contrib/cygwin/Makefile
47 index a0261f4..2fdb676 100644
48 --- a/contrib/cygwin/Makefile
49 +++ b/contrib/cygwin/Makefile
50 @@ -7,7 +7,7 @@ datadir=$(prefix)/share
51 mandir=$(datadir)/man
52 docdir=$(datadir)/doc
53 sshdocdir=$(docdir)/openssh
54 -cygdocdir=$(docdir)/Cygwin
55 +cygdocdir=$(docdir)/MSYS
56 sysconfdir=/etc
57 defaultsdir=$(sysconfdir)/defaults/etc
58 inetdefdir=$(defaultsdir)/inetd.d
59 diff --git a/openbsd-compat/bsd-cygwin_util.c b/openbsd-compat/bsd-cygwin_util.c
60 index 267e77a..735a035 100644
61 --- a/openbsd-compat/bsd-cygwin_util.c
62 +++ b/openbsd-compat/bsd-cygwin_util.c
63 @@ -67,7 +67,7 @@ static struct wenv {
64 { NL("ALLUSERSPROFILE=") },
65 { NL("COMPUTERNAME=") },
66 { NL("COMSPEC=") },
67 - { NL("CYGWIN=") },
68 + { NL("MSYS=") },
69 { NL("OS=") },
70 { NL("PATH=") },
71 { NL("PATHEXT=") },
72 diff --git a/regress/agent-ptrace.sh b/regress/agent-ptrace.sh
73 index 1912ca8..22b0753 100644
74 --- a/regress/agent-ptrace.sh
75 +++ b/regress/agent-ptrace.sh
76 @@ -5,7 +5,7 @@ tid="disallow agent ptrace attach"
78 if have_prog uname ; then
79 case `uname` in
80 - AIX|CYGWIN*|OSF1)
81 + AIX|CYGWIN*|MSYS*|OSF1)
82 echo "skipped (not supported on this platform)"
83 exit 0
85 diff --git a/regress/reexec.sh b/regress/reexec.sh
86 index 433573f..2295686 100644
87 --- a/regress/reexec.sh
88 +++ b/regress/reexec.sh
89 @@ -45,7 +45,7 @@ rm -f $PIDFILE
90 cp $OBJ/sshd_config.orig $OBJ/sshd_config
92 # cygwin can't fork a deleted binary
93 -if [ "$os" != "cygwin" ]; then
94 +if [ "$os" != "cygwin" || "$os" != "msys" ]; then
96 verbose "test reexec fallback"
98 diff --git a/regress/sftp-cmds.sh b/regress/sftp-cmds.sh
99 index aad7fca..e8c002c 100644
100 --- a/regress/sftp-cmds.sh
101 +++ b/regress/sftp-cmds.sh
102 @@ -77,7 +77,7 @@ echo "get \"$DATA\" $COPY" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
103 || fail "get failed"
104 cmp $DATA ${COPY} || fail "corrupted copy after get"
106 -if [ "$os" != "cygwin" ]; then
107 +if [ "$os" != "cygwin" || "$os" != "msys" ]; then
108 rm -f ${QUOTECOPY}
109 cp $DATA ${QUOTECOPY}
110 verbose "$tid: get filename with quotes"
111 @@ -136,7 +136,7 @@ echo "put $DATA $COPY" | \
112 ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 || fail "put failed"
113 cmp $DATA ${COPY} || fail "corrupted copy after put"
115 -if [ "$os" != "cygwin" ]; then
116 +if [ "$os" != "cygwin" || "$os" != "msys" ]; then
117 rm -f ${QUOTECOPY}
118 verbose "$tid: put filename with quotes"
119 echo "put $DATA \"$QUOTECOPY_ARG\"" | \
120 diff --git a/regress/test-exec.sh b/regress/test-exec.sh
121 index aac8aa5..f6bc8a6 100644
122 --- a/regress/test-exec.sh
123 +++ b/regress/test-exec.sh
124 @@ -16,9 +16,16 @@ CYGWIN_NT-5.0)
125 os=cygwin
126 TEST_SSH_IPV6=no
128 +MSYS_NT-5.0)
129 + os=cygwin
130 + TEST_SSH_IPV6=no
131 + ;;
132 CYGWIN*)
133 os=cygwin
135 +MSYS*)
136 + os=cygwin
137 + ;;
138 esac
140 if [ ! -z "$TEST_SSH_PORT" ]; then
142 1.9.4.msysgit.0