Commit 9eeb82dd authored by Jack Jansen's avatar Jack Jansen

CodeWarrior 5 has more unixisms (open/close/read/write)

parent 17ba43f1
...@@ -45,7 +45,10 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -45,7 +45,10 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "macstat.h" #include "macstat.h"
#ifndef __MWERKS__ #ifdef __MWERKS__
/* For CodeWarrior 4 also define CW4 */
#include <unix.h>
#else
#include <fcntl.h> #include <fcntl.h>
#endif #endif
...@@ -154,7 +157,7 @@ mac_chdir(self, args) ...@@ -154,7 +157,7 @@ mac_chdir(self, args)
return mac_1str(args, chdir); return mac_1str(args, chdir);
} }
#ifndef __MWERKS__ #ifndef CW4
static object * static object *
mac_close(self, args) mac_close(self, args)
object *self; object *self;
...@@ -291,7 +294,7 @@ mac_listdir(self, args) ...@@ -291,7 +294,7 @@ mac_listdir(self, args)
return d; return d;
} }
#ifndef __MWERKS__ #ifndef CW4
static object * static object *
mac_lseek(self, args) mac_lseek(self, args)
object *self; object *self;
...@@ -310,7 +313,7 @@ mac_lseek(self, args) ...@@ -310,7 +313,7 @@ mac_lseek(self, args)
return mac_error(); return mac_error();
return newintobject(res); return newintobject(res);
} }
#endif /* !__MWERKS__ */ #endif /* !CW4 */
static object * static object *
mac_mkdir(self, args) mac_mkdir(self, args)
...@@ -320,7 +323,7 @@ mac_mkdir(self, args) ...@@ -320,7 +323,7 @@ mac_mkdir(self, args)
return mac_strint(args, mkdir); return mac_strint(args, mkdir);
} }
#ifndef __MWERKS__ #ifndef CW4
static object * static object *
mac_open(self, args) mac_open(self, args)
object *self; object *self;
...@@ -432,7 +435,7 @@ mac_unlink(self, args) ...@@ -432,7 +435,7 @@ mac_unlink(self, args)
return mac_1str(args, (int (*)(const char *))unlink); return mac_1str(args, (int (*)(const char *))unlink);
} }
#ifndef __MWERKS__ #ifndef CW4
static object * static object *
mac_write(self, args) mac_write(self, args)
object *self; object *self;
...@@ -465,7 +468,7 @@ mac_mstats(self, args) ...@@ -465,7 +468,7 @@ mac_mstats(self, args)
static struct methodlist mac_methods[] = { static struct methodlist mac_methods[] = {
{"chdir", mac_chdir}, {"chdir", mac_chdir},
#ifndef __MWERKS__ #ifndef CW4
{"close", mac_close}, {"close", mac_close},
#endif #endif
#ifdef MPW #ifdef MPW
...@@ -477,11 +480,11 @@ static struct methodlist mac_methods[] = { ...@@ -477,11 +480,11 @@ static struct methodlist mac_methods[] = {
{"getbootvol", mac_getbootvol}, /* non-standard */ {"getbootvol", mac_getbootvol}, /* non-standard */
{"getcwd", mac_getcwd}, {"getcwd", mac_getcwd},
{"listdir", mac_listdir}, {"listdir", mac_listdir},
#ifndef __MWERKS__ #ifndef CW4
{"lseek", mac_lseek}, {"lseek", mac_lseek},
#endif #endif
{"mkdir", mac_mkdir}, {"mkdir", mac_mkdir},
#ifndef __MWERKS__ #ifndef CW4
{"open", mac_open}, {"open", mac_open},
{"read", mac_read}, {"read", mac_read},
#endif #endif
...@@ -490,7 +493,7 @@ static struct methodlist mac_methods[] = { ...@@ -490,7 +493,7 @@ static struct methodlist mac_methods[] = {
{"stat", mac_stat}, {"stat", mac_stat},
{"sync", mac_sync}, {"sync", mac_sync},
{"unlink", mac_unlink}, {"unlink", mac_unlink},
#ifndef __MWERKS__ #ifndef CW4
{"write", mac_write}, {"write", mac_write},
#endif #endif
#ifdef MALLOC_DEBUG #ifdef MALLOC_DEBUG
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment