]>
Commit | Line | Data |
---|---|---|
848743c1 SS |
1 | /* MPW host-specific definitions. */ |
2 | ||
d60e8a54 | 3 | #ifndef hosts_mpw_H |
848743c1 | 4 | #define hosts_mpw_H |
d60e8a54 SS |
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> | |
d60e8a54 SS |
31 | #include <fcntl.h> |
32 | ||
848743c1 SS |
33 | #include <sys/stat.h> |
34 | ||
d60e8a54 SS |
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 | |
d60e8a54 SS |
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 | ||
d60e8a54 SS |
65 | #define NO_FCNTL |
66 | ||
30d7f715 SS |
67 | int fstat (); |
68 | ||
d60e8a54 | 69 | FILE *mpw_fopen (); |
d60e8a54 SS |
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 | |
d60e8a54 SS |
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 | ||
848743c1 | 90 | #ifndef TRUE_FALSE_ALREADY_DEFINED |
d60e8a54 | 91 | #define TRUE_FALSE_ALREADY_DEFINED |
848743c1 SS |
92 | #endif |
93 | ||
94 | #define POSIX_UTIME | |
d60e8a54 SS |
95 | |
96 | #define LOSING_TOTALLY | |
97 | ||
848743c1 | 98 | #endif /* hosts_mpw_H */ |