about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/Modules/zpty.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 90b1767e0..6fb3efc57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-06-27  Peter Stephenson  <pws@cambridgesiliconradio.com>
+
+	* Andrej: 12081: Src/Modules/zpty.c: compiles under Cygwin, but
+	still glitches.
+
 2000-06-26  Peter Stephenson  <pws@pwstephenson.fsnet.co.uk>
 
 	* unposted: Src/builtin.c, Src/utils.c: move read_poll to utils.c
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)