Bump version to 0.9.1.
[python/dscho.git] / Mac / mwerksglue.c
blob37e3a81728cf7453bf5ca4a3d2212f83164fa777
1 /*
2 ** Glue code for MetroWerks CodeWarrior, which misses
3 ** unix-like routines for file-access.
4 */
6 #ifdef __MWERKS__
7 #include <Types.h>
8 #include <Files.h>
9 #include <Strings.h>
11 #include <stdio.h>
12 #include <errno.h>
14 int
15 fileno(fp)
16 FILE *fp;
18 if (fp==stdin) return 0;
19 else if (fp==stdout) return 1;
20 else if (fp==stderr) return 2;
21 else return 3;
24 int
25 isatty(fd)
26 int fd;
28 return (fd >= 0 && fd <= 2);
31 int
32 unlink(old)
33 char *old;
35 OSErr err;
37 if ((err=FSDelete(c2pstr(old), 0)) == noErr)
38 return 0;
39 errno= err;
40 return -1;
43 #endif /* __MWERKS__ */