* config/i386/xm-go32.h: Don't include fopen-bin.h.
authorEli Zaretskii <eliz@gnu.org>
Sat, 13 Nov 2004 17:00:04 +0000 (17:00 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 13 Nov 2004 17:00:04 +0000 (17:00 +0000)
Don't define CRLF_SOURCE_FILES and DIRNAME_SEPARATOR.

* source.c (OPEN_MODE, FDOPEN_MODE): Remove the definitions in the
branch that doesn't define CRLF_SOURCE_FILES; always use
binary-mode open.
(print_source_lines_base, forward_search_command)
(reverse_search_command): Enable the code that accepts DOS-style
CRLF line endings on all platforms (this removes the need for
CRLF_SOURCE_FILES).

* defs.h: (DIRNAME_SEPARATOR) [__MSDOS__]: Define to ';'.

gdb/ChangeLog
gdb/config/i386/xm-go32.h
gdb/defs.h
gdb/source.c

index d86e3c594bc0fb813f2d8e0546a5426284d420a7..8365fdc6bea5f5ccfb7e5e50bb23ea0ec0819c4b 100644 (file)
@@ -1,6 +1,18 @@
 2004-11-13  Eli Zaretskii  <eliz@gnu.org>
 
+       * config/i386/xm-go32.h: Don't include fopen-bin.h.
+       Don't define CRLF_SOURCE_FILES and DIRNAME_SEPARATOR.
+
+       * source.c (OPEN_MODE, FDOPEN_MODE): Remove the definitions in the
+       branch that doesn't define CRLF_SOURCE_FILES; always use
+       binary-mode open.
+       (print_source_lines_base, forward_search_command)
+       (reverse_search_command): Enable the code that accepts DOS-style
+       CRLF line endings on all platforms (this removes the need for
+       CRLF_SOURCE_FILES).
+
        * defs.h: Fix wording of the comment before FOPEN_RB.
+       (DIRNAME_SEPARATOR) [__MSDOS__]: Define to ';'.
 
        * config/djgpp/fnchange.lst: Group renames for opcode directory
        together.
index 3b6b3b02b863512a8aba95bf1aaa9fc9549fba61..168c5d75e2b29dddb46cfb041fc2ea8ea539f4f2 100644 (file)
@@ -18,8 +18,4 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include "fopen-bin.h"
-
 #define GDBINIT_FILENAME "gdb.ini"
-#define CRLF_SOURCE_FILES
-#define DIRNAME_SEPARATOR ';'
index 1d81ee67647edddd5ad7389f61589b32c029b7a1..617af3e8f70ff02e8a179526d3bc5b3b824b4b46 100644 (file)
@@ -1226,6 +1226,12 @@ extern int use_windows;
 /* FIXME, this doesn't work very well if host and executable
    filesystems conventions are different.  */
 
+#ifdef __MSDOS__
+# define CANT_FORK
+# define GLOBAL_CURDIR
+# define DIRNAME_SEPARATOR ';'
+#endif
+
 #ifndef DIRNAME_SEPARATOR
 #define DIRNAME_SEPARATOR ':'
 #endif
@@ -1234,11 +1240,6 @@ extern int use_windows;
 #define SLASH_STRING "/"
 #endif
 
-#ifdef __MSDOS__
-# define CANT_FORK
-# define GLOBAL_CURDIR
-#endif
-
 /* Provide default definitions of PIDGET, TIDGET, and MERGEPID.
    The name ``TIDGET'' is a historical accident.  Many uses of TIDGET
    in the code actually refer to a lightweight process id, i.e,
index f0dc5542b8e387525298cf1beaba0b1605f08e3b..34ed01c270ec3d11b630eda65b4f458e19d3d12f 100644 (file)
 #define O_BINARY 0
 #endif
 
-#ifdef CRLF_SOURCE_FILES
-
-/* Define CRLF_SOURCE_FILES in an xm-*.h file if source files on the
-   host use \r\n rather than just \n.  Defining CRLF_SOURCE_FILES is
-   much faster than defining LSEEK_NOT_LINEAR.  */
-
 #define OPEN_MODE (O_RDONLY | O_BINARY)
 #define FDOPEN_MODE FOPEN_RB
 
-#else /* ! defined (CRLF_SOURCE_FILES) */
-
-#define OPEN_MODE O_RDONLY
-#define FDOPEN_MODE FOPEN_RT
-
-#endif /* ! defined (CRLF_SOURCE_FILES) */
-
 /* Prototypes for exported functions. */
 
 void _initialize_source (void);
@@ -1263,7 +1250,6 @@ print_source_lines_base (struct symtab *s, int line, int stopline, int noerror)
            }
          else if (c == 0177)
            ui_out_text (uiout, "^?");
-#ifdef CRLF_SOURCE_FILES
          else if (c == '\r')
            {
              /* Skip a \r character, but only before a \n.  */
@@ -1274,7 +1260,6 @@ print_source_lines_base (struct symtab *s, int line, int stopline, int noerror)
              if (c1 != EOF)
                ungetc (c1, stream);
            }
-#endif
          else
            {
              sprintf (buf, "%c", c);
@@ -1462,7 +1447,6 @@ forward_search_command (char *regex, int from_tty)
        }
       while (c != '\n' && (c = getc (stream)) >= 0);
 
-#ifdef CRLF_SOURCE_FILES
       /* Remove the \r, if any, at the end of the line, otherwise
          regular expressions that end with $ or \n won't work.  */
       if (p - buf > 1 && p[-2] == '\r')
@@ -1470,7 +1454,6 @@ forward_search_command (char *regex, int from_tty)
          p--;
          p[-1] = '\n';
        }
-#endif
 
       /* we now have a source line in buf, null terminate and match */
       *p = 0;
@@ -1546,7 +1529,6 @@ reverse_search_command (char *regex, int from_tty)
        }
       while (c != '\n' && (c = getc (stream)) >= 0);
 
-#ifdef CRLF_SOURCE_FILES
       /* Remove the \r, if any, at the end of the line, otherwise
          regular expressions that end with $ or \n won't work.  */
       if (p - buf > 1 && p[-2] == '\r')
@@ -1554,7 +1536,6 @@ reverse_search_command (char *regex, int from_tty)
          p--;
          p[-1] = '\n';
        }
-#endif
 
       /* We now have a source line in buf; null terminate and match.  */
       *p = 0;
This page took 0.033914 seconds and 4 git commands to generate.