NS32K changes from Ian Dall.
[deliverable/binutils-gdb.git] / bfd / hosts / mpw.h
1 /* MPW host-specific definitions. */
2
3 #ifndef hosts_mpw_H
4 #define hosts_mpw_H
5
6 #ifndef MPW
7 #define MPW
8 #endif
9
10 /* MPW C is basically ANSI, but doesn't actually enable __STDC__,
11 nor does it allow __STDC__ to be #defined. */
12
13 #ifndef ALMOST_STDC
14 #define ALMOST_STDC
15 #endif
16
17 #ifdef BFD_TRUE_FALSE
18 #ifndef false
19 #define false mpw_false
20 #endif
21 #ifndef true
22 #define true mpw_true
23 #endif
24 #endif
25
26 #include <stdlib.h>
27 #include <errno.h>
28 #include <stdio.h>
29 #include <ctype.h>
30 #include <string.h>
31 #include <fcntl.h>
32
33 #include <sys/stat.h>
34
35 #ifndef O_ACCMODE
36 #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
37 #endif
38 #ifndef SEEK_SET
39 #define SEEK_SET 0
40 #endif
41 #ifndef SEEK_CUR
42 #define SEEK_CUR 1
43 #endif
44
45 #ifndef BYTES_IN_PRINTF_INT
46 #define BYTES_IN_PRINTF_INT 4
47 #endif
48
49 /* Binary files have different characteristics; for instance, no cr/nl
50 translation. */
51
52 #include "fopen-bin.h"
53
54 #include <stddef.h>
55
56 #ifdef MPW_C
57
58 #undef __PTR_TO_INT
59 #define __PTR_TO_INT(P) ((int)(P))
60 #undef __INT_TO_PTR
61 #define __INT_TO_PTR(P) ((char *)(P))
62
63 #endif
64
65 #define NO_FCNTL
66
67 int fstat ();
68
69 FILE *mpw_fopen ();
70 int mpw_fseek ();
71 void mpw_abort ();
72
73 /* Map these standard functions to improved versions in libiberty. */
74
75 #define fopen mpw_fopen
76 #define fseek mpw_fseek
77 #define abort mpw_abort
78
79 /* Define as macros so as to mask the previous enum. */
80
81 #ifndef BFD_TRUE_FALSE
82 #ifndef false
83 #define false ffalse
84 #endif
85 #ifndef true
86 #define true ttrue
87 #endif
88 #endif
89
90 #ifndef TRUE_FALSE_ALREADY_DEFINED
91 #define TRUE_FALSE_ALREADY_DEFINED
92 #endif
93
94 #define POSIX_UTIME
95
96 #define LOSING_TOTALLY
97
98 /* Define this so that files will be closed before being unlinked. */
99
100 #define CLOSE_BEFORE_UNLINK
101
102 #endif /* hosts_mpw_H */
This page took 0.036434 seconds and 4 git commands to generate.