예제 #1
0
파일: page.c 프로젝트: Manish-cimcon/micro
int websPageOpen(webs_t wp, char_t *lpath, char_t *path, int mode, int perm)
{
	a_assert(websValid(wp));

#ifdef WEBS_PAGE_ROM
	return websRomPageOpen(wp, path, mode, perm);
#else
	return (wp->docfd = gopen(lpath, mode, perm));
#endif /* WEBS_PAGE_ROM */
}
예제 #2
0
int websPageOpen(webs_t wp, char_t *lpath, char_t *path, int mode, int perm)
{
#if defined(WIN32)
	errno_t	error;
#endif
	a_assert(websValid(wp));
#ifdef WEBS_PAGE_ROM
	return websRomPageOpen(wp, path, mode, perm);
#elif defined(WIN32)
	error = _sopen_s(&(wp->docfd), lpath, mode, _SH_DENYNO, _S_IREAD);
	return (wp->docfd = gopen(lpath, mode, _S_IREAD));
#else
	return (wp->docfd = gopen(lpath, mode, perm));
#endif /* WEBS_PAGE_ROM */
}