fetchListFTP: implemented, but crippled
Tim Kientzle
kientzle at acm.org
Sun May 25 10:58:05 PDT 2003
Dag-Erling Smorgrav wrote:
> Tim Kientzle <kientzle at acm.org> writes:
>>Dag-Erling Smorgrav wrote:
>>>Tim Kientzle <kientzle at 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
More information about the freebsd-hackers
mailing list