emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109080: Move SETUP_SLAVE_PTY from sr


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109080: Move SETUP_SLAVE_PTY from src/s to configure
Date: Fri, 13 Jul 2012 17:45:55 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109080
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Fri 2012-07-13 17:45:55 -0400
message:
  Move SETUP_SLAVE_PTY from src/s to configure
  
  * configure.ac (SETUP_SLAVE_PTY): Move here from src/s.
  (FIRST_PTY_LETTER, PTY_NAME_SPRINTF): Combine sol2/unixware cases.
  
  * src/s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
  * src/s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
modified:
  configure.ac
  src/ChangeLog
  src/s/irix6-5.h
  src/s/usg5-4-common.h
=== modified file 'configure.ac'
--- a/configure.ac      2012-07-13 02:38:30 +0000
+++ b/configure.ac      2012-07-13 21:45:55 +0000
@@ -3412,10 +3412,6 @@
     ;;
 
   sol2* )
-    dnl This change means that we don't loop through allocate_pty too
-    dnl many times in the (rare) event of a failure.
-    AC_DEFINE(FIRST_PTY_LETTER, ['z'])
-    AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptmx");] )
     dnl Uses sigblock/sigunblock rather than sighold/sigrelse,
     dnl which appear to be BSD4.1 specific.  It may also be appropriate
     dnl for SVR4.x (x<2) but I'm not sure.   address@hidden
@@ -3425,15 +3421,25 @@
     AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptsname (int), *ptyname; sigblock 
(sigmask (SIGCLD)); if (grantpt (fd) == -1) { emacs_close (fd); return -1; } 
sigunblock (sigmask (SIGCLD)); if (unlockpt (fd) == -1) { emacs_close (fd); 
return -1; } if (!(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } 
snprintf (pty_name, sizeof pty_name, "%s", ptyname); }] )
     ;;
 
-  dnl Comments are as per sol2*.
   unixware )
-    AC_DEFINE(FIRST_PTY_LETTER, ['z'])
-    AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptmx");] )
+    dnl Comments are as per sol2*.
     AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptsname (int), *ptyname; 
sigblock(sigmask(SIGCLD)); if (grantpt(fd) == -1) fatal("could not grant slave 
pty"); sigunblock(sigmask(SIGCLD)); if (unlockpt(fd) == -1) fatal("could not 
unlock slave pty"); if (!(ptyname = ptsname(fd))) fatal ("could not enable 
slave pty"); snprintf (pty_name, sizeof pty_name, "%s", ptyname); }] )
     ;;
 esac
 
 
+case $opsys in
+  sol2* | unixware )
+    dnl This change means that we don't loop through allocate_pty too
+    dnl many times in the (rare) event of a failure.
+    AC_DEFINE(FIRST_PTY_LETTER, ['z'])
+    AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptmx");] )
+    dnl Push various streams modules onto a PTY channel.  Used in process.c.
+    AC_DEFINE(SETUP_SLAVE_PTY, [if (ioctl (xforkin, I_PUSH, "ptem") == -1) 
fatal ("ioctl I_PUSH ptem"); if (ioctl (xforkin, I_PUSH, "ldterm") == -1) fatal 
("ioctl I_PUSH ldterm"); if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) fatal 
("ioctl I_PUSH ttcompat");], [How to set up a slave PTY, if needed.])
+    ;;
+esac
+
+
 AH_TEMPLATE(SIGNALS_VIA_CHARACTERS, [Make process_send_signal work by
 "typing" a signal character on the pty.])
 

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-07-13 18:03:10 +0000
+++ b/src/ChangeLog     2012-07-13 21:45:55 +0000
@@ -1,3 +1,8 @@
+2012-07-13  Glenn Morris  <address@hidden>
+
+       * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
+       * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
+
 2012-07-13  Jan Djärv  <address@hidden>
 
        * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.

=== modified file 'src/s/irix6-5.h'
--- a/src/s/irix6-5.h   2012-07-13 02:34:05 +0000
+++ b/src/s/irix6-5.h   2012-07-13 21:45:55 +0000
@@ -22,8 +22,6 @@
 #undef _longjmp /* use system versions, not conservative aliases */
 #undef _setjmp
 
-#undef SETUP_SLAVE_PTY
-
 #ifdef emacs
 char *_getpty();
 #endif

=== modified file 'src/s/usg5-4-common.h'
--- a/src/s/usg5-4-common.h     2012-07-13 02:34:05 +0000
+++ b/src/s/usg5-4-common.h     2012-07-13 21:45:55 +0000
@@ -52,11 +52,3 @@
    this is all we need.  */
 #define TIOCSIGSEND TIOCSIGNAL
 
-/* Push various streams modules onto a PTY channel.  */
-#define SETUP_SLAVE_PTY \
-  if (ioctl (xforkin, I_PUSH, "ptem") == -1)   \
-    fatal ("ioctl I_PUSH ptem");               \
-  if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \
-    fatal ("ioctl I_PUSH ldterm");     \
-  if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
-    fatal ("ioctl I_PUSH ttcompat");


reply via email to

[Prev in Thread] Current Thread [Next in Thread]