summaryrefslogtreecommitdiffstats
path: root/lib/libfetch/http.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2002-03-29 22:43:43 +0000
committermarkm <markm@FreeBSD.org>2002-03-29 22:43:43 +0000
commit76fe441a7bf75d73962641b785f158b5cc9dc7f8 (patch)
tree4e267e060bfb6d96f46ab0d79c49b277402c0dd0 /lib/libfetch/http.c
parent6085f75ded37ec415ded7d6373ecd09bcb088ac4 (diff)
downloadFreeBSD-src-76fe441a7bf75d73962641b785f158b5cc9dc7f8.zip
FreeBSD-src-76fe441a7bf75d73962641b785f158b5cc9dc7f8.tar.gz
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.
Diffstat (limited to 'lib/libfetch/http.c')
-rw-r--r--lib/libfetch/http.c4
1 files changed, 1 insertions, 3 deletions
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");
OpenPOWER on IntegriCloud