]> Pileus Git - ~andy/fetchmail/blobdiff - report.c
Merge branch 'legacy_63'
[~andy/fetchmail] / report.c
index d39f1f74d4af7b60db31fdebbe01c3e77d876d10..b6101e406d7550c1b0be70c87a303344aea8e7cb 100644 (file)
--- a/report.c
+++ b/report.c
 #include <stdio.h>
 #include <errno.h>
 #include <string.h>
-#if defined(HAVE_SYSLOG)
 #include <syslog.h>
-#endif
-#include "i18n.h"
+#include "gettext.h"
 #include "fetchmail.h"
 
-#  include <stdarg.h>
+#include <stdarg.h>
 
 #define MALLOC(n)      xmalloc(n)      
 #define REALLOC(n,s)   xrealloc(n,s)   
@@ -50,7 +48,6 @@ void report(FILE *errfp, const char *message, ...)
        report (errfp, GT_("%s (log message incomplete)\n"), partial_message);
     }
 
-#if defined(HAVE_SYSLOG)
     if (use_syslog)
     {
        int priority;
@@ -77,7 +74,6 @@ void report(FILE *errfp, const char *message, ...)
        va_end(args);
     }
     else /* i. e. not using syslog */
-#endif
     {
        if ( *message == '\n' )
        {
@@ -114,12 +110,10 @@ void report_init(int mode /** 0: regular output, 1: unbuffered output, -1: syslo
        use_syslog = FALSE;
        break;
 
-#ifdef HAVE_SYSLOG
     case -1:                   /* syslogd */
        unbuffered = FALSE;
        use_syslog = TRUE;
        break;
-#endif /* HAVE_SYSLOG */
     }
 }
 
@@ -149,7 +143,6 @@ static void rep_ensuresize(void) {
        }
 }
 
-#ifdef HAVE_STDARG_H
 static void report_vbuild(const char *message, va_list args)
 {
     int n;
@@ -178,7 +171,6 @@ static void report_vbuild(const char *message, va_list args)
        partial_message = (char *)REALLOC (partial_message, partial_message_size);
     }
 }
-#endif
 
 void report_build (FILE *errfp, const char *message, ...)
 {
@@ -186,7 +178,7 @@ void report_build (FILE *errfp, const char *message, ...)
 
     rep_ensuresize();
 
-    VA_START(args, message);
+    va_start(args, message);
     report_vbuild(message, args);
     va_end(args);
 
@@ -218,7 +210,7 @@ void report_complete (FILE *errfp, const char *message, ...)
 
     rep_ensuresize();
 
-    VA_START(args, message);
+    va_start(args, message);
     report_vbuild(message, args);
     va_end(args);