diff options
author | Glenn Morris <rgm@gnu.org> | 2012-07-13 17:45:55 -0400 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2012-07-13 17:45:55 -0400 |
commit | 33d63ff4db56fb6e2fad2ac145031fb7328d16f2 (patch) | |
tree | 5d31179e7438a576449b3636796ff53b1d4c03b9 /configure.ac | |
parent | 7f5b319886fac0bf379dada4a8c2cbd8dc4fe3c7 (diff) | |
download | emacs-33d63ff4db56fb6e2fad2ac145031fb7328d16f2.tar.gz |
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.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index b59da4ff02e..b6a8b99e52b 100644 --- a/configure.ac +++ b/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 |