* write.c (relax_segment <rs_space>): Calculate growth using
[deliverable/binutils-gdb.git] / gdb / main.c
index 00767e1c96894e3e1729d234bdc4a7b57046c43f..ad4e3b7f5982d5faecdee1e44a664a2d5f23ce40 100644 (file)
@@ -35,7 +35,8 @@
 #include "gdb_string.h"
 #include "event-loop.h"
 #include "ui-out.h"
-#if defined (TUI) || defined (GDBTK)
+
+#if defined (TUI)
 /* FIXME: cagney/2000-01-31: This #include is to allow older code such
    as that found in the TUI to continue to build. */
 #include "tui/tui-file.h"
@@ -90,7 +91,6 @@ extern int enable_external_editor;
 extern char *external_editor_command;
 
 #ifdef __CYGWIN__
-#include <windows.h>           /* for MAX_PATH */
 #include <sys/cygwin.h>                /* for cygwin32_conv_to_posix_path */
 #endif
 
@@ -199,10 +199,7 @@ captured_main (void *data)
   getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
   current_directory = gdb_dirbuf;
 
-#if defined (TUI) || defined (GDBTK)
-  /* Older code uses the tui_file and fputs_unfiltered_hook().  It
-     should be using a customized UI_FILE object and re-initializing
-     within its own _initialize function.  */
+#if defined (TUI)
   gdb_stdout = tui_fileopen (stdout);
   gdb_stderr = tui_fileopen (stderr);
   gdb_stdlog = gdb_stdout;     /* for moment */
@@ -537,13 +534,13 @@ extern int gdbtk_test (char *);
      *before* all the command line arguments are processed; it sets
      global parameters, which are independent of what file you are
      debugging or what directory you are in.  */
-#ifdef __CYGWIN32__
+#ifdef __CYGWIN__
   {
     char *tmp = getenv ("HOME");
 
     if (tmp != NULL)
       {
-       homedir = (char *) alloca (MAX_PATH + 1);
+       homedir = (char *) alloca (PATH_MAX + 1);
        cygwin32_conv_to_posix_path (tmp, homedir);
       }
     else
@@ -709,13 +706,6 @@ extern int gdbtk_test (char *);
 #endif
     }
 
-  /* The default command loop. 
-     The WIN32 Gui calls this main to set up gdb's state, and 
-     has its own command loop. */
-#if !defined _WIN32 || defined __GNUC__
-  /* GUIs generally have their own command loop, mainloop, or
-     whatever.  This is a good place to gain control because many
-     error conditions will end up here via longjmp(). */
 #if 0
   /* FIXME: cagney/1999-11-06: The original main loop was like: */
   while (1)
@@ -751,7 +741,6 @@ extern int gdbtk_test (char *);
     {
       catch_errors (captured_command_loop, 0, "", RETURN_MASK_ALL);
     }
-#endif
   /* No exit -- exit is through quit_command.  */
 }
 
This page took 0.025395 seconds and 4 git commands to generate.