From 76fe441a7bf75d73962641b785f158b5cc9dc7f8 Mon Sep 17 00:00:00 2001 From: markm Date: Fri, 29 Mar 2002 22:43:43 +0000 Subject: Do not use __progname directly (except in [gs]etprogname(3)). Also, make an internal _getprogname() that is used only inside libc. For libc, getprogname(3) is a weak symbol in case a function of the same name is defined in userland. --- lib/libfetch/http.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/libfetch') diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c index eed12f2..8d040d0 100644 --- a/lib/libfetch/http.c +++ b/lib/libfetch/http.c @@ -80,8 +80,6 @@ __FBSDID("$FreeBSD$"); #include "common.h" #include "httperr.h" -extern char *__progname; /* XXX not portable */ - /* Maximum number of redirects to follow */ #define MAX_REDIRECT 5 @@ -840,7 +838,7 @@ _http_request(struct url *URL, const char *op, struct url_stat *us, if ((p = getenv("HTTP_USER_AGENT")) != NULL && *p != '\0') _http_cmd(fd, "User-Agent: %s", p); else - _http_cmd(fd, "User-Agent: %s " _LIBFETCH_VER, __progname); + _http_cmd(fd, "User-Agent: %s " _LIBFETCH_VER, _getprogname()); if (url->offset) _http_cmd(fd, "Range: bytes=%lld-", (long long)url->offset); _http_cmd(fd, "Connection: close"); -- cgit v1.1