2009-03-02 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / metadata / console-io.c
index 67b23c9e1161859054c3376d5b4ad4813e937de7..42bd547d7d869665834270f700d99f8ce6e486b5 100644 (file)
@@ -1,11 +1,10 @@
-
 /*
  * console-io.c: ConsoleDriver internal calls
  *
  * Author:
  *     Gonzalo Paniagua Javier (gonzalo@ximian.com)
  *
- * Copyright (C) 2005 Novell, Inc. (http://www.novell.com)
+ * Copyright (C) 2005-2008 Novell, Inc. (http://www.novell.com)
  */
 
 #include <config.h>
@@ -41,8 +40,8 @@
 #ifdef HAVE_SYS_FILIO_H
 #include <sys/filio.h>
 #endif
-#ifndef PLATFORM_WIN32
 #ifndef TIOCGWINSZ
+#ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
 #endif
 #endif
@@ -64,7 +63,7 @@ static gchar *keypad_xmit_str;
 static struct termios mono_attr;
 #endif
 
-#ifdef PLATFORM_WIN32
+#if defined (PLATFORM_WIN32) || defined (MONO_NULL_TTYDRIVER)
 MonoBoolean
 ves_icall_System_ConsoleDriver_Isatty (HANDLE handle)
 {
@@ -316,6 +315,7 @@ console_set_signal_handlers ()
 
        memset (&sigcont, 0, sizeof (struct sigaction));
        memset (&sigint, 0, sizeof (struct sigaction));
+       memset (&sigwinch, 0, sizeof (struct sigaction));
        
        // Continuing
        sigcont.sa_handler = (void *) sigcont_handler;