PR binutils/6449

* objdump.c (slurp_file): Open the file in binary mode.
                * ar.c: Remove conditional definition of O_BINARY.
                * bin2.c: Likewise.
                * rename.c: Likewise.
                * strings.c: Likewise.
                * sysdep.h: Add conditional definition of O_BINARY.
This commit is contained in:
Nick Clifton 2008-04-28 08:30:23 +00:00
parent 03ffc2d0a6
commit 417ed8af83
7 changed files with 24 additions and 23 deletions

View file

@ -964,7 +964,7 @@ static struct print_file_list *print_files;
#define SHOW_PRECEDING_CONTEXT_LINES (5)
/* Read a complete file into memory. */
/* Read a complete file into memory. */
static const char *
slurp_file (const char *fn, size_t *size)
@ -975,7 +975,7 @@ slurp_file (const char *fn, size_t *size)
#endif
const char *map;
struct stat st;
int fd = open (fn, O_RDONLY);
int fd = open (fn, O_RDONLY | O_BINARY);
if (fd < 0)
return NULL;