Add __progname definition.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1508 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1997-03-30 09:09:15 +00:00
parent cbccd40750
commit 25e95ebf19

View File

@@ -43,15 +43,19 @@ RCSID("$Id$");
#include "err.h"
#ifndef HAVE___PROGNAME
const char *__progname;
#endif
void
warnerr(int doexit, int eval, int doerrno, const char *fmt, va_list ap)
{
int sverrno = errno;
#ifdef HAVE___PROGNAME
fprintf(stderr, "%s", __progname);
if(fmt != NULL || doerrno)
fprintf(stderr, ": ");
#endif
if(__progname != NULL){
fprintf(stderr, "%s", __progname);
if(fmt != NULL || doerrno)
fprintf(stderr, ": ");
}
if (fmt != NULL){
vfprintf(stderr, fmt, ap);
if(doerrno)