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" #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)