summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1994-05-06 15:56:22 (GMT)
committerGuido van Rossum <guido@python.org>1994-05-06 15:56:22 (GMT)
commit921a08f303bb944496d7c312170232ced132d173 (patch)
tree8473d93d745bacb9fbf7611ca33cafe69a074500 /Mac
parent3ce7a1a9ea40d8d9730f1a5b5b217de9a2ba8ee6 (diff)
downloadcpython-921a08f303bb944496d7c312170232ced132d173.zip
cpython-921a08f303bb944496d7c312170232ced132d173.tar.gz
cpython-921a08f303bb944496d7c312170232ced132d173.tar.bz2
Walker's changes fixed so they work in THINK C 5
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Modules/macmodule.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/Mac/Modules/macmodule.c b/Mac/Modules/macmodule.c
index 207bfd3..cc6cf42 100644
--- a/Mac/Modules/macmodule.c
+++ b/Mac/Modules/macmodule.c
@@ -36,9 +36,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <fcntl.h>
-#include "macdefs.h"
-#include "dir.h"
-#include "stat.h"
+#include "::unixemu:macdefs.h"
+#include "::unixemu:dir.h"
+#include "::unixemu:stat.h"
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
@@ -46,17 +46,18 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Prototypes for Unix simulation on Mac */
-int access PROTO((char *path, int mode));
-int chdir PROTO((char *path));
+int access PROTO((const char *path, int mode));
+int chdir PROTO((const char *path));
char *getbootvol PROTO((void));
char *getwd PROTO((char *));
-int mkdir PROTO((char *path, int mode));
-DIR * opendir PROTO((char *));
+int mkdir PROTO((const char *path, int mode));
+DIR * opendir PROTO((char *));
void closedir PROTO((DIR *));
struct direct * readdir PROTO((DIR *));
-int rmdir PROTO((char *path));
-int stat PROTO((char *path, struct stat *buf));
+int rmdir PROTO((const char *path));
+int stat PROTO((const char *path, struct stat *buf));
int sync PROTO((void));
+int unlink PROTO((const char *));
@@ -67,7 +68,7 @@ static object *MacError; /* Exception mac.error */
static object *
mac_error()
{
- return err_errno(MacError);
+ return err_errno(MacError);
}
/* MAC generic methods */
@@ -160,6 +161,8 @@ mac_close(self, args)
return None;
}
+#ifdef MPW
+
static object *
mac_dup(self, args)
object *self;
@@ -195,6 +198,8 @@ mac_fdopen(self, args)
return newopenfileobject(fp, "(fdopen)", mode, fclose);
}
+#endif /* MPW */
+
static object *
mac_getbootvol(self, args)
object *self;
@@ -424,8 +429,10 @@ static struct methodlist mac_methods[] = {
{"access", mac_access},
{"chdir", mac_chdir},
{"close", mac_close},
+#ifdef MPW
{"dup", mac_dup},
{"fdopen", mac_fdopen},
+#endif
{"getbootvol", mac_getbootvol}, /* non-standard */
{"getcwd", mac_getcwd},
{"listdir", mac_listdir},