aboutsummaryrefslogtreecommitdiff
path: root/gdb/defs.h
diff options
context:
space:
mode:
authorCharles Wilson <cygwin@cwilson.fastmail.fm>2006-02-25 04:36:39 +0000
committerCharles Wilson <cygwin@cwilson.fastmail.fm>2006-02-25 04:36:39 +0000
commit637d6690a829770987bd4433aacb157fc59ffb77 (patch)
tree9353b781dfa9d5458cd39b152ec56c8a89ec795e /gdb/defs.h
parent83d634e3da41ad929375686dbb12ee4e3ce60101 (diff)
downloadfsf-binutils-gdb-637d6690a829770987bd4433aacb157fc59ffb77.zip
fsf-binutils-gdb-637d6690a829770987bd4433aacb157fc59ffb77.tar.gz
fsf-binutils-gdb-637d6690a829770987bd4433aacb157fc59ffb77.tar.bz2
* gdb/defs.h: unconditionally include <fcntl.h>, 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
Diffstat (limited to 'gdb/defs.h')
-rw-r--r--gdb/defs.h12
1 files changed, 12 insertions, 0 deletions
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 <unistd.h>
#endif
+#include <fcntl.h>
+
/* 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 <stdarg.h> /* For va_list. */
#include "libiberty.h"