Commit f905a7fe authored by Guido van Rossum's avatar Guido van Rossum

Walker's changes fixed so they work in THINK C 5

parent 842f63a4
...@@ -36,9 +36,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -36,9 +36,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <fcntl.h> #include <fcntl.h>
#include "macdefs.h" #include "::unixemu:macdefs.h"
#include "dir.h" #include "::unixemu:dir.h"
#include "stat.h" #include "::unixemu:stat.h"
#ifndef MAXPATHLEN #ifndef MAXPATHLEN
#define MAXPATHLEN 1024 #define MAXPATHLEN 1024
...@@ -46,17 +46,18 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -46,17 +46,18 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Prototypes for Unix simulation on Mac */ /* Prototypes for Unix simulation on Mac */
int access PROTO((char *path, int mode)); int access PROTO((const char *path, int mode));
int chdir PROTO((char *path)); int chdir PROTO((const char *path));
char *getbootvol PROTO((void)); char *getbootvol PROTO((void));
char *getwd PROTO((char *)); char *getwd PROTO((char *));
int mkdir PROTO((char *path, int mode)); int mkdir PROTO((const char *path, int mode));
DIR * opendir PROTO((char *)); DIR * opendir PROTO((char *));
void closedir PROTO((DIR *)); void closedir PROTO((DIR *));
struct direct * readdir PROTO((DIR *)); struct direct * readdir PROTO((DIR *));
int rmdir PROTO((char *path)); int rmdir PROTO((const char *path));
int stat PROTO((char *path, struct stat *buf)); int stat PROTO((const char *path, struct stat *buf));
int sync PROTO((void)); int sync PROTO((void));
int unlink PROTO((const char *));
...@@ -160,6 +161,8 @@ mac_close(self, args) ...@@ -160,6 +161,8 @@ mac_close(self, args)
return None; return None;
} }
#ifdef MPW
static object * static object *
mac_dup(self, args) mac_dup(self, args)
object *self; object *self;
...@@ -195,6 +198,8 @@ mac_fdopen(self, args) ...@@ -195,6 +198,8 @@ mac_fdopen(self, args)
return newopenfileobject(fp, "(fdopen)", mode, fclose); return newopenfileobject(fp, "(fdopen)", mode, fclose);
} }
#endif /* MPW */
static object * static object *
mac_getbootvol(self, args) mac_getbootvol(self, args)
object *self; object *self;
...@@ -424,8 +429,10 @@ static struct methodlist mac_methods[] = { ...@@ -424,8 +429,10 @@ static struct methodlist mac_methods[] = {
{"access", mac_access}, {"access", mac_access},
{"chdir", mac_chdir}, {"chdir", mac_chdir},
{"close", mac_close}, {"close", mac_close},
#ifdef MPW
{"dup", mac_dup}, {"dup", mac_dup},
{"fdopen", mac_fdopen}, {"fdopen", mac_fdopen},
#endif
{"getbootvol", mac_getbootvol}, /* non-standard */ {"getbootvol", mac_getbootvol}, /* non-standard */
{"getcwd", mac_getcwd}, {"getcwd", mac_getcwd},
{"listdir", mac_listdir}, {"listdir", mac_listdir},
......
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