about summary refs log tree commit diff
path: root/Src/Modules/zpty.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2000-06-27 08:42:27 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2000-06-27 08:42:27 +0000
commitdcd94d3786f6eadfcf7cf9c79e2886e931b0f296 (patch)
treea84f5b81e2b12e79ff3026338156c8c17f237609 /Src/Modules/zpty.c
parent756a2aba9c94fdd7976bf30d0420e5565be7a190 (diff)
downloadzsh-dcd94d3786f6eadfcf7cf9c79e2886e931b0f296.tar.gz
zsh-dcd94d3786f6eadfcf7cf9c79e2886e931b0f296.tar.xz
zsh-dcd94d3786f6eadfcf7cf9c79e2886e931b0f296.zip
Andrej: 12081: zpty under cygwin
Diffstat (limited to 'Src/Modules/zpty.c')
-rw-r--r--Src/Modules/zpty.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c
index dd15a1d2d..d47beedeb 100644
--- a/Src/Modules/zpty.c
+++ b/Src/Modules/zpty.c
@@ -155,9 +155,11 @@ getptycmd(char *name)
 /**** maybe we should use configure here */
 /**** and we certainly need more/better #if tests */
 
-#if defined(__SVR4) || defined(sinix)
+#if defined(__SVR4) || defined(sinix) || defined(__CYGWIN__)
 
+#if !defined(__CYGWIN__)
 #include <sys/stropts.h>
+#endif
 
 static int
 get_pty(int master, int *retfd)
@@ -183,6 +185,7 @@ get_pty(int master, int *retfd)
 	close(mfd);
 	return 1;
     }
+#if !defined(__CYGWIN__)
     if ((ret = ioctl(sfd, I_FIND, "ptem")) != 1)
        if (ret == -1 || ioctl(sfd, I_PUSH, "ptem") == -1) {
 	   close(mfd);
@@ -201,13 +204,14 @@ get_pty(int master, int *retfd)
 	   close(sfd);
 	   return 1;
        }
+#endif /* !defined(__CYGWIN__) */
 
     *retfd = sfd;
 
     return 0;
 }
 
-#else /* ! (defined(__SVR4) || defined(sinix)) */
+#else /* ! (defined(__SVR4) || defined(sinix) || defined(__CYGWIN__)) */
 
 static int
 get_pty(int master, int *retfd)