On 10/16/11 11:20, Ed Schouten wrote:
> Hmmm... Casting to size_t is not the way to go, but off_t also should be
> avoided. We can assume st_size is non-negative, so we should do
> something like this, right?
>
> - if (sb.st_size > (off_t)SIZE_T_MAX)
> + if ((uintmax_t)sb.s
* Colin Percival , 20111016 19:21:
> This might make look(1) build, but on a 64-bit machine it also makes
> look(1) fail with "File too large" whenever it's larger than
> (int64_t)(UINT64_MAX) = -1 bytes long.
d'oh! Stupid signedness. I casted to off_t explicitly, since we need to
do 64-bit compar
On 10/14/11 00:24, Ed Schouten wrote:
> Log:
> Build look(1) with WARNS=6.
>
> - if (sb.st_size > SIZE_T_MAX)
> + if (sb.st_size > (off_t)SIZE_T_MAX)
> errx(2, "%s: %s", file, strerror(EFBIG));
This might make look(1) build, but on a 64-bit machine i
This seems to break portsnap on amd64.
As seen in ports/161703 (with error look: file too large).
mfg tobias
On Fri, 14 Oct 2011 09:24:48 +0200, Ed Schouten wrote:
Author: ed
Date: Fri Oct 14 07:24:48 2011
New Revision: 226359
URL: http://svn.freebsd.org/changeset/base/226359
Log:
Build lo
Author: ed
Date: Fri Oct 14 07:24:48 2011
New Revision: 226359
URL: http://svn.freebsd.org/changeset/base/226359
Log:
Build look(1) with WARNS=6.
Modified:
head/usr.bin/look/Makefile
head/usr.bin/look/look.c
Modified: head/usr.bin/look/Makefile
=