Rename window-nest to window-combination-limit.
[bpt/emacs.git] / src / sysdep.c
index f97a858..d666f8d 100644 (file)
@@ -854,6 +854,7 @@ void
 init_sys_modes (struct tty_display_info *tty_out)
 {
   struct emacs_tty tty;
+  Lisp_Object terminal;
 
   Vtty_erase_char = Qnil;
 
@@ -907,7 +908,9 @@ init_sys_modes (struct tty_display_info *tty_out)
       tty.main.c_cflag &= ~PARENB;/* Don't check parity */
     }
 #endif
-  if (tty_out->input == stdin)
+
+  XSETTERMINAL(terminal, tty_out->terminal);
+  if (!NILP (Fcontrolling_tty_p (terminal)))
     {
       tty.main.c_cc[VINTR] = quit_char;        /* C-g (usually) gives SIGINT */
       /* Set up C-g for both SIGQUIT and SIGINT.
@@ -1844,7 +1847,11 @@ snprintf (char *buf, size_t bufsize, char const *format, ...)
 
   if (INT_MAX < nbytes)
     {
+#ifdef EOVERFLOW
       errno = EOVERFLOW;
+#else
+      errno = EDOM;
+#endif
       return -1;
     }
   return nbytes;