diff options
author | Mark Kettenis <kettenis@gnu.org> | 2004-10-14 13:19:30 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2004-10-14 13:19:30 +0000 |
commit | 3e3a28f1f2301983cfa6ffe094ecf1e71e3b9db8 (patch) | |
tree | ec7a4e6dbe0d9746d4c873fc225cc640be8fede9 | |
parent | afd7a018c9e949ee9f1126ae4517567bd9d2dcb1 (diff) | |
download | fsf-binutils-gdb-3e3a28f1f2301983cfa6ffe094ecf1e71e3b9db8.zip fsf-binutils-gdb-3e3a28f1f2301983cfa6ffe094ecf1e71e3b9db8.tar.gz fsf-binutils-gdb-3e3a28f1f2301983cfa6ffe094ecf1e71e3b9db8.tar.bz2 |
* source.c: Always define O_BINARY to 0 if not defined already.
(openp): Unconditionally use O_BINARY.
-rw-r--r-- | gdb/ChangeLog | 3 | ||||
-rw-r--r-- | gdb/source.c | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6da59cd..17570bd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/source.c b/gdb/source.c index e2b6fa9..f0dc554 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -46,16 +46,16 @@ #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)) { |