mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
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.
This commit is contained in:
parent
7f5b319886
commit
33d63ff4db
4 changed files with 17 additions and 16 deletions
18
configure.ac
18
configure.ac
|
|
@ -3412,10 +3412,6 @@ case $opsys in
|
|||
;;
|
||||
|
||||
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. fnf@cygnus.com
|
||||
|
|
@ -3425,11 +3421,21 @@ case $opsys in
|
|||
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 )
|
||||
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");] )
|
||||
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); }] )
|
||||
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
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
2012-07-13 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* 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 <jan.h.d@swipnet.se>
|
||||
|
||||
* nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
#undef _longjmp /* use system versions, not conservative aliases */
|
||||
#undef _setjmp
|
||||
|
||||
#undef SETUP_SLAVE_PTY
|
||||
|
||||
#ifdef emacs
|
||||
char *_getpty();
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -52,11 +52,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue