aboutsummaryrefslogtreecommitdiff
path: root/bfd/hosts/tahoe.h
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1991-12-12 01:21:40 +0000
committerSteve Chamberlain <sac@cygnus>1991-12-12 01:21:40 +0000
commit33b6c26253062c395320fe6b3fee5fbfaa118ef6 (patch)
tree69c5c253826b4b64ae4aca18bfaeaf383fc0562e /bfd/hosts/tahoe.h
parent5af19052119d2b0c6eeb23670395cb30ca363aee (diff)
downloadgdb-33b6c26253062c395320fe6b3fee5fbfaa118ef6.zip
gdb-33b6c26253062c395320fe6b3fee5fbfaa118ef6.tar.gz
gdb-33b6c26253062c395320fe6b3fee5fbfaa118ef6.tar.bz2
Added macros for the 'type' part of an fopen, freopen or fdopen.
<Read|Write>[Update]<Binary file>|<text file> eg: fopen("foo", FOPEN_WB) to open for writing binary. Usefull for vms, dos and who knows what else.
Diffstat (limited to 'bfd/hosts/tahoe.h')
-rw-r--r--bfd/hosts/tahoe.h37
1 files changed, 31 insertions, 6 deletions
diff --git a/bfd/hosts/tahoe.h b/bfd/hosts/tahoe.h
index b8f0788..99147c0 100644
--- a/bfd/hosts/tahoe.h
+++ b/bfd/hosts/tahoe.h
@@ -1,3 +1,5 @@
+/* Tahoe running BSD (post-Reno) Unix. */
+
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
@@ -6,11 +8,20 @@
#include <ctype.h>
#include <string.h>
#include <sys/file.h>
-#ifndef O_ACCMODE
-#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
-#endif
-#define SEEK_SET 0
-#define SEEK_CUR 1
+#include <stdlib.h>
+
+#define FASCIST_FDOPEN
+#define NO_CORE_COMMAND
+
+#undef ALIGN /* They use it, we use it too */
+#include <machine/param.h>
+#undef ALIGN /* They use it, we use it too */
+
+#define HOST_PAGE_SIZE NBPG
+#define HOST_MACHINE_ARCH bfd_arch_tahoe
+
+#define HOST_TEXT_START_ADDR 0
+#define HOST_STACK_END_ADDR KERNBASE
/* EXACT TYPES */
typedef char int8e_type;
@@ -27,4 +38,18 @@ typedef short int16_type;
typedef unsigned short uint16_type;
typedef int int32_type;
typedef unsigned int uint32_type;
-
+/* Macros for the 'type' part of an fopen, freopen or fdopen.
+ <Read|Write>[Update]<Binary file><text file>
+ */
+#define FOPEN_RB "r"
+#define FOPEN_WB "w"
+#define FOPEN_AB "a"
+#define FOPEN_RUB "r+"
+#define FOPEN_WUB "w+"
+#define FOPEN_AUB "a+"
+#define FOPEN_RT "r"
+#define FOPEN_WT "w"
+#define FOPEN_AT "a"
+#define FOPEN_RUT "r+"
+#define FOPEN_WUT "w+"
+#define FOPEN_AUT "a+"