;;
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
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
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");