From owner-freebsd-hackers@FreeBSD.ORG Sun May 25 10:58:05 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8087D37B401 for ; Sun, 25 May 2003 10:58:05 -0700 (PDT) Received: from kientzle.com (h-66-166-149-50.SNVACAID.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF28943FA3 for ; Sun, 25 May 2003 10:58:04 -0700 (PDT) (envelope-from kientzle@acm.org) Received: from acm.org (big.x.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id h4PHw3tJ066929; Sun, 25 May 2003 10:58:04 -0700 (PDT) (envelope-from kientzle@acm.org) Message-ID: <3ED1049B.8010409@acm.org> Date: Sun, 25 May 2003 10:59:55 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.6) Gecko/20011206 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dag-Erling Smorgrav References: <3ECEFA18.7060706@acm.org> <3ED04F27.5020102@acm.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: fetchListFTP: implemented, but crippled X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: kientzle@acm.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 May 2003 17:58:05 -0000 Dag-Erling Smorgrav wrote: > Tim Kientzle writes: >>Dag-Erling Smorgrav wrote: >>>Tim Kientzle writes: >>>>Easiest fix: move 'name' field to end (which >>>>permits variably-sizing it) and redefine API >>>>to return a linked-list >>>> >>>That would work. >>> >>I'll implement a variation on this (create a new >>structure to avoid breaking binary compat). > > You'll still have to break the API .... Sorry, let me spell it out in more detail: Proposal: New public functions to add to libfetch: fetchList2, fetchList2URL, fetchList2FTP, fetchList2File These are identical to the existing "fetchList*" functions except for the return type. New struct definition for fetch.h: struct url_ent_list { struct url_ent_list *next; struct url_stat stat; char name[PATH_MAX]; } No binary breakage, since existing functions are still there. The old fetchList/fetchListURL/fetchListFile are never used in /usr/src, but that doesn't mean they're unused. If there's consensus on removing them, let's do it right: modify those functions to emit a warning message whenever they're used (ideally, whenever they're linked with, which might be possible with gcc these days?): Warning: fetchList() is deprecated and will be removed from libfetch on January 1, 2004. Use fetchList2() instead. Then, follow through with the promise. ;-) Tim