Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 May 2003 10:59:55 -0700
From:      Tim Kientzle <kientzle@acm.org>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: fetchListFTP: implemented, but crippled
Message-ID:  <3ED1049B.8010409@acm.org>
References:  <3ECEFA18.7060706@acm.org> <xzp1xyotwvl.fsf@flood.ping.uio.no> <3ED04F27.5020102@acm.org> <xzpfzn39wc9.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Smorgrav wrote:

> Tim Kientzle <kientzle@acm.org> writes:
>>Dag-Erling Smorgrav wrote:
>>>Tim Kientzle <kientzle@acm.org> 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



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