aboutsummaryrefslogtreecommitdiffstats
path: root/src/callproc.c
diff options
context:
space:
mode:
authorDan Nicolaescu2010-08-22 08:14:37 -0700
committerDan Nicolaescu2010-08-22 08:14:37 -0700
commita7ebc409279c0d41ad60655d360d6c3c04ae77a1 (patch)
treefe0cb3183e7b5e5e677f015e88e3666ba8d4835b /src/callproc.c
parent91bdeb6639bb1613eb91d9bb04ef7d8c78dc1d9d (diff)
downloademacs-a7ebc409279c0d41ad60655d360d6c3c04ae77a1.tar.gz
emacs-a7ebc409279c0d41ad60655d360d6c3c04ae77a1.zip
Simplify termio code.
All non-MSDOS non-WINDOWSNT platforms define HAVE_TERMIOS, so HAVE_TERMIO code is obsolete. Replace HAVE_TERMIOS conditionals with !DOS_NT. * src/systty.h: Do not define HAVE_TCATTR. Remove HAVE_TERMIO, HAVE_LTCHARS and HAVE_TCHARS code. Do not define EMACS_HAVE_TTY_PGRP. Only define EMACS_GET_TTY_PGRP for !DOS_NT. * src/sysdep.c: Include sysselect.h unconditionally. Do not include sys/ioctl.h and termios.h, systty.h does it. Use HAVE_SYS_UTSNAME_H instead of USG as an include guard. (init_baud_rate): Remove HAVE_TERMIO code. (child_setup_tty): Remove HAVE_TERMIO code. (emacs_get_tty, emacs_set_tty): Remove HAVE_TERMIO, HAVE_TCHARS and HAVE_LTCHARS code. Use !DOS_NT instead of HAVE_TCATTR. (new_ltchars, new_tchars): Remove, unused. (init_sys_modes): Remove HAVE_TERMIO, HAVE_TCHARS and HAVE_LTCHARS code. Remove special casing for __mips__, it was a no-op. Remove HAVE_TCATTR conditional, it is implied by HAVE_TERMIOS. (init_sys_modes): Remove HPUX special case. * src/process.c: Include stdlib.h unconditionally. Do not include fcntl.h, systty.h does it. Remove conditional code for HAVE_SERIAL, it is always true. (process_send_signal): Remove HAVE_TERMIOS conditional, it's always true when SIGNALS_VIA_CHARACTERS is true. (Fcontinue_process, Fprocess_send_eof): Simplify conditionals: !WINDOWSNT means HAVE_TERMIOS. (create_process): Remove HAVE_TERMIOS, it's inside a HAVE_PTYS conditional, which is true for all HAVE_TERMIOS systems. * src/keyboard.c (init_keyboard): Do not use HAVE_TERMIO, use !DOS_NT instead of HAVE_TERMIOS. * src/emacs.c (shut_down_emacs): Use !defined DOS_NT instead of EMACS_HAVE_TTY_PGRP. * src/callproc.c (child_setup): Move EMACS_SET_TTY_PGRP use to the non-MSDOS, non-WINDOWSNT code, it's only defined for such systems anyway.
Diffstat (limited to 'src/callproc.c')
-rw-r--r--src/callproc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/callproc.c b/src/callproc.c
index de28ffa42ef..8c1384df6a1 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1231,8 +1231,6 @@ child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L
1231#else 1231#else
1232 setpgrp (pid, pid); 1232 setpgrp (pid, pid);
1233#endif /* USG */ 1233#endif /* USG */
1234 /* setpgrp_of_tty is incorrect here; it uses input_fd. */
1235 EMACS_SET_TTY_PGRP (0, &pid);
1236 1234
1237#ifdef MSDOS 1235#ifdef MSDOS
1238 pid = run_msdos_command (new_argv, pwd_var + 4, in, out, err, env); 1236 pid = run_msdos_command (new_argv, pwd_var + 4, in, out, err, env);
@@ -1251,6 +1249,9 @@ child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L
1251 report_file_error ("Spawning child process", Qnil); 1249 report_file_error ("Spawning child process", Qnil);
1252 return cpid; 1250 return cpid;
1253#else /* not WINDOWSNT */ 1251#else /* not WINDOWSNT */
1252 /* setpgrp_of_tty is incorrect here; it uses input_fd. */
1253 EMACS_SET_TTY_PGRP (0, &pid);
1254
1254 /* execvp does not accept an environment arg so the only way 1255 /* execvp does not accept an environment arg so the only way
1255 to pass this environment is to set environ. Our caller 1256 to pass this environment is to set environ. Our caller
1256 is responsible for restoring the ambient value of environ. */ 1257 is responsible for restoring the ambient value of environ. */