diff options
-rw-r--r-- | acconfig.h | 6 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | report.c | 26 |
3 files changed, 32 insertions, 2 deletions
@@ -32,6 +32,12 @@ /* Define if you have GNU's getopt family of functions. */ #undef HAVE_GETOPTLONG +/* Define if you have strstr */ +#undef HAVE_STRSTR + +/* Define if you have vsyslog */ +#undef HAVE_VSYSLOG + /* Leave that blank line there!! Autoheader needs it. If you're adding to this file, keep in mind: diff --git a/configure.in b/configure.in index e98a70e3..72c225ee 100644 --- a/configure.in +++ b/configure.in @@ -80,7 +80,7 @@ AC_SUBST(EXTRASRC) AC_SUBST(EXTRAOBJ) AC_CHECK_FUNCS(tcsetattr stty setsid seteuid gethostbyname res_search herror \ - strrchr strerror setlinebuf syslog snprintf vsnprintf) + strrchr strstr strerror setlinebuf syslog snprintf vsnprintf vsyslog) dnl AC_FUNC_SETVBUF_REVERSED @@ -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, ""); } } |