1
1

Remove references to the archaic "linux" preprocessor definition.

Only __linux__ should be used.
Этот коммит содержится в:
Pavel Roskin 2003-02-27 05:09:35 +00:00
родитель 6b986e7547
Коммит ff82223a35
4 изменённых файлов: 25 добавлений и 29 удалений

Просмотреть файл

@ -1,4 +1,4 @@
#if defined(linux) || defined(__linux__) #ifdef __linux__
/* General purpose Linux console screen save/restore server /* General purpose Linux console screen save/restore server
Copyright (C) 1994 Janne Kukonlehto <jtklehto@stekt.oulu.fi> Copyright (C) 1994 Janne Kukonlehto <jtklehto@stekt.oulu.fi>
@ -315,4 +315,4 @@ int main (int argc, char **argv)
#error "The Linux console screen saver works only on Linux" #error "The Linux console screen saver works only on Linux"
#endif /* #ifdef linux */ #endif /* __linux__ */

Просмотреть файл

@ -49,12 +49,12 @@
#ifdef __linux__ #ifdef __linux__
# if defined(__GLIBC__) && (__GLIBC__ < 2) # if defined(__GLIBC__) && (__GLIBC__ < 2)
# include <linux/termios.h> /* This is needed for TIOCLINUX */ # include <linux/termios.h> /* TIOCLINUX */
# else # else
# include <termios.h> # include <termios.h>
# endif # endif
# include <sys/ioctl.h> # include <sys/ioctl.h>
#endif #endif /* __linux__ */
#ifdef __QNXNTO__ #ifdef __QNXNTO__
# include <sys/dcmd_chr.h> # include <sys/dcmd_chr.h>

Просмотреть файл

@ -2060,7 +2060,7 @@ OS_Setup (void)
static void static void
sigchld_handler_no_subshell (int sig) sigchld_handler_no_subshell (int sig)
{ {
#if defined(linux) || defined(__linux__) #ifdef __linux__
int pid, status; int pid, status;
if (!console_flag) if (!console_flag)
@ -2086,9 +2086,9 @@ sigchld_handler_no_subshell (int sig)
console_flag = 0; console_flag = 0;
} }
} }
#endif /* linux || __linux__ */ #endif /* __linux__ */
/* If we get here, some other child exited; ignore it */ /* If we got here, some other child exited; ignore it */
} }
void void

Просмотреть файл

@ -871,7 +871,8 @@ void subshell_get_console_attributes (void)
/* Figure out whether the subshell has stopped, exited or been killed */ /* Figure out whether the subshell has stopped, exited or been killed */
/* Possibly modifies: `subshell_alive', `subshell_stopped' and `quit' */ /* Possibly modifies: `subshell_alive', `subshell_stopped' and `quit' */
void sigchld_handler (int sig) void
sigchld_handler (int sig)
{ {
int status; int status;
pid_t pid; pid_t pid;
@ -879,10 +880,9 @@ void sigchld_handler (int sig)
pid = waitpid (subshell_pid, &status, WUNTRACED | WNOHANG); pid = waitpid (subshell_pid, &status, WUNTRACED | WNOHANG);
if (pid == subshell_pid) { if (pid == subshell_pid) {
/* {{{ Figure out what has happened to the subshell */ /* Figure out what has happened to the subshell */
if (WIFSTOPPED (status)) if (WIFSTOPPED (status)) {
{
if (WSTOPSIG (status) == SIGSTOP) { if (WSTOPSIG (status) == SIGSTOP) {
/* The subshell has received a SIGSTOP signal */ /* The subshell has received a SIGSTOP signal */
subshell_stopped = TRUE; subshell_stopped = TRUE;
@ -890,19 +890,15 @@ void sigchld_handler (int sig)
/* The user has suspended the subshell. Revive it */ /* The user has suspended the subshell. Revive it */
kill (subshell_pid, SIGCONT); kill (subshell_pid, SIGCONT);
} }
} } else {
else /* The subshell has either exited normally or been killed */ /* The subshell has either exited normally or been killed */
{
subshell_alive = FALSE; subshell_alive = FALSE;
delete_select_channel (subshell_pty); delete_select_channel (subshell_pty);
if (WIFEXITED (status) && WEXITSTATUS (status) != FORK_FAILURE) if (WIFEXITED (status) && WEXITSTATUS (status) != FORK_FAILURE)
quit |= SUBSHELL_EXIT; /* Exited normally */ quit |= SUBSHELL_EXIT; /* Exited normally */
} }
/* }}} */
} }
#ifdef __linux__
#if defined(linux) || defined(__linux__)
pid = waitpid (cons_saver_pid, &status, WUNTRACED | WNOHANG); pid = waitpid (cons_saver_pid, &status, WUNTRACED | WNOHANG);
if (pid == cons_saver_pid) { if (pid == cons_saver_pid) {
@ -910,19 +906,19 @@ void sigchld_handler (int sig)
if (WIFSTOPPED (status)) if (WIFSTOPPED (status))
/* Someone has stopped cons.saver - restart it */ /* Someone has stopped cons.saver - restart it */
kill (pid, SIGCONT); kill (pid, SIGCONT);
else else {
{
/* cons.saver has died - disable confole saving */ /* cons.saver has died - disable confole saving */
handle_console (CONSOLE_DONE); handle_console (CONSOLE_DONE);
console_flag = 0; console_flag = 0;
} }
} }
#endif /* linux || __linux__ */ #endif /* __linux__ */
/* If we get here, some other child exited; ignore it */
# ifdef __EMX__ /* Need to report */ /* If we got here, some other child exited; ignore it */
pid = wait(&status); #ifdef __EMX__ /* Need to report */
# endif pid = wait (&status);
#endif
} }
/* }}} */ /* }}} */
@ -1197,7 +1193,7 @@ static int pty_open_slave (const char *pty_name)
return -1; return -1;
} }
#if !defined(__osf__) && !defined(linux) && !defined(__linux__) #if !defined(__osf__) && !defined(__linux__)
#if defined (I_FIND) && defined (I_PUSH) #if defined (I_FIND) && defined (I_PUSH)
if (!ioctl (pty_slave, I_FIND, "ptem")) if (!ioctl (pty_slave, I_FIND, "ptem"))
if (ioctl (pty_slave, I_PUSH, "ptem") == -1) if (ioctl (pty_slave, I_PUSH, "ptem") == -1)
@ -1225,7 +1221,7 @@ static int pty_open_slave (const char *pty_name)
} }
#endif /* sgi || __sgi */ #endif /* sgi || __sgi */
#endif /* I_FIND && I_PUSH */ #endif /* I_FIND && I_PUSH */
#endif /* __osf__ || linux || __linux__ */ #endif /* __osf__ || __linux__ */
return pty_slave; return pty_slave;
} }