* hosts/mpw.h (SEEK_SET, SEEK_CUR, BYTES_IN_PRINTF_INT):
[deliverable/binutils-gdb.git] / bfd / hosts / mpw.h
1 /* Mac 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 /* This bit of ugliness works around the stupid and useless definitions
18 of true and false in BFD header files. */
19
20 #ifdef BFD_TRUE_FALSE
21 #ifndef false
22 #define false mpw_false
23 #endif
24 #ifndef true
25 #define true mpw_true
26 #endif
27 #endif
28
29 #include <stdlib.h>
30 #include <errno.h>
31 #include <stdio.h>
32 #include <ctype.h>
33 #include <string.h>
34 #include <fcntl.h>
35
36 #include <sys/stat.h>
37
38 #ifndef O_ACCMODE
39 #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
40 #endif
41
42 /* Binary files have different characteristics; for instance, no cr/nl
43 translation. */
44
45 #include "fopen-bin.h"
46
47 #include <stddef.h>
48
49 #include <spin.h>
50
51 #ifdef MPW_C
52
53 #undef __PTR_TO_INT
54 #define __PTR_TO_INT(P) ((int)(P))
55 #undef __INT_TO_PTR
56 #define __INT_TO_PTR(P) ((char *)(P))
57
58 #endif
59
60 #define NO_FCNTL
61
62 int fstat ();
63
64 FILE *mpw_fopen ();
65 int mpw_fseek ();
66 int mpw_fread ();
67 int mpw_fwrite ();
68 void mpw_abort ();
69
70 /* Map these standard functions to improved versions in libiberty. */
71
72 #define fopen mpw_fopen
73 #define fseek mpw_fseek
74 #define fread mpw_fread
75 #define fwrite mpw_fwrite
76 #define abort mpw_abort
77
78 #ifndef TRUE_FALSE_ALREADY_DEFINED
79 #define TRUE_FALSE_ALREADY_DEFINED
80 #endif
81
82 #define POSIX_UTIME
83
84 #define LOSING_TOTALLY
85
86 /* Define this so that files will be closed before being unlinked. */
87
88 #define CLOSE_BEFORE_UNLINK
89
90 #endif /* hosts_mpw_H */
This page took 0.063045 seconds and 5 git commands to generate.