From 637d6690a829770987bd4433aacb157fc59ffb77 Mon Sep 17 00:00:00 2001 From: Charles Wilson Date: Sat, 25 Feb 2006 04:36:39 +0000 Subject: * gdb/defs.h: unconditionally include , and ensure that O_BINARY is defined. * gdb/solib.c(solib_open): ensure solib files are opened in binary mode. * gdb/corelow.c: Remove O_BINARY macro definition. * gdb/exec.c: Remove O_BINARY macro definition * gdb/remote-rdp.c: Remove O_BINARY macro definition * gdb/source.c: Remove O_BINARY macro definition * gdb/symfile.c: Remove O_BINARY macro definition --- gdb/defs.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gdb/defs.h') diff --git a/gdb/defs.h b/gdb/defs.h index d983dfc..1512a6a 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -39,6 +39,8 @@ #include #endif +#include + /* First include ansidecl.h so we can use the various macro definitions here and in all subsequent file inclusions. */ @@ -58,6 +60,16 @@ #define SEEK_CUR 1 #endif +/* The O_BINARY flag is defined in fcntl.h on some non-Posix platforms. + It is used as an access modifier in calls to open(), where it acts + similarly to the "b" character in fopen()'s MODE argument. On Posix + platforms it should be a no-op, so it is defined as 0 here. This + ensures that the symbol may be used freely elsewhere in gdb. */ + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + #include /* For va_list. */ #include "libiberty.h" -- cgit v1.1