From owner-freebsd-bugs Sat Feb 12 21:59:59 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by builder.freebsd.org (Postfix) with ESMTP id E53CB3FEF for ; Sat, 12 Feb 2000 21:59:57 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id WAA03369; Sat, 12 Feb 2000 22:00:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Date: Sat, 12 Feb 2000 22:00:02 -0800 (PST) Message-Id: <200002130600.WAA03369@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: TATEOKA Takamichi Subject: Re: bin/13691: tcpslice problems Reply-To: TATEOKA Takamichi Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/13691; it has been noted by GNATS. From: TATEOKA Takamichi To: bmah@CA.Sandia.GOV Cc: freebsd-gnats-submit@freebsd.org Subject: Re: bin/13691: tcpslice problems Date: Sun, 13 Feb 2000 14:39:45 +0900 Hi, From: bmah@CA.Sandia.GOV (Bruce A. Mah) > B. Apply the patch attached here, to replace all of the fseek/ftell > calls with fsetpos/fgetpos calls. Another way to do this is to > replace fseek/ftell with fseeko/ftello. The patch from Vern (cited by > Sheldon) replaces two of the ftell calls with ftello, but doesn't > touch any of the fseek calls. > > (My patch uses fsetpos/fgetpos because that's what I was familiar with > at the time. Using fseeko/ftello may in fact be better because it > involves fewer code changes.) I think your patch is good enough to work on FreeBSD box and fixes known problems of tcpslice. I think that It is better to use fseeko/ftello instead of fsetpos/fgetpos. Because it makes type mismatch for offset value. In fact, both of them are off_t in most case, however, it's not guaranteed. (see definition of fpos_t in /usr/include/stdio.h.) -- Takamichi TATEOKA (tate@cs.uec.ac.jp) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message