aboutsummaryrefslogtreecommitdiffstats
path: root/report.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2004-06-18 20:16:42 +0000
committerMatthias Andree <matthias.andree@gmx.de>2004-06-18 20:16:42 +0000
commitc325bc190633349e806d0f2c313ace2338950f88 (patch)
tree69ef866dee66bd1548e19f58faa513c460242bf7 /report.c
parent5ffe6f98f8ba802ccd973724702a2d44757c4291 (diff)
downloadfetchmail-c325bc190633349e806d0f2c313ace2338950f88.tar.gz
fetchmail-c325bc190633349e806d0f2c313ace2338950f88.tar.bz2
fetchmail-c325bc190633349e806d0f2c313ace2338950f88.zip
Compiler warnings fixes, preprocessor and minor general cleanup.
svn path=/trunk/; revision=3901
Diffstat (limited to 'report.c')
-rw-r--r--report.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/report.c b/report.c
index d201c740..32e98577 100644
--- a/report.c
+++ b/report.c
@@ -22,7 +22,7 @@
#include "i18n.h"
#include "fetchmail.h"
-#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC || HAVE_STDARG_H
+#if defined(HAVE_VPRINTF) || defined(HAVE_DOPRNT) || defined(_LIBC) || defined(HAVE_STDARG_H)
# if HAVE_STDARG_H
# include <stdarg.h>
# define VA_START(args, lastarg) va_start(args, lastarg)
@@ -66,10 +66,6 @@ static unsigned int report_message_count;
#else
-/* The calling program should define program_name and set it to the
- name of the executing program. */
-extern char *program_name;
-
# if !HAVE_STRERROR && !defined(strerror)
char *strerror (int errnum)
{
@@ -156,7 +152,7 @@ report (FILE *errfp, message, va_alist)
#ifdef VA_START
VA_START (args, message);
-# if HAVE_VPRINTF || _LIBC
+# if defined(HAVE_VPRINTF) || defined(_LIBC)
vfprintf (errfp, message, args);
# else
_doprnt (message, args, errfp);
@@ -239,7 +235,7 @@ report_build (FILE *errfp, message, va_alist)
#if defined(VA_START)
VA_START (args, message);
-#if HAVE_VSNPRINTF || _LIBC
+#if defined(HAVE_VSNPRINTF) || defined(_LIBC)
for ( ; ; )
{
n = vsnprintf (partial_message + partial_message_size_used,
@@ -339,7 +335,7 @@ report_complete (FILE *errfp, message, va_alist)
#if defined(VA_START)
VA_START (args, message);
-#if HAVE_VSNPRINTF || _LIBC
+#if defined(HAVE_VSNPRINTF) || defined(_LIBC)
for ( ; ; )
{
n = vsnprintf (partial_message + partial_message_size_used,
@@ -412,7 +408,7 @@ report_complete (FILE *errfp, message, va_alist)
/* Sometimes we want to have at most one error per line. This
variable controls whether this mode is selected or not. */
-int error_one_per_line;
+static int error_one_per_line;
void
#ifdef HAVE_STDARG_H
@@ -459,11 +455,11 @@ report_at_line (FILE *errfp, errnum, file_name, line_number, message, va_alist)
}
if (file_name != NULL)
- fprintf (errfp, "%s:%d: ", file_name, line_number);
+ fprintf (errfp, "%s:%u: ", file_name, line_number);
#ifdef VA_START
VA_START (args, message);
-# if HAVE_VPRINTF || _LIBC
+# if defined(HAVE_VPRINTF) || defined(_LIBC)
vfprintf (errfp, message, args);
# else
_doprnt (message, args, errfp);