aboutsummaryrefslogtreecommitdiff
path: root/gdb/defs.h
diff options
context:
space:
mode:
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"