Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.

This commit is contained in:
Guido van Rossum 1994-08-19 10:51:31 +00:00
parent e89bc75048
commit d4d7728440
16 changed files with 618 additions and 51 deletions

22
Mac/Compat/rmdir.c Normal file
View file

@ -0,0 +1,22 @@
/* Rmdir for the Macintosh.
Public domain by Guido van Rossum, CWI, Amsterdam (July 1987).
Pathnames must be Macintosh paths, with colons as separators. */
#include "macdefs.h"
int
rmdir(path)
char *path;
{
IOParam pb;
char name[MAXPATH];
strncpy(name, path, sizeof name);
pb.ioNamePtr= (StringPtr) c2pstr(name);
pb.ioVRefNum= 0;
if (PBDelete((ParmBlkPtr)&pb, FALSE) != noErr) {
errno= EACCES;
return -1;
}
return 0;
}