Use SSIZE_MAX instead of INT_MAX, as kernel does ssize_t check

Better explanation comment of FIXME section
This commit is contained in:
Andrey A. Chernov 2001-03-27 01:16:44 +00:00
parent 0c1a06170b
commit 1410c7cc9a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74834

View File

@ -281,7 +281,9 @@ rlines(fp, off, sbp)
}
/* XXX: FIXME - mmap() not support files over 2Gb */
if (size > INT_MAX) {
/* Large file processing require alternative implementation */
/* for now print nice error diagnostic at least */
if (size > SSIZE_MAX) {
errno = EFBIG;
ierr();
exit(1);