# HG changeset patch # User Karl Heuer # Date 799033382 0 # Node ID 3b2dacb1bfe96b2285bd36f302a2b99eafa7eaf7 # Parent 23e8d67edd9d810a35b03effee96417e7da4a6ea (create_process): Don't reference pty_name if !HAVE_PTYS. diff -r 23e8d67edd9d -r 3b2dacb1bfe9 src/process.c --- a/src/process.c Fri Apr 28 01:26:00 1995 +0000 +++ b/src/process.c Fri Apr 28 01:43:02 1995 +0000 @@ -248,12 +248,11 @@ /* Maximum number of bytes to send to a pty without an eof. */ static int pty_max_bytes; -/* Open an available pty, returning a file descriptor. - Return -1 on failure. - The file name of the terminal corresponding to the pty - is left in the variable pty_name. */ +#ifdef HAVE_PTYS +/* The file name of the pty opened by allocate_pty. */ static char pty_name[24]; +#endif /* Compute the Lisp form of the process status, p->status, from the numeric status that was returned by `wait'. */ @@ -363,6 +362,11 @@ #ifdef HAVE_PTYS +/* Open an available pty, returning a file descriptor. + Return -1 on failure. + The file name of the terminal corresponding to the pty + is left in the variable pty_name. */ + int allocate_pty () { @@ -1499,7 +1503,12 @@ if (forkin != forkout && forkout >= 0) close (forkout); - XPROCESS (process)->tty_name = pty_flag ? build_string (pty_name) : Qnil; +#ifdef HAVE_PTYS + if (pty_flag) + XPROCESS (process)->tty_name = build_string (pty_name); + else +#endif + XPROCESS (process)->tty_name = Qnil; #ifdef SIGCHLD #ifdef BSD4_1