summaryrefslogtreecommitdiff
path: root/rltty.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2011-11-23 18:50:16 -0500
committerChet Ramey <chet.ramey@case.edu>2011-11-23 18:50:16 -0500
commitd19d2a576e818d6732b0d1b1ae72e3cc96fc29a3 (patch)
tree0dc29bf495127f11637ab5bb92c41f0b8241bf8a /rltty.c
parent7ea38d677dc0ce50dfcbfc43150919579627b274 (diff)
downloadreadline-d19d2a576e818d6732b0d1b1ae72e3cc96fc29a3.tar.gz
Readline-4.0 import
Diffstat (limited to 'rltty.c')
-rw-r--r--rltty.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/rltty.c b/rltty.c
index 8312963..a5ef938 100644
--- a/rltty.c
+++ b/rltty.c
@@ -37,9 +37,9 @@
#include "rldefs.h"
-#if !defined (SHELL) && defined (GWINSZ_IN_SYS_IOCTL)
+#if defined (GWINSZ_IN_SYS_IOCTL)
# include <sys/ioctl.h>
-#endif /* !SHELL && GWINSZ_IN_SYS_IOCTL */
+#endif /* GWINSZ_IN_SYS_IOCTL */
#include "rltty.h"
#include "readline.h"
@@ -144,7 +144,7 @@ static int terminal_prepped;
static int ksrflow;
#endif
-#if !defined (SHELL) && defined (TIOCGWINSZ)
+#if defined (TIOCGWINSZ)
/* Dummy call to force a backgrounded readline to stop before it tries
to get the tty settings. */
static void
@@ -156,9 +156,7 @@ set_winsize (tty)
if (ioctl (tty, TIOCGWINSZ, &w) == 0)
(void) ioctl (tty, TIOCSWINSZ, &w);
}
-#else /* SHELL || !TIOCGWINSZ */
-# define set_winsize(tty)
-#endif /* SHELL || !TIOCGWINSZ */
+#endif /* TIOCGWINSZ */
#if defined (NEW_TTY_DRIVER)
@@ -389,6 +387,7 @@ get_tty_settings (tty, tiop)
TIOTYPE *tiop;
{
int ioctl_ret;
+
set_winsize (tty);
while (1)