aboutsummaryrefslogtreecommitdiffstats
path: root/report.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-01-30 17:47:26 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-01-30 17:47:26 +0000
commita468f9459ca49e889ab9d3af60176c638dd78811 (patch)
treef3d04ca08cc7512d226b80b92b17576c203727d7 /report.c
parent65179f921d37756ed89e1ef7965e13bd5f319650 (diff)
downloadfetchmail-a468f9459ca49e889ab9d3af60176c638dd78811.tar.gz
fetchmail-a468f9459ca49e889ab9d3af60176c638dd78811.tar.bz2
fetchmail-a468f9459ca49e889ab9d3af60176c638dd78811.zip
Configure for absent vsyslog.
svn path=/trunk/; revision=843
Diffstat (limited to 'report.c')
-rw-r--r--report.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/report.c b/report.c
index 0c064e01..5b3fdd52 100644
--- a/report.c
+++ b/report.c
@@ -114,6 +114,27 @@ private_strerror (errnum)
Exit with status STATUS if it is nonzero. */
/* VARARGS */
+#if !defined(HAVE_VSYSLOG) && !defined(VA_START)
+int vsyslog(priority, message, va_alist)
+int priority;
+char *message;
+va_dcl
+{
+ va_list args;
+
+ char *string;
+
+ string = (char *)malloc(LINELEN);
+
+ va_start(args);
+ vsprintf(string, message, args);
+ va_end(args);
+
+ syslog(priority, string);
+ free(string);
+}
+#endif
+
void
#if defined(VA_START) && __STDC__
error (int status, int errnum, const char *message, ...)
@@ -415,7 +436,10 @@ error_complete (status, errnum, message, va_alist)
exit(status);
}
else
- error (status, errnum, "%s", partial_message);
+ if (partial_message_size_used != 0)
+ error (status, errnum, "%s", partial_message);
+ else
+ error (status, errnum, "");
}
}