#include "macstat.h"
-#ifndef __MWERKS__
+#ifdef __MWERKS__
+/* For CodeWarrior 4 also define CW4 */
+#include <unix.h>
+#else
#include <fcntl.h>
#endif
return mac_1str(args, chdir);
}
-#ifndef __MWERKS__
+#ifndef CW4
static object *
mac_close(self, args)
object *self;
return d;
}
-#ifndef __MWERKS__
+#ifndef CW4
static object *
mac_lseek(self, args)
object *self;
return mac_error();
return newintobject(res);
}
-#endif /* !__MWERKS__ */
+#endif /* !CW4 */
static object *
mac_mkdir(self, args)
return mac_strint(args, mkdir);
}
-#ifndef __MWERKS__
+#ifndef CW4
static object *
mac_open(self, args)
object *self;
return mac_1str(args, (int (*)(const char *))unlink);
}
-#ifndef __MWERKS__
+#ifndef CW4
static object *
mac_write(self, args)
object *self;
static struct methodlist mac_methods[] = {
{"chdir", mac_chdir},
-#ifndef __MWERKS__
+#ifndef CW4
{"close", mac_close},
#endif
#ifdef MPW
{"getbootvol", mac_getbootvol}, /* non-standard */
{"getcwd", mac_getcwd},
{"listdir", mac_listdir},
-#ifndef __MWERKS__
+#ifndef CW4
{"lseek", mac_lseek},
#endif
{"mkdir", mac_mkdir},
-#ifndef __MWERKS__
+#ifndef CW4
{"open", mac_open},
{"read", mac_read},
#endif
{"stat", mac_stat},
{"sync", mac_sync},
{"unlink", mac_unlink},
-#ifndef __MWERKS__
+#ifndef CW4
{"write", mac_write},
#endif
#ifdef MALLOC_DEBUG