changeset 107441:6c7f53fe0ce5

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.
author Dan Nicolaescu <dann@ics.uci.edu>
date Sat, 20 Mar 2010 00:09:31 -0700
parents a83a89ef11ef
children 7ada44edb67c
files src/ChangeLog src/s/irix6-5.h src/s/sol2-6.h src/s/unixware.h src/s/usg5-4.h
diffstat 5 files changed, 13 insertions(+), 49 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Mar 19 23:48:13 2010 -0700
+++ b/src/ChangeLog	Sat Mar 20 00:09:31 2010 -0700
@@ -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.
--- a/src/s/irix6-5.h	Fri Mar 19 23:48:13 2010 -0700
+++ b/src/s/irix6-5.h	Sat Mar 20 00:09:31 2010 -0700
@@ -22,7 +22,6 @@
 #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 @@
 #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 @@
   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
 
--- a/src/s/sol2-6.h	Fri Mar 19 23:48:13 2010 -0700
+++ b/src/s/sol2-6.h	Sat Mar 20 00:09:31 2010 -0700
@@ -53,12 +53,6 @@
 #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 @@
    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;			\
--- a/src/s/unixware.h	Fri Mar 19 23:48:13 2010 -0700
+++ b/src/s/unixware.h	Sat Mar 20 00:09:31 2010 -0700
@@ -26,11 +26,6 @@
 /* #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 @@
    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;			\
--- a/src/s/usg5-4.h	Fri Mar 19 23:48:13 2010 -0700
+++ b/src/s/usg5-4.h	Sat Mar 20 00:09:31 2010 -0700
@@ -63,13 +63,7 @@
 
 /* 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 @@
 
 #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 \