1
/* Mac MPW host-specific definitions. */
3
#ifndef __INCLUDE_MPW_H
4
#define __INCLUDE_MPW_H
10
/* MPW C is basically ANSI, but doesn't actually enable __STDC__,
11
nor does it allow __STDC__ to be #defined. */
21
#define HAVE_TIME_T_IN_TIME_H 1
23
#define HAVE_STDLIB_H 1
25
#define HAVE_ERRNO_H 1
27
#define HAVE_STDDEF_H 1
29
#define HAVE_STRING_H 1
31
#define HAVE_STDARG_H 1
33
#define HAVE_VPRINTF 1
45
#define HAVE_FCNTL_H 1
48
#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
52
#define fileno(fp) ((fp)->_file)
55
/* stdio.h does not define this if __STDC__, so define here. */
58
FILE *fdopen(int fildes, const char *mode);
61
#endif /* USE_MW_HEADERS */
63
/* Add ersatz definitions, for systems that lack them. */
84
/* Binary files have different characteristics; for instance, no cr/nl
87
#define USE_BINARY_FOPEN
93
#define __PTR_TO_INT(P) ((int)(P))
95
#define __INT_TO_PTR(P) ((char *)(P))
109
void mpw_abort (void);
111
/* Map these standard functions to improved versions in libiberty. */
113
#define fopen mpw_fopen
114
#define fseek mpw_fseek
115
#define fread mpw_fread
116
#define fwrite mpw_fwrite
117
#define open mpw_open
118
#define access mpw_access
119
#define creat mpw_creat
120
#define abort mpw_abort
124
#define LOSING_TOTALLY
126
/* Define this so that files will be closed before being unlinked. */
128
#define CLOSE_BEFORE_UNLINK
130
#endif /* __INCLUDE_MPW_H */