#ifndef _BIN_SYSDEP_H
#define _BIN_SYSDEP_H
+#include "config.h"
#include "ansidecl.h"
#include <stdio.h>
#include <sys/types.h>
#include "bfdver.h"
-#include "config.h"
#include <stdarg.h>
#include "fopen-same.h"
#endif
+#ifndef O_BINARY
+#ifdef _O_BINARY
+#define O_BINARY _O_BINARY
+#else
+#define O_BINARY 0
+#endif
+#endif
+
#include <errno.h>
#ifndef errno
extern int errno;