Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Feb 2002 16:32:34 +0300
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
Message-ID:  <20020220133232.GA31043@nagual.pp.ru>
In-Reply-To: <200202200440.g1K4e2S04126@freefall.freebsd.org>
References:  <200202200440.g1K4e2S04126@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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?20020220133232.GA31043>