From 5c56eb0c5a28b380fdccc701347b8c5bbee4dd63 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Fri, 22 Jun 2001 23:29:18 +0000 Subject: [PATCH] * cons.handler.c: Reorganize includes. Fix warnings on BSD. * rxvt.c (rxvt_extensions): Make static. * main.c (sigchld_handler_no_subshell) [!__linux__]: Don't try to restart cons.saver. * subshell.c (sigchld_handler) [!__linux__]: Likewise. --- src/ChangeLog | 6 ++++++ src/cons.handler.c | 17 +++++++---------- src/main.c | 6 +++--- src/rxvt.c | 2 +- src/subshell.c | 4 ++-- 5 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5de7e4c7e..4787d7103 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2001-06-22 Pavel Roskin + * cons.handler.c: Reorganize includes. Fix warnings on BSD. + * rxvt.c (rxvt_extensions): Make static. + * main.c (sigchld_handler_no_subshell) [!__linux__]: Don't try + to restart cons.saver. + * subshell.c (sigchld_handler) [!__linux__]: Likewise. + * fsusage.c: Use HAVE_INFOMOUNT. * mountlist.c: Likewise. Fix condition when mount_list is declared. diff --git a/src/cons.handler.c b/src/cons.handler.c index 2633a4402..025c09bb8 100644 --- a/src/cons.handler.c +++ b/src/cons.handler.c @@ -19,14 +19,6 @@ /*#ifdef linux */ #include -int cons_saver_pid = 1; -extern int rxvt_extensions; -signed char console_flag = 0; - -#if defined(linux) || defined(__linux__) - -#include "tty.h" -#include "global.h" #ifdef HAVE_UNISTD_H # include #endif @@ -36,11 +28,16 @@ signed char console_flag = 0; # include #endif #include -#include "util.h" -#include "win.h" #include "cons.saver.h" +#include "tty.h" +#include "global.h" + +signed char console_flag = 0; + +#if defined(linux) || defined(__linux__) #include "main.h" +int cons_saver_pid = 1; static int pipefd1 [2] = {-1, -1}, pipefd2 [2] = {-1, -1}; void show_console_contents (int starty, unsigned char begin_line, unsigned char end_line) diff --git a/src/main.c b/src/main.c index 76b30285c..562491484 100644 --- a/src/main.c +++ b/src/main.c @@ -2407,6 +2407,7 @@ static void sigchld_handler_no_subshell (int sig) { #ifndef HAVE_X +#if defined(linux) || defined(__linux__) int pid, status; if (!console_flag) @@ -2419,7 +2420,6 @@ sigchld_handler_no_subshell (int sig) /* That comment is no longer true. We need to wait() on a sigchld handler (that's at least what the tarfs code expects currently). */ -#ifndef SCO_FLAVOR pid = waitpid (cons_saver_pid, &status, WUNTRACED | WNOHANG); if (pid == cons_saver_pid){ @@ -2436,10 +2436,10 @@ sigchld_handler_no_subshell (int sig) } /* }}} */ } -#endif /* ! SCO_FLAVOR */ +#endif /* linux || __linux__ */ /* If we get here, some other child exited; ignore it */ -#endif /* ! HAVE_X */ +#endif /* !HAVE_X */ } void diff --git a/src/rxvt.c b/src/rxvt.c index c5a6dcb2b..d818c9696 100644 --- a/src/rxvt.c +++ b/src/rxvt.c @@ -36,7 +36,7 @@ #include "global.h" #include "cons.saver.h" -int rxvt_extensions = 0; +static int rxvt_extensions = 0; int look_for_rxvt_extensions (void) { diff --git a/src/subshell.c b/src/subshell.c index 3640dbf61..3eab132ae 100644 --- a/src/subshell.c +++ b/src/subshell.c @@ -893,7 +893,7 @@ void sigchld_handler (int sig) /* }}} */ } -#ifndef SCO_FLAVOR +#if defined(linux) || defined(__linux__) pid = waitpid (cons_saver_pid, &status, WUNTRACED | WNOHANG); if (pid == cons_saver_pid) { @@ -914,7 +914,7 @@ void sigchld_handler (int sig) /* }}} */ } -#endif /* ! SCO_FLAVOR */ +#endif /* linux || __linux__ */ /* If we get here, some other child exited; ignore it */ # ifdef __EMX__ /* Need to report */ pid = wait(&status);