Consolidate redundant definitions.
authorDan Nicolaescu <dann@ics.uci.edu>
Sat, 20 Mar 2010 07:09:31 +0000 (00:09 -0700)
committerDan Nicolaescu <dann@ics.uci.edu>
Sat, 20 Mar 2010 07:09:31 +0000 (00:09 -0700)
* 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.

src/ChangeLog
src/s/irix6-5.h
src/s/sol2-6.h
src/s/unixware.h
src/s/usg5-4.h

index 858fbe3..5da33df 100644 (file)
@@ -1,5 +1,17 @@
 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.
index 57429e4..abd87b4 100644 (file)
@@ -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
 
index 233f38a..8cd0151 100644 (file)
@@ -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;                        \
index d626e12..9fedb42 100644 (file)
@@ -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;                 \
index c611911..180045c 100644 (file)
@@ -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 \