Commit 2a633456 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

Replaced symbol BSD with BSD_SYSTEM.

Don't explicitly Include termios.h.
(ospeed): Use HAVE_TERMIOS to decide whether to use speed_t.
parent 7ae68633
...@@ -124,7 +124,7 @@ extern int errno; ...@@ -124,7 +124,7 @@ extern int errno;
#endif /* VMS */ #endif /* VMS */
#ifndef BSD4_1 #ifndef BSD4_1
#ifdef BSD /* this is done this way to avoid defined (BSD) || defined (USG) #ifdef BSD_SYSTEM /* avoid writing defined (BSD_SYSTEM) || defined (USG)
because the vms compiler doesn't grok `defined' */ because the vms compiler doesn't grok `defined' */
#include <fcntl.h> #include <fcntl.h>
#endif #endif
...@@ -138,6 +138,7 @@ extern int errno; ...@@ -138,6 +138,7 @@ extern int errno;
#ifndef MSDOS #ifndef MSDOS
#include <sys/ioctl.h> #include <sys/ioctl.h>
#endif #endif
#include "systty.h" #include "systty.h"
#include "syswait.h" #include "syswait.h"
...@@ -225,8 +226,7 @@ static int baud_convert[] = ...@@ -225,8 +226,7 @@ static int baud_convert[] =
}; };
#endif #endif
#ifdef HAVE_TERMIOS_H #ifdef HAVE_TERMIOS
#include <termios.h>
extern speed_t ospeed; extern speed_t ospeed;
#else #else
extern short ospeed; extern short ospeed;
...@@ -377,7 +377,7 @@ set_exclusive_use (fd) ...@@ -377,7 +377,7 @@ set_exclusive_use (fd)
wait_without_blocking () wait_without_blocking ()
{ {
#ifdef BSD #ifdef BSD_SYSTEM
wait3 (0, WNOHANG | WUNTRACED, 0); wait3 (0, WNOHANG | WUNTRACED, 0);
#else #else
croak ("wait_without_blocking"); croak ("wait_without_blocking");
...@@ -409,7 +409,7 @@ wait_for_termination (pid) ...@@ -409,7 +409,7 @@ wait_for_termination (pid)
status = SYS$FORCEX (&pid, 0, 0); status = SYS$FORCEX (&pid, 0, 0);
break; break;
#else /* not VMS */ #else /* not VMS */
#if defined (BSD) || (defined (HPUX) && !defined (HPUX_5)) #if defined (BSD_SYSTEM) || (defined (HPUX) && !defined (HPUX_5))
/* Note that kill returns -1 even if the process is just a zombie now. /* Note that kill returns -1 even if the process is just a zombie now.
But inevitably a SIGCHLD interrupt should be generated But inevitably a SIGCHLD interrupt should be generated
and child_sig will do wait3 and make the process go away. */ and child_sig will do wait3 and make the process go away. */
...@@ -428,12 +428,12 @@ wait_for_termination (pid) ...@@ -428,12 +428,12 @@ wait_for_termination (pid)
sleep (1); sleep (1);
else else
sigpause (SIGEMPTYMASK); sigpause (SIGEMPTYMASK);
#else /* not BSD, and not HPUX version >= 6 */ #else /* not BSD_SYSTEM, and not HPUX version >= 6 */
#if defined (UNIPLUS) #if defined (UNIPLUS)
if (0 > kill (pid, 0)) if (0 > kill (pid, 0))
break; break;
wait (0); wait (0);
#else /* neither BSD nor UNIPLUS: random sysV */ #else /* neither BSD_SYSTEM nor UNIPLUS: random sysV */
#ifdef POSIX_SIGNALS /* would this work for LINUX as well? */ #ifdef POSIX_SIGNALS /* would this work for LINUX as well? */
sigblock (sigmask (SIGCHLD)); sigblock (sigmask (SIGCHLD));
if (0 > kill (pid, 0)) if (0 > kill (pid, 0))
...@@ -466,7 +466,7 @@ wait_for_termination (pid) ...@@ -466,7 +466,7 @@ wait_for_termination (pid)
#endif /* not HAVE_SYSV_SIGPAUSE */ #endif /* not HAVE_SYSV_SIGPAUSE */
#endif /* not POSIX_SIGNALS */ #endif /* not POSIX_SIGNALS */
#endif /* not UNIPLUS */ #endif /* not UNIPLUS */
#endif /* not BSD, and not HPUX version >= 6 */ #endif /* not BSD_SYSTEM, and not HPUX version >= 6 */
#endif /* not VMS */ #endif /* not VMS */
#else /* not subprocesses */ #else /* not subprocesses */
#if __DJGPP__ > 1 #if __DJGPP__ > 1
...@@ -1671,7 +1671,7 @@ reset_sys_modes () ...@@ -1671,7 +1671,7 @@ reset_sys_modes ()
reset_terminal_modes (); reset_terminal_modes ();
fflush (stdout); fflush (stdout);
#ifdef BSD #ifdef BSD_SYSTEM
#ifndef BSD4_1 #ifndef BSD4_1
/* Avoid possible loss of output when changing terminal modes. */ /* Avoid possible loss of output when changing terminal modes. */
fsync (fileno (stdout)); fsync (fileno (stdout));
...@@ -2758,7 +2758,7 @@ sys_sigsetmask (sigset_t new_mask) ...@@ -2758,7 +2758,7 @@ sys_sigsetmask (sigset_t new_mask)
# define random rand # define random rand
# else # else
# define random() (rand () >> 16) # define random() (rand () >> 16)
# endif /* !BSD */ # endif /* !USG */
# endif /* RAND_MAX != 2147483647 */ # endif /* RAND_MAX != 2147483647 */
# endif /* RAND_MAX != 32767 */ # endif /* RAND_MAX != 32767 */
# endif /* !HAVE_LRAND48 */ # endif /* !HAVE_LRAND48 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment