1995-03-04 00:47:01 +00:00
|
|
|
/* Mac MPW host-specific definitions. */
|
1994-02-15 20:48:53 +00:00
|
|
|
|
1994-01-04 00:34:05 +00:00
|
|
|
#ifndef hosts_mpw_H
|
1994-02-15 20:48:53 +00:00
|
|
|
#define hosts_mpw_H
|
1994-01-04 00:34:05 +00:00
|
|
|
|
|
|
|
#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
|
|
|
|
|
1995-03-04 00:47:01 +00:00
|
|
|
/* This bit of ugliness works around the stupid and useless definitions
|
|
|
|
of true and false in BFD header files. */
|
|
|
|
|
1994-01-04 00:34:05 +00:00
|
|
|
#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>
|
|
|
|
|
1994-02-15 20:48:53 +00:00
|
|
|
#include <sys/stat.h>
|
|
|
|
|
1994-01-04 00:34:05 +00:00
|
|
|
#ifndef O_ACCMODE
|
|
|
|
#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Binary files have different characteristics; for instance, no cr/nl
|
|
|
|
translation. */
|
|
|
|
|
|
|
|
#include "fopen-bin.h"
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
1994-12-15 22:08:53 +00:00
|
|
|
#include <spin.h>
|
|
|
|
|
1994-01-04 00:34:05 +00:00
|
|
|
#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
|
|
|
|
|
|
|
|
#define NO_FCNTL
|
|
|
|
|
1994-02-24 00:56:32 +00:00
|
|
|
int fstat ();
|
|
|
|
|
1994-01-04 00:34:05 +00:00
|
|
|
FILE *mpw_fopen ();
|
|
|
|
int mpw_fseek ();
|
1995-03-04 00:47:01 +00:00
|
|
|
int mpw_fread ();
|
|
|
|
int mpw_fwrite ();
|
1994-01-04 00:34:05 +00:00
|
|
|
void mpw_abort ();
|
|
|
|
|
|
|
|
/* Map these standard functions to improved versions in libiberty. */
|
|
|
|
|
|
|
|
#define fopen mpw_fopen
|
|
|
|
#define fseek mpw_fseek
|
1995-03-04 00:47:01 +00:00
|
|
|
#define fread mpw_fread
|
|
|
|
#define fwrite mpw_fwrite
|
1994-01-04 00:34:05 +00:00
|
|
|
#define abort mpw_abort
|
|
|
|
|
1994-02-15 20:48:53 +00:00
|
|
|
#ifndef TRUE_FALSE_ALREADY_DEFINED
|
1994-01-04 00:34:05 +00:00
|
|
|
#define TRUE_FALSE_ALREADY_DEFINED
|
1994-02-15 20:48:53 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#define POSIX_UTIME
|
1994-01-04 00:34:05 +00:00
|
|
|
|
|
|
|
#define LOSING_TOTALLY
|
|
|
|
|
1994-04-06 00:55:51 +00:00
|
|
|
/* Define this so that files will be closed before being unlinked. */
|
|
|
|
|
|
|
|
#define CLOSE_BEFORE_UNLINK
|
|
|
|
|
1994-02-15 20:48:53 +00:00
|
|
|
#endif /* hosts_mpw_H */
|