configure.in -- decide whether to configure gdb.hp; configure -- regenerated.
[deliverable/binutils-gdb.git] / gdb / gdbtk.c
index 18a36d571c89a6b656b90f255117c3dfd3fcdb1e..a15eccb14890915a17a2b47371992ae2ea922b17 100644 (file)
@@ -71,6 +71,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "annotate.h"
 #include <sys/time.h>
 
+#ifdef __CYGWIN__
+#include <sys/cygwin.h> /* for cygwin32_attach_handle_to_fd */
+#endif
+
 /* For Cygwin, we use a timer to periodically check for Windows
    messages.  FIXME: It would be better to not poll, but to instead
    rewrite the target_wait routines to serve as input sources.
@@ -95,7 +99,7 @@ int gdbtk_test PARAMS ((char *));
  * way errors will go to stdout.
  */
 
-extern void   gdbtk_fputs PARAMS ((const char *, FILE *));
+extern void   gdbtk_fputs PARAMS ((const char *, GDB_FILE *));
 
 /* Handle for TCL interpreter */
 Tcl_Interp *gdbtk_interp = NULL;
@@ -565,14 +569,17 @@ gdbtk_find_main";
       fputs_unfiltered_hook = NULL; /* Force errors to stdout/stderr */
       if (getenv("GDBTK_LIBRARY"))
        {
-         fprintf_unfiltered (stderr, "Unable to find main.tcl in %s\n",getenv("GDBTK_LIBRARY"));
-         fprintf_unfiltered (stderr, 
+         fprintf_unfiltered (gdb_stderr, "Unable to find main.tcl in %s\n",
+                             getenv("GDBTK_LIBRARY"));
+         fprintf_unfiltered (gdb_stderr, 
                              "Please set GDBTK_LIBRARY to a path that includes the GDB tcl files.\n");
        }
       else
        {
-         fprintf_unfiltered (stderr, "Unable to find main.tcl in %s\n", GDBTK_LIBRARY);
-         fprintf_unfiltered (stderr, "You might want to set GDBTK_LIBRARY\n");   
+         fprintf_unfiltered (gdb_stderr,
+                             "Unable to find main.tcl in %s\n", GDBTK_LIBRARY);
+         fprintf_unfiltered (gdb_stderr,
+                             "You might want to set GDBTK_LIBRARY\n");
        }
       error("");
     }
@@ -687,7 +694,6 @@ _initialize_gdbtk ()
   else
     {
       DWORD ft = GetFileType (GetStdHandle (STD_INPUT_HANDLE));
-      void cygwin_attach_handle_to_fd (char *, int, HANDLE, int, int);
 
       switch (ft)
        {
@@ -697,15 +703,15 @@ _initialize_gdbtk ()
            break;
          default:
            AllocConsole();
-           cygwin_attach_handle_to_fd ("/dev/conin", 0,
-                                       GetStdHandle (STD_INPUT_HANDLE),
-                                       1, GENERIC_READ);
-           cygwin_attach_handle_to_fd ("/dev/conout", 1,
-                                       GetStdHandle (STD_OUTPUT_HANDLE),
-                                       0, GENERIC_WRITE);
-           cygwin_attach_handle_to_fd ("/dev/conout", 2,
-                                       GetStdHandle (STD_ERROR_HANDLE),
-                                       0, GENERIC_WRITE);
+           cygwin32_attach_handle_to_fd ("/dev/conin", 0,
+                                         GetStdHandle (STD_INPUT_HANDLE),
+                                         1, GENERIC_READ);
+           cygwin32_attach_handle_to_fd ("/dev/conout", 1,
+                                         GetStdHandle (STD_OUTPUT_HANDLE),
+                                         0, GENERIC_WRITE);
+           cygwin32_attach_handle_to_fd ("/dev/conout", 2,
+                                         GetStdHandle (STD_ERROR_HANDLE),
+                                         0, GENERIC_WRITE);
            break;
        }
     }
This page took 0.025242 seconds and 4 git commands to generate.