ParamBlockRec 		pb;
HParamBlockRec 		pb;
PRInt32 _MD_Open(const char *path, PRIntn oflag, int mode){// Macintosh doesnt really have mode bits, just drop them#pragma unused (mode)	OSErr 				err; 	ParamBlockRec 		pb;	char	 			*macFileName = NULL;	Str255				pascalName;	PRInt8 				perm;	PRInt32				flags = oflag;	if (flags & PR_RDWR) {		oflag = O_RDWR;	} else if (flags & PR_WRONLY) {		oflag = O_WRONLY;	} else {		oflag = O_RDONLY;	}	if (flags & PR_CREATE_FILE) {		oflag |= O_CREAT ;	}	    err = ConvertUnixPathToMacPath(path, &macFileName);		if (err != noErr)		goto ErrorExit;	pb.ioParam.ioCompletion		= NULL;	PStrFromCStr(macFileName, pascalName);	PR_DELETE(macFileName);	pb.ioParam.ioNamePtr 		= pascalName;	pb.ioParam.ioVRefNum 		= 0;	pb.ioParam.ioVersNum 		= 0;open:	perm =  oflag & 3;	if (perm == O_RDWR)		perm = fsRdWrPerm;	else if (perm == O_WRONLY)		perm = fsWrPerm;	else		perm = fsRdPerm;		pb.ioParam.ioPermssn 		= perm;	pb.ioParam.ioMisc 			= NULL;		err = PBOpenSync(&pb);	if (err == noErr)		return pb.ioParam.ioRefNum;	else if ((err != fnfErr) || ((oflag & O_CREAT) == 0))		goto ErrorExit;			err = PBCreateSync(&pb);	if (err == noErr)		goto open;ErrorExit:	_PR_MD_CURRENT_THREAD()->md.osErrCode = err;	_MD_SetError(err);    return -1;}