Add __progname definition.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1508 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user