From: Dan Nicolaescu Date: Sat, 20 Mar 2010 07:09:31 +0000 (-0700) Subject: Consolidate redundant definitions. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~703 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2968f56146eac37708de08f30a58d662ce5f037f;p=emacs.git 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. --- diff --git a/src/ChangeLog b/src/ChangeLog index 858fbe394c5..5da33df70b9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,17 @@ 2010-03-20 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. + 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. diff --git a/src/s/irix6-5.h b/src/s/irix6-5.h index 57429e41663..abd87b4aa2a 100644 --- a/src/s/irix6-5.h +++ b/src/s/irix6-5.h @@ -22,7 +22,6 @@ along with GNU Emacs. If not, see . */ #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 . */ #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 diff --git a/src/s/sol2-6.h b/src/s/sol2-6.h index 233f38a7b31..8cd01511879 100644 --- a/src/s/sol2-6.h +++ b/src/s/sol2-6.h @@ -53,12 +53,6 @@ along with GNU Emacs. If not, see . */ #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 . */ 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; \ diff --git a/src/s/unixware.h b/src/s/unixware.h index d626e122b14..9fedb426868 100644 --- a/src/s/unixware.h +++ b/src/s/unixware.h @@ -26,11 +26,6 @@ along with GNU Emacs. If not, see . */ /* #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 . */ 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; \ diff --git a/src/s/usg5-4.h b/src/s/usg5-4.h index c611911b0e8..180045cb7cf 100644 --- a/src/s/usg5-4.h +++ b/src/s/usg5-4.h @@ -63,13 +63,7 @@ along with GNU Emacs. If not, see . */ /* 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 . */ #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 \