зеркало из https://github.com/mozilla/gecko-dev.git
bug 260525
bustage for Solaris gcc box r=dbaron It's a bustage fix for bug 234470
This commit is contained in:
Родитель
985f6ba949
Коммит
29cf5bbc1d
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче