diff options
| author | Glenn Morris | 2012-07-13 17:45:55 -0400 |
|---|---|---|
| committer | Glenn Morris | 2012-07-13 17:45:55 -0400 |
| commit | 33d63ff4db56fb6e2fad2ac145031fb7328d16f2 (patch) | |
| tree | 5d31179e7438a576449b3636796ff53b1d4c03b9 | |
| parent | 7f5b319886fac0bf379dada4a8c2cbd8dc4fe3c7 (diff) | |
| download | emacs-33d63ff4db56fb6e2fad2ac145031fb7328d16f2.tar.gz emacs-33d63ff4db56fb6e2fad2ac145031fb7328d16f2.zip | |
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.
| -rw-r--r-- | configure.ac | 18 | ||||
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/s/irix6-5.h | 2 | ||||
| -rw-r--r-- | src/s/usg5-4-common.h | 8 |
4 files changed, 17 insertions, 16 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 | |||
| 3412 | ;; | 3412 | ;; |
| 3413 | 3413 | ||
| 3414 | sol2* ) | 3414 | sol2* ) |
| 3415 | dnl This change means that we don't loop through allocate_pty too | ||
| 3416 | dnl many times in the (rare) event of a failure. | ||
| 3417 | AC_DEFINE(FIRST_PTY_LETTER, ['z']) | ||
| 3418 | AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptmx");] ) | ||
| 3419 | dnl Uses sigblock/sigunblock rather than sighold/sigrelse, | 3415 | dnl Uses sigblock/sigunblock rather than sighold/sigrelse, |
| 3420 | dnl which appear to be BSD4.1 specific. It may also be appropriate | 3416 | dnl which appear to be BSD4.1 specific. It may also be appropriate |
| 3421 | dnl for SVR4.x (x<2) but I'm not sure. fnf@cygnus.com | 3417 | dnl for SVR4.x (x<2) but I'm not sure. fnf@cygnus.com |
| @@ -3425,11 +3421,21 @@ case $opsys in | |||
| 3425 | 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); }] ) | 3421 | 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); }] ) |
| 3426 | ;; | 3422 | ;; |
| 3427 | 3423 | ||
| 3428 | dnl Comments are as per sol2*. | ||
| 3429 | unixware ) | 3424 | unixware ) |
| 3425 | dnl Comments are as per sol2*. | ||
| 3426 | 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); }] ) | ||
| 3427 | ;; | ||
| 3428 | esac | ||
| 3429 | |||
| 3430 | |||
| 3431 | case $opsys in | ||
| 3432 | sol2* | unixware ) | ||
| 3433 | dnl This change means that we don't loop through allocate_pty too | ||
| 3434 | dnl many times in the (rare) event of a failure. | ||
| 3430 | AC_DEFINE(FIRST_PTY_LETTER, ['z']) | 3435 | AC_DEFINE(FIRST_PTY_LETTER, ['z']) |
| 3431 | AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptmx");] ) | 3436 | AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptmx");] ) |
| 3432 | 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); }] ) | 3437 | dnl Push various streams modules onto a PTY channel. Used in process.c. |
| 3438 | 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.]) | ||
| 3433 | ;; | 3439 | ;; |
| 3434 | esac | 3440 | esac |
| 3435 | 3441 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 4a7c481b8b1..9f26c236fed 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-07-13 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it. | ||
| 4 | * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it. | ||
| 5 | |||
| 1 | 2012-07-13 Jan Djärv <jan.h.d@swipnet.se> | 6 | 2012-07-13 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 7 | ||
| 3 | * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP. | 8 | * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP. |
diff --git a/src/s/irix6-5.h b/src/s/irix6-5.h index a7365a76a91..1d1989ad9ac 100644 --- a/src/s/irix6-5.h +++ b/src/s/irix6-5.h | |||
| @@ -22,8 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | #undef _longjmp /* use system versions, not conservative aliases */ | 22 | #undef _longjmp /* use system versions, not conservative aliases */ |
| 23 | #undef _setjmp | 23 | #undef _setjmp |
| 24 | 24 | ||
| 25 | #undef SETUP_SLAVE_PTY | ||
| 26 | |||
| 27 | #ifdef emacs | 25 | #ifdef emacs |
| 28 | char *_getpty(); | 26 | char *_getpty(); |
| 29 | #endif | 27 | #endif |
diff --git a/src/s/usg5-4-common.h b/src/s/usg5-4-common.h index 93a05ebec54..6ead01d3712 100644 --- a/src/s/usg5-4-common.h +++ b/src/s/usg5-4-common.h | |||
| @@ -52,11 +52,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 52 | this is all we need. */ | 52 | this is all we need. */ |
| 53 | #define TIOCSIGSEND TIOCSIGNAL | 53 | #define TIOCSIGSEND TIOCSIGNAL |
| 54 | 54 | ||
| 55 | /* Push various streams modules onto a PTY channel. */ | ||
| 56 | #define SETUP_SLAVE_PTY \ | ||
| 57 | if (ioctl (xforkin, I_PUSH, "ptem") == -1) \ | ||
| 58 | fatal ("ioctl I_PUSH ptem"); \ | ||
| 59 | if (ioctl (xforkin, I_PUSH, "ldterm") == -1) \ | ||
| 60 | fatal ("ioctl I_PUSH ldterm"); \ | ||
| 61 | if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \ | ||
| 62 | fatal ("ioctl I_PUSH ttcompat"); | ||