int amode;
int checkFlags; struct stat buf;
_MD_access (const char *name, PRIntn how){PRInt32 rv, err;int amode;	switch (how) {		case PR_ACCESS_WRITE_OK:			amode = W_OK;			break;		case PR_ACCESS_READ_OK:			amode = R_OK;			break;		case PR_ACCESS_EXISTS:			amode = F_OK;			break;		default:			PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);			rv = -1;			goto done;	}	rv = access(name, amode);	if (rv < 0) {		err = _MD_ERRNO();		_PR_MD_MAP_ACCESS_ERROR(err);	}done:	return(rv);}