aboutsummaryrefslogtreecommitdiff
path: root/bfd/hosts/mpw.h
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1994-01-04 00:34:05 +0000
committerStan Shebs <shebs@codesourcery.com>1994-01-04 00:34:05 +0000
commitd60e8a540e68e47222cddaacb43ed5775e582400 (patch)
tree655838e1781ae51951390e33f4d32bf551b4ea36 /bfd/hosts/mpw.h
parent83acd9a2182285014e3e6dd1fdb30d7299c7cce2 (diff)
downloadgdb-d60e8a540e68e47222cddaacb43ed5775e582400.zip
gdb-d60e8a540e68e47222cddaacb43ed5775e582400.tar.gz
gdb-d60e8a540e68e47222cddaacb43ed5775e582400.tar.bz2
Mon Jan 3 10:59:28 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-config.in: New file, MPW version of configure.in. * mpw-make.in: New file, MPW version of Makefile.in. * hosts/mpw.h: New file, MPW host definitions.
Diffstat (limited to 'bfd/hosts/mpw.h')
-rw-r--r--bfd/hosts/mpw.h110
1 files changed, 110 insertions, 0 deletions
diff --git a/bfd/hosts/mpw.h b/bfd/hosts/mpw.h
new file mode 100644
index 0000000..34af235
--- /dev/null
+++ b/bfd/hosts/mpw.h
@@ -0,0 +1,110 @@
+#ifndef hosts_mpw_H
+
+#ifndef MPW
+#define MPW
+#endif
+
+/* MPW C is basically ANSI, but doesn't actually enable __STDC__,
+ nor does it allow __STDC__ to be #defined. */
+
+#ifndef ALMOST_STDC
+#define ALMOST_STDC
+#endif
+
+#ifdef BFD_TRUE_FALSE
+#ifndef false
+#define false mpw_false
+#endif
+#ifndef true
+#define true mpw_true
+#endif
+#endif
+
+#include <stdlib.h>
+#include <errno.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+
+#include <fcntl.h>
+
+#ifndef O_ACCMODE
+#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
+#endif
+#ifndef SEEK_SET
+#define SEEK_SET 0
+#endif
+#ifndef SEEK_CUR
+#define SEEK_CUR 1
+#endif
+/*#include <string.h>*/
+
+#ifndef BYTES_IN_PRINTF_INT
+#define BYTES_IN_PRINTF_INT 4
+#endif
+
+/* Binary files have different characteristics; for instance, no cr/nl
+ translation. */
+
+#include "fopen-bin.h"
+
+#include <stddef.h>
+
+#ifdef MPW_C
+
+#undef __PTR_TO_INT
+#define __PTR_TO_INT(P) ((int)(P))
+#undef __INT_TO_PTR
+#define __INT_TO_PTR(P) ((char *)(P))
+
+#endif
+
+typedef short ino_t;
+typedef short dev_t;
+
+struct stat {
+ ino_t st_ino;
+ dev_t st_dev;
+ int st_mode;
+ int st_size;
+ int st_uid;
+ int st_gid;
+ int st_mtime;
+};
+
+#define S_ISREG(m) (0)
+#define S_ISDIR(m) (0)
+
+#define NO_FCNTL
+
+#ifdef __STDIO__
+FILE *mpw_fopen ();
+#endif
+int mpw_fstat ();
+int mpw_fseek ();
+void mpw_abort ();
+
+/* Map these standard functions to improved versions in libiberty. */
+
+#define fopen mpw_fopen
+#define fstat mpw_fstat
+#define fseek mpw_fseek
+#define abort mpw_abort
+
+/* Define as macros so as to mask the previous enum. */
+
+#ifndef BFD_TRUE_FALSE
+#ifndef false
+#define false ffalse
+#endif
+#ifndef true
+#define true ttrue
+#endif
+#endif
+
+#define TRUE_FALSE_ALREADY_DEFINED
+
+#define LOSING_TOTALLY
+
+#define hosts_mpw_H
+#endif