Commit 2968f561 authored by Dan Nicolaescu's avatar Dan Nicolaescu

Consolidate redundant definitions.

* s/usg5-4.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not define,
it's undefined in all files that include this one.
(POSIX_SIGNALS): Define here instead of doing it in all files that
include this one.
* s/irix6-5.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not undef.
(POSIX_SIGNALS): Do not define.
* s/sol2-6.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not undef.
(POSIX_SIGNALS): Do not define.
* s/unixware.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not undef.
(POSIX_SIGNALS): Do not define.
parent 15d25dc0
2010-03-20 Dan Nicolaescu <dann@ics.uci.edu>
Consolidate redundant definitions.
* s/usg5-4.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not define,
it's undefined in all files that include this one.
(POSIX_SIGNALS): Define here instead of doing it in all files that
include this one.
* s/irix6-5.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not undef.
(POSIX_SIGNALS): Do not define.
* s/sol2-6.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not undef.
(POSIX_SIGNALS): Do not define.
* s/unixware.h (sigsetmask, PTY_TTY_NAME_SPRINTF): Do not undef.
(POSIX_SIGNALS): Do not define.
Remove support for old UNIX System V systems.
* s/unixware.h: Add the contents of s/usg-5-4-2.h.
* s/usg-5-4-2.h: Remove.
......
......@@ -22,7 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define IRIX6_5 /* used in m/iris4d */
#include "usg5-4.h"
#undef sigsetmask /* use sys_sigsetmask */
#undef _longjmp /* use system versions, not conservative aliases */
#undef _setjmp
......@@ -46,9 +45,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define SIGNALS_VIA_CHARACTERS
/* No need to use sprintf to get the tty name--we get that from _getpty. */
#ifdef PTY_TTY_NAME_SPRINTF
#undef PTY_TTY_NAME_SPRINTF
#endif
#define PTY_TTY_NAME_SPRINTF
/* No need to get the pty name at all. */
#ifdef PTY_NAME_SPRINTF
......@@ -80,10 +76,6 @@ char *_getpty();
strcpy (pty_name, name); \
}
/* Since we use POSIX constructs in PTY_OPEN, we must force POSIX
throughout. */
#define POSIX_SIGNALS
/* Ulimit(UL_GMEMLIM) is busted... */
#define ULIMIT_BREAK_VALUE 0x14000000
......
......@@ -53,12 +53,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define C_DEBUG_SWITCH -g -O
#endif /* GCC */
/* Info from fnf@cygnus.com suggests this is appropriate. */
#define POSIX_SIGNALS
/* We don't need the definition from usg5-4.h with POSIX_SIGNALS. */
#undef sigsetmask
/* This is the same definition as in usg5-4.h, but with sigblock/sigunblock
rather than sighold/sigrelse, which appear to be BSD4.1 specific and won't
work if POSIX_SIGNALS is defined. It may also be appropriate for SVR4.x
......@@ -68,7 +62,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
intercepting that death. If any child but grantpt's should die
within, it should be caught after sigrelse(2). */
#undef PTY_TTY_NAME_SPRINTF
#define PTY_TTY_NAME_SPRINTF \
{ \
char *ptsname (), *ptyname; \
......
......@@ -26,11 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* #define HAVE_GETWD (appears to be buggy on SVR4.2) */
#undef HAVE_GETWD
/* Info from fnf@cygnus.com suggests this is appropriate. */
#define POSIX_SIGNALS
/* We don't need the definition from usg5-3.h with POSIX_SIGNALS. */
#undef sigsetmask
#undef HAVE_SYSV_SIGPAUSE
/* Motif needs -lgen. */
......@@ -45,7 +40,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
intercepting that death. If any child but grantpt's should die
within, it should be caught after sigrelse(2). */
#undef PTY_TTY_NAME_SPRINTF
#define PTY_TTY_NAME_SPRINTF \
{ \
char *ptsname(), *ptyname; \
......
......@@ -63,13 +63,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Special hacks needed to make Emacs run on this system. */
/*
* Make the sigsetmask function go away. Don't know what the
* ramifications of this are, but doesn't seem possible to
* emulate it properly anyway at this point.
*/
#define sigsetmask(mask) /* Null expansion */
#define POSIX_SIGNALS
/* setjmp and longjmp can safely replace _setjmp and _longjmp,
but they will run slower. */
......@@ -176,27 +170,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
/* This sets the name of the slave side of the PTY. On SysVr4,
grantpt(3) forks a subprocess, so keep sigchld_handler() from
intercepting that death. If any child but grantpt's should die
within, it should be caught after sigrelse(2). */
#define PTY_TTY_NAME_SPRINTF \
{ \
char *ptsname (), *ptyname; \
\
sighold (SIGCLD); \
if (grantpt (fd) == -1) \
{ emacs_close (fd); return -1; } \
sigrelse (SIGCLD); \
if (unlockpt (fd) == -1) \
{ emacs_close (fd); return -1; } \
if (!(ptyname = ptsname (fd))) \
{ emacs_close (fd); return -1; } \
strncpy (pty_name, ptyname, sizeof (pty_name)); \
pty_name[sizeof (pty_name) - 1] = 0; \
}
/* Push various streams modules onto a PTY channel. */
#define SETUP_SLAVE_PTY \
......
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