* source.c: Always define O_BINARY to 0 if not defined already.
authorMark Kettenis <kettenis@gnu.org>
Thu, 14 Oct 2004 13:19:30 +0000 (13:19 +0000)
committerMark Kettenis <kettenis@gnu.org>
Thu, 14 Oct 2004 13:19:30 +0000 (13:19 +0000)
(openp): Unconditionally use O_BINARY.

gdb/ChangeLog
gdb/source.c

index 6da59cda12c6bdaf78a11837e97370246816db17..17570bdcbe0a2c95603132f1226c68e6c4e2b5a1 100644 (file)
@@ -1,5 +1,8 @@
 2004-10-14  Mark Kettenis  <kettenis@gnu.org>
 
+       * source.c: Always define O_BINARY to 0 if not defined already.
+       (openp): Unconditionally use O_BINARY.
+
        * top.c (gdb_readline): Always accept "\r\n" as a line-ending.
        * event-top.c (gdb_readline2): Likewise.
 
index e2b6fa90f67a7db725c0d6dbb9e20705a4f2a330..f0dc5542b8e387525298cf1beaba0b1605f08e3b 100644 (file)
 #include "ui-out.h"
 #include "readline/readline.h"
 
+#ifndef O_BINARY
+#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.  */
 
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-
 #define OPEN_MODE (O_RDONLY | O_BINARY)
 #define FDOPEN_MODE FOPEN_RB
 
@@ -674,9 +674,7 @@ openp (const char *path, int opts, const char *string,
   if (!path)
     path = ".";
 
-#if defined(_WIN32) || defined(__CYGWIN__)
   mode |= O_BINARY;
-#endif
 
   if ((opts & OPF_TRY_CWD_FIRST) || IS_ABSOLUTE_PATH (string))
     {
This page took 0.031386 seconds and 4 git commands to generate.