bustage for Solaris gcc box
r=dbaron
It's a bustage fix for bug 234470
This commit is contained in:
pete.zha%sun.com 2004-09-21 06:02:24 +00:00
Родитель 985f6ba949
Коммит 29cf5bbc1d
2 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -1396,12 +1396,12 @@ NS_IMETHODIMP nsRenderingContextPS::RenderEPS(const nsRect& aRect, FILE *aDataFi
fflush(aDataFile); fflush(aDataFile);
fd = fileno(aDataFile); fd = fileno(aDataFile);
data = (const char *)mmap(0, datalen, PROT_READ, MAP_SHARED, fd, 0); data = (const char *)mmap(0, datalen, PROT_READ, MAP_SHARED, fd, 0);
if (!data) if ((int)data == -1)
return nsresultForErrno(errno); return nsresultForErrno(errno);
nsEPSObjectPS eps(data, datalen); nsEPSObjectPS eps(data, datalen);
if (NS_FAILED(eps.GetStatus())) { if (NS_FAILED(eps.GetStatus())) {
munmap((void *)data, datalen); munmap((char *)data, datalen);
return NS_ERROR_INVALID_ARG; return NS_ERROR_INVALID_ARG;
} }
@ -1410,7 +1410,7 @@ NS_IMETHODIMP nsRenderingContextPS::RenderEPS(const nsRect& aRect, FILE *aDataFi
rv = mPSObj->render_eps(trect, eps); rv = mPSObj->render_eps(trect, eps);
munmap((void *)data, datalen); munmap((char *)data, datalen);
return rv; return rv;
} }

Просмотреть файл

@ -226,7 +226,7 @@ nsRenderingContextXp::RenderEPS(const nsRect& aRect, FILE *aDataFile)
fd = fileno(aDataFile); fd = fileno(aDataFile);
PR_LOG(RenderingContextXpLM, PR_LOG_DEBUG, ("fileno=%d\n", fd)); PR_LOG(RenderingContextXpLM, PR_LOG_DEBUG, ("fileno=%d\n", fd));
data = (const unsigned char *)mmap(0, datalen, PROT_READ, MAP_SHARED, fd, 0); data = (const unsigned char *)mmap(0, datalen, PROT_READ, MAP_SHARED, fd, 0);
if (!data) { if ((int)data == -1) {
int saved_errno = errno; int saved_errno = errno;
PR_LOG(RenderingContextXpLM, PR_LOG_DEBUG, ("mmap() failure, errno=%s/%d\n", PR_LOG(RenderingContextXpLM, PR_LOG_DEBUG, ("mmap() failure, errno=%s/%d\n",
strerror(saved_errno), saved_errno)); strerror(saved_errno), saved_errno));
@ -242,7 +242,7 @@ nsRenderingContextXp::RenderEPS(const nsRect& aRect, FILE *aDataFile)
PopState(); PopState();
munmap((void *)data, datalen); munmap((char *)data, datalen);
return rv; return rv;
} }