I see no reason why this should be signed. And cast to int may clobber big values! diff -ur gawk-3.1.1.orig/awkgram.y gawk-3.1.1/awkgram.y --- gawk-3.1.1.orig/awkgram.y Tue Apr 16 13:40:13 2002 +++ gawk-3.1.1/awkgram.y Wed May 22 10:54:37 2002 @@ -1124,7 +1124,7 @@ static int fd; int n; register char *scan; - static int len = 0; + static size_t len = 0; static int did_newline = FALSE; int newfile; struct stat sbuf; diff -ur gawk-3.1.1.orig/awk.h gawk-3.1.1/awk.h --- gawk-3.1.1.orig/awk.h Tue Apr 16 13:40:18 2002 +++ gawk-3.1.1/awk.h Wed May 22 10:49:24 2002 @@ -922,7 +922,7 @@ extern int os_is_setuid P((void)); extern int os_setbinmode P((int fd, int mode)); extern void os_restore_mode P((int fd)); -extern int optimal_bufsize P((int fd, struct stat *sbuf)); +extern size_t optimal_bufsize P((int fd, struct stat *sbuf)); extern int ispath P((const char *file)); extern int isdirpunct P((int c)); /* io.c */ diff -ur gawk-3.1.1.orig/pc/gawkmisc.pc gawk-3.1.1/pc/gawkmisc.pc --- gawk-3.1.1.orig/pc/gawkmisc.pc Tue Apr 16 13:58:11 2002 +++ gawk-3.1.1/pc/gawkmisc.pc Wed May 22 10:51:27 2002 @@ -103,7 +103,7 @@ /* optimal_bufsize --- determine optimal buffer size */ -int +size_t optimal_bufsize(fd, stb) int fd; struct stat *stb; diff -ur gawk-3.1.1.orig/posix/gawkmisc.c gawk-3.1.1/posix/gawkmisc.c --- gawk-3.1.1.orig/posix/gawkmisc.c Tue Apr 16 13:58:41 2002 +++ gawk-3.1.1/posix/gawkmisc.c Wed May 22 10:50:21 2002 @@ -62,7 +62,7 @@ /* optimal_bufsize --- determine optimal buffer size */ -int +size_t optimal_bufsize(fd, stb) int fd; struct stat *stb; diff -ur gawk-3.1.1.orig/unsupported/atari/gawkmisc.atr gawk-3.1.1/unsupported/atari/gawkmisc.atr --- gawk-3.1.1.orig/unsupported/atari/gawkmisc.atr Thu Aug 16 11:07:48 2001 +++ gawk-3.1.1/unsupported/atari/gawkmisc.atr Wed May 22 10:51:58 2002 @@ -79,7 +79,7 @@ /* optimal_bufsize --- determine optimal buffer size */ -int +size_t optimal_bufsize(fd, stb) int fd; struct stat *stb; diff -ur gawk-3.1.1.orig/unsupported/tandem/tmisc.c gawk-3.1.1/unsupported/tandem/tmisc.c --- gawk-3.1.1.orig/unsupported/tandem/tmisc.c Sun Jan 28 14:49:25 2001 +++ gawk-3.1.1/unsupported/tandem/tmisc.c Wed May 22 10:52:31 2002 @@ -90,7 +90,7 @@ /* optimal_bufsize --- determine optimal buffer size */ -int +size_t optimal_bufsize(fd, stb) int fd; struct stat *stb; diff -ur gawk-3.1.1.orig/vms/gawkmisc.vms gawk-3.1.1/vms/gawkmisc.vms --- gawk-3.1.1.orig/vms/gawkmisc.vms Sun Jan 28 14:49:25 2001 +++ gawk-3.1.1/vms/gawkmisc.vms Wed May 22 10:51:47 2002 @@ -70,7 +70,7 @@ /* optimal_bufsize --- determine optimal buffer size */ -int +size_t optimal_bufsize(fd, stb) int fd; struct stat *stb; --- gawk-3.1.1.orig/awkgram.c Tue Apr 16 14:02:08 2002 +++ gawk-3.1.1/awkgram.c Wed May 22 11:33:15 2002 @@ -2705,7 +2705,7 @@ static int fd; int n; register char *scan; - static int len = 0; + static size_t len = 0; static int did_newline = FALSE; int newfile; struct stat sbuf;