Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Feb 2002 05:40:01 -0800 (PST)
From:      =?koi8-r?B?4c7E0sXKIP7F0s7P1w==?= <ache@nagual.pp.ru>
To:        freebsd-ports@FreeBSD.org
Subject:   Re: ports/33170: zip -T [zip file] fails with message about missing end signature
Message-ID:  <200202201340.g1KDe1B40499@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/33170; it has been noted by GNATS.

From: =?koi8-r?B?4c7E0sXKIP7F0s7P1w==?= <ache@nagual.pp.ru>
To: Vadim Mikhailov <mvp@braz.ru>, 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
Date: Wed, 20 Feb 2002 16:32:34 +0300

 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202201340.g1KDe1B40499>