mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
This commit is contained in:
parent
e89bc75048
commit
d4d7728440
16 changed files with 618 additions and 51 deletions
22
Mac/Compat/rmdir.c
Normal file
22
Mac/Compat/rmdir.c
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue