b78338a9a4e6c6baae0e56e675a299fd6d040588
[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 #include <spin.h>
57
58 #ifdef MPW_C
59
60 #undef __PTR_TO_INT
61 #define __PTR_TO_INT(P) ((int)(P))
62 #undef __INT_TO_PTR
63 #define __INT_TO_PTR(P) ((char *)(P))
64
65 #endif
66
67 #define NO_FCNTL
68
69 int fstat ();
70
71 FILE *mpw_fopen ();
72 int mpw_fseek ();
73 void mpw_abort ();
74
75 /* Map these standard functions to improved versions in libiberty. */
76
77 #define fopen mpw_fopen
78 #define fseek mpw_fseek
79 #define abort mpw_abort
80
81 #ifndef TRUE_FALSE_ALREADY_DEFINED
82 #define TRUE_FALSE_ALREADY_DEFINED
83 #endif
84
85 #define POSIX_UTIME
86
87 #define LOSING_TOTALLY
88
89 /* Define this so that files will be closed before being unlinked. */
90
91 #define CLOSE_BEFORE_UNLINK
92
93 #endif /* hosts_mpw_H */
This page took 0.032659 seconds and 3 git commands to generate.