00001
00002
00003 #ifndef __INCLUDE_MPW_H
00004 #define __INCLUDE_MPW_H
00005
00006 #ifndef MPW
00007 #define MPW
00008 #endif
00009
00010
00011
00012
00013 #ifndef ALMOST_STDC
00014 #define ALMOST_STDC
00015 #endif
00016
00017 #include <stdio.h>
00018 #include <ctype.h>
00019 #include <errno.h>
00020
00021 #define HAVE_TIME_T_IN_TIME_H 1
00022
00023 #define HAVE_STDLIB_H 1
00024
00025 #define HAVE_ERRNO_H 1
00026
00027 #define HAVE_STDDEF_H 1
00028
00029 #define HAVE_STRING_H 1
00030
00031 #define HAVE_STDARG_H 1
00032
00033 #define HAVE_VPRINTF 1
00034
00035 #ifdef USE_MW_HEADERS
00036
00037 #include <unix.h>
00038
00039 #else
00040
00041 #include <fcntl.h>
00042 #include <ioctl.h>
00043 #include <sys/stat.h>
00044
00045 #define HAVE_FCNTL_H 1
00046
00047 #ifndef O_ACCMODE
00048 #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
00049 #endif
00050
00051 #ifndef fileno
00052 #define fileno(fp) ((fp)->_file)
00053 #endif
00054
00055
00056
00057 #ifdef __STDC__
00058 FILE *fdopen(int fildes, const char *mode);
00059 #endif
00060
00061 #endif
00062
00063
00064
00065 #ifndef EIO
00066 #define EIO 96
00067 #endif
00068 #ifndef ENOENT
00069 #define ENOENT 97
00070 #endif
00071 #ifndef EACCES
00072 #define EACCES 98
00073 #endif
00074 #ifndef ENOSYS
00075 #define ENOSYS 99
00076 #endif
00077
00078 #ifndef R_OK
00079 #define R_OK 4
00080 #define W_OK 2
00081 #define X_OK 1
00082 #endif
00083
00084
00085
00086
00087 #define USE_BINARY_FOPEN
00088
00089 #include <spin.h>
00090
00091 #ifdef MPW_C
00092 #undef __PTR_TO_INT
00093 #define __PTR_TO_INT(P) ((int)(P))
00094 #undef __INT_TO_PTR
00095 #define __INT_TO_PTR(P) ((char *)(P))
00096 #endif
00097
00098 #define NO_FCNTL
00099
00100 int fstat ();
00101
00102 FILE *mpw_fopen ();
00103 int mpw_fseek ();
00104 int mpw_fread ();
00105 int mpw_fwrite ();
00106 int mpw_access ();
00107 int mpw_open ();
00108 int mpw_creat ();
00109 void mpw_abort (void);
00110
00111
00112
00113 #define fopen mpw_fopen
00114 #define fseek mpw_fseek
00115 #define fread mpw_fread
00116 #define fwrite mpw_fwrite
00117 #define open mpw_open
00118 #define access mpw_access
00119 #define creat mpw_creat
00120 #define abort mpw_abort
00121
00122 #define POSIX_UTIME
00123
00124 #define LOSING_TOTALLY
00125
00126
00127
00128 #define CLOSE_BEFORE_UNLINK
00129
00130 #endif