configure.in -- decide whether to configure gdb.hp; configure -- regenerated.
[deliverable/binutils-gdb.git] / gdb / gdbtk.c
index c59821f992a98fa6c28a5aec73278d1d717cbef1..a15eccb14890915a17a2b47371992ae2ea922b17 100644 (file)
@@ -71,7 +71,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "annotate.h"
 #include <sys/time.h>
 
-/* For Cygwin32, we use a timer to periodically check for Windows
+#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.
    Unfortunately, that will be a lot of work.  */
@@ -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;
@@ -110,11 +114,6 @@ int gdb_context = 0;
  */
 int running_now;
 
-/* This variable determines where memory used for disassembly is read from.
- * See note in gdbtk.h for details.
- */
-int disassemble_from_exec = -1;
-
 /* This variable holds the name of a Tcl file which should be sourced by the
    interpreter when it goes idle at startup. Used with the testsuite. */
 static char *gdbtk_source_filename = NULL;
@@ -334,12 +333,12 @@ gdbtk_init ( argv0 )
      causing gdb to abort.  If instead we simply return here, gdb will
      gracefully degrade to using the command line interface. */
 
-#ifndef WINNT
+#ifndef _WIN32
   if (getenv ("DISPLAY") == NULL)
     return;
 #endif
 
-  old_chain = make_cleanup (cleanup_init, 0);
+  old_chain = make_cleanup ((make_cleanup_func) cleanup_init, 0);
 
   /* First init tcl and tk. */
   Tcl_FindExecutable (argv0); 
@@ -449,7 +448,7 @@ gdbtk_init ( argv0 )
    * These are the commands to do some Windows Specific stuff...
    */
   
-#ifdef __CYGWIN32__
+#ifdef __CYGWIN__
   if (ide_create_messagebox_command (gdbtk_interp) != TCL_OK)
     error ("messagebox command initialization failed");
   /* On Windows, create a sizebox widget command */
@@ -491,9 +490,6 @@ gdbtk_init ( argv0 )
   add_com ("tk", class_obscure, tk_command,
           "Send a command directly into tk.");
 
-  Tcl_LinkVar (gdbtk_interp, "disassemble-from-exec", (char *) &disassemble_from_exec,
-              TCL_LINK_INT);
-
   /* find the gdb tcl library and source main.tcl */
 
   gdbtk_lib = getenv ("GDBTK_LIBRARY");
@@ -573,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,15 +686,14 @@ _initialize_gdbtk ()
       /* Tell the rest of the world that Gdbtk is now set up. */
 
       init_ui_hook = gdbtk_init;
-#ifdef __CYGWIN32__
+#ifdef __CYGWIN__
       (void) FreeConsole ();
 #endif
     }
-#ifdef __CYGWIN32__
+#ifdef __CYGWIN__
   else
     {
       DWORD ft = GetFileType (GetStdHandle (STD_INPUT_HANDLE));
-      void cygwin32_attach_handle_to_fd (char *, int, HANDLE, int, int);
 
       switch (ft)
        {
This page took 0.033988 seconds and 4 git commands to generate.