(warnerr): do not use __progname

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9714 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2001-02-20 23:00:13 +00:00
parent 6ea2291a5d
commit 53d3a024f7

View File

@@ -73,8 +73,10 @@ void
warnerr(int doerrno, const char *fmt, va_list ap)
{
int sverrno = errno;
if(__progname != NULL){
fprintf(stderr, "%s", __progname);
const char *progname = getprogname();
if(progname != NULL){
fprintf(stderr, "%s", progname);
if(fmt != NULL || doerrno)
fprintf(stderr, ": ");
}