=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/clientloop.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- src/usr.bin/ssh/clientloop.c 1999/09/30 05:11:29 1.4 +++ src/usr.bin/ssh/clientloop.c 1999/09/30 05:53:04 1.5 @@ -15,7 +15,7 @@ */ #include "includes.h" -RCSID("$Id: clientloop.c,v 1.4 1999/09/30 05:11:29 deraadt Exp $"); +RCSID("$Id: clientloop.c,v 1.5 1999/09/30 05:53:04 deraadt Exp $"); #include "xmalloc.h" #include "ssh.h" @@ -34,13 +34,11 @@ in a configuration file. */ extern char *host; -#ifdef SIGWINCH /* Flag to indicate that we have received a window change signal which has not yet been processed. This will cause a message indicating the new window size to be sent to the server a little later. This is volatile because this is updated in a signal handler. */ static volatile int received_window_change_signal = 0; -#endif /* SIGWINCH */ /* Terminal modes, as saved by enter_raw_mode. */ static struct termios saved_tio; @@ -128,7 +126,6 @@ fatal_add_cleanup((void (*)(void *))leave_non_blocking, NULL); } -#ifdef SIGWINCH /* Signal handler for the window change signal (SIGWINCH). This just sets a flag indicating that the window has changed. */ @@ -137,7 +134,6 @@ received_window_change_signal = 1; signal(SIGWINCH, window_change_handler); } -#endif /* SIGWINCH */ /* Signal handler for signals that cause the program to terminate. These signals must be trapped to restore terminal modes. */ @@ -350,7 +346,6 @@ void client_check_window_change() { -#ifdef SIGWINCH /* Send possible window change message to the server. */ if (received_window_change_signal) { @@ -371,7 +366,6 @@ packet_send(); } } -#endif /* SIGWINCH */ } /* Waits until the client can do something (some data becomes available on @@ -438,9 +432,7 @@ void client_suspend_self() { -#ifdef SIGWINCH struct winsize oldws, newws; -#endif /* SIGWINCH */ /* Flush stdout and stderr buffers. */ if (buffer_len(&stdout_buffer) > 0) @@ -461,23 +453,19 @@ buffer_free(&stdout_buffer); buffer_free(&stderr_buffer); -#ifdef SIGWINCH /* Save old window size. */ ioctl(fileno(stdin), TIOCGWINSZ, &oldws); -#endif /* SIGWINCH */ /* Send the suspend signal to the program itself. */ kill(getpid(), SIGTSTP); -#ifdef SIGWINCH /* Check if the window size has changed. */ if (ioctl(fileno(stdin), TIOCGWINSZ, &newws) >= 0 && (oldws.ws_row != newws.ws_row || oldws.ws_col != newws.ws_col || oldws.ws_xpixel != newws.ws_xpixel || oldws.ws_ypixel != newws.ws_ypixel)) received_window_change_signal = 1; -#endif /* SIGWINCH */ /* OK, we have been continued by the user. Reinitialize buffers. */ @@ -810,10 +798,8 @@ signal(SIGQUIT, signal_handler); signal(SIGTERM, signal_handler); signal(SIGPIPE, SIG_IGN); -#ifdef SIGWINCH if (have_pty) signal(SIGWINCH, window_change_handler); -#endif /* SIGWINCH */ /* Enter raw mode if have a pseudo terminal. */ if (have_pty) @@ -871,11 +857,9 @@ /* Terminate the session. */ -#ifdef SIGWINCH /* Stop watching for window change. */ if (have_pty) signal(SIGWINCH, SIG_DFL); -#endif /* SIGWINCH */ /* Stop listening for connections. */ channel_stop_listening();