summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2004-02-20 15:27:35 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2004-02-20 15:27:35 +0000
commit2073eca9f32a13df802e1dddf8fc23c5b99ff921 (patch)
tree7bb29e52e5d25284accc017db570db14cd236035 /Src
parent01c29ffd950352f7ce638fb9e75778bc1bb20454 (diff)
downloadzsh-2073eca9f32a13df802e1dddf8fc23c5b99ff921.tar.gz
zsh-2073eca9f32a13df802e1dddf8fc23c5b99ff921.tar.xz
zsh-2073eca9f32a13df802e1dddf8fc23c5b99ff921.zip
19456: Fix ptmx tests, again.
Diffstat (limited to 'Src')
-rw-r--r--Src/Modules/zpty.c5
-rw-r--r--Src/Zle/iwidgets.list2
-rw-r--r--Src/Zle/zle_hist.c3
-rw-r--r--Src/system.h8
4 files changed, 13 insertions, 5 deletions
diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c
index e1f75c30a..a3e6f2770 100644
--- a/Src/Modules/zpty.c
+++ b/Src/Modules/zpty.c
@@ -154,8 +154,7 @@ getptycmd(char *name)
     return NULL;
 }
 
-#if defined(HAVE_DEV_PTMX) && defined(HAVE_GRANTPT) && \
-    defined(HAVE_PTSNAME) && defined(HAVE_UNLOCKPT)
+#ifdef USE_DEV_PTMX
 
 #ifdef HAVE_SYS_STROPTS_H
 #include <sys/stropts.h>
@@ -190,7 +189,7 @@ get_pty(int master, int *retfd)
 	close(mfd);
 	return 1;
     }
-#if defined(I_FIND) && defined(I_PUSH)
+#if defined(I_FIND) && defined(I_PUSH) && defined(__SVR4)
     /*
      * Use if STREAMS is available.  The test is probably OK,
      * but we could use e.g. the sys/stropts.h test.
diff --git a/Src/Zle/iwidgets.list b/Src/Zle/iwidgets.list
index fbd45dacc..36d0cf396 100644
--- a/Src/Zle/iwidgets.list
+++ b/Src/Zle/iwidgets.list
@@ -56,7 +56,7 @@
 "expand-word", expandword, 0
 "forward-char", forwardchar, 0
 "forward-word", forwardword, 0
-"get-line", getline, 0
+"get-line", zgetline, 0
 "gosmacs-transpose-chars", gosmacstransposechars, 0
 "history-beginning-search-backward", historybeginningsearchbackward, 0
 "history-beginning-search-forward", historybeginningsearchforward, 0
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c
index 1c17defc7..b24db660c 100644
--- a/Src/Zle/zle_hist.c
+++ b/Src/Zle/zle_hist.c
@@ -660,9 +660,10 @@ pushinput(char **args)
     return ret;
 }
 
+/* Renamed to avoid clash with library function */
 /**/
 int
-getline(char **args)
+zgetline(char **args)
 {
     char *s = (char *)getlinknode(bufstack);
 
diff --git a/Src/system.h b/Src/system.h
index d7372924b..558508d2d 100644
--- a/Src/system.h
+++ b/Src/system.h
@@ -37,6 +37,14 @@
 #endif
 #endif
 
+#ifdef __linux
+/*
+ * Turn on numerous extensions.
+ * This is in order to get the functions for manipulating /dev/ptmx.
+ */
+#define _GNU_SOURCE 1
+#endif
+
 /* NeXT has half-implemented POSIX support *
  * which currently fools configure         */
 #ifdef __NeXT__