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"
|
#include "err.h"
|
||||||
|
|
||||||
|
#ifndef HAVE___PROGNAME
|
||||||
|
const char *__progname;
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
warnerr(int doexit, int eval, int doerrno, const char *fmt, va_list ap)
|
warnerr(int doexit, int eval, int doerrno, const char *fmt, va_list ap)
|
||||||
{
|
{
|
||||||
int sverrno = errno;
|
int sverrno = errno;
|
||||||
#ifdef HAVE___PROGNAME
|
if(__progname != NULL){
|
||||||
fprintf(stderr, "%s", __progname);
|
fprintf(stderr, "%s", __progname);
|
||||||
if(fmt != NULL || doerrno)
|
if(fmt != NULL || doerrno)
|
||||||
fprintf(stderr, ": ");
|
fprintf(stderr, ": ");
|
||||||
#endif
|
}
|
||||||
if (fmt != NULL){
|
if (fmt != NULL){
|
||||||
vfprintf(stderr, fmt, ap);
|
vfprintf(stderr, fmt, ap);
|
||||||
if(doerrno)
|
if(doerrno)
|
||||||
|
Reference in New Issue
Block a user