blob: 34af235a9517c7f615161b3bffc43e324e146862 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
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
|