From owner-freebsd-ports Wed Feb 20 5:32:48 2002 Delivered-To: freebsd-ports@freebsd.org Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by hub.freebsd.org (Postfix) with ESMTP id 1138C37B402; Wed, 20 Feb 2002 05:32:45 -0800 (PST) Received: (from ache@localhost) by nagual.pp.ru (8.11.6/8.11.6) id g1KDWb431213; Wed, 20 Feb 2002 16:32:37 +0300 (MSK) (envelope-from ache) Date: Wed, 20 Feb 2002 16:32:34 +0300 From: =?koi8-r?B?4c7E0sXKIP7F0s7P1w==?= To: Vadim Mikhailov , freebsd-gnats-submit@FreeBSD.org, idart@hotmail.com Cc: freebsd-ports@FreeBSD.org Subject: Re: ports/33170: zip -T [zip file] fails with message about missing end signature Message-ID: <20020220133232.GA31043@nagual.pp.ru> References: <200202200440.g1K4e2S04126@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200202200440.g1K4e2S04126@freefall.freebsd.org> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Tue, Feb 19, 2002 at 20:40:02 -0800, Vadim Mikhailov wrote: > > +local long fsize(FILE *f) { > + long size, curpos; > + if(!f) return 0; > + curpos = ftell(f); > + fseek(f, 0, SEEK_END); > + size = ftell(f); > + fseek(f, curpos, SEEK_SET); > + return size; > +} You already have file "f" opened at this point, so fsize() can be more effectively implemented via fstat(). > In the meantime if someone could commit fix proposed in kern/6184 > it won't hurt as well. FYI, negative lseek() and fseek() already disabled in FreeBSD-current -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message