aboutsummaryrefslogtreecommitdiffstats
path: root/report.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2004-11-10 19:57:47 +0000
committerMatthias Andree <matthias.andree@gmx.de>2004-11-10 19:57:47 +0000
commit2ed8dc12cd5ffbbff9cd25e928a720be3596f2af (patch)
tree994d80cb32bb77ad0f380f9254a7e3171d2ec051 /report.c
parent13c27199231cbc2cc83969ada741b95be1cca4d3 (diff)
downloadfetchmail-2ed8dc12cd5ffbbff9cd25e928a720be3596f2af.tar.gz
fetchmail-2ed8dc12cd5ffbbff9cd25e928a720be3596f2af.tar.bz2
fetchmail-2ed8dc12cd5ffbbff9cd25e928a720be3596f2af.zip
Clean up the horrible HAVE_[V]SNPRINTF mess, use Trio on systems that lack
real snprintf or vsnprintf. svn path=/trunk/; revision=3996
Diffstat (limited to 'report.c')
-rw-r--r--report.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/report.c b/report.c
index cdded484..cbac88a4 100644
--- a/report.c
+++ b/report.c
@@ -235,7 +235,6 @@ report_build (FILE *errfp, message, va_alist)
#if defined(VA_START)
VA_START (args, message);
-#if defined(HAVE_VSNPRINTF) || defined(_LIBC)
for ( ; ; )
{
n = vsnprintf (partial_message + partial_message_size_used,
@@ -251,20 +250,8 @@ report_build (FILE *errfp, message, va_alist)
partial_message_size += 2048;
partial_message = REALLOC (partial_message, partial_message_size);
}
-#else
- vsprintf (partial_message + partial_message_size_used, message, args);
- partial_message_size_used += strlen(partial_message+partial_message_size_used);
-
- /* Attempt to catch memory overwrites... */
- if (partial_message_size_used >= partial_message_size)
- {
- partial_message_size_used = 0;
- report (stderr, GT_("partial error message buffer overflow"));
- }
-#endif
va_end (args);
#else
-#if HAVE_SNPRINTF
for ( ; ; )
{
n = snprintf (partial_message + partial_message_size_used,
@@ -280,16 +267,6 @@ report_build (FILE *errfp, message, va_alist)
partial_message_size += 2048;
partial_message = REALLOC (partial_message, partial_message_size);
}
-#else
- sprintf (partial_message + partial_message_size_used, message, a1, a2, a3, a4, a5, a6, a7, a8);
-
- /* Attempt to catch memory overwrites... */
- if ((partial_message_size_used = strlen (partial_message)) >= partial_message_size)
- {
- partial_message_size_used = 0;
- report (stderr, GT_("partial error message buffer overflow"));
- }
-#endif
#endif
if (use_stderr && partial_message_size_used != 0)
@@ -335,7 +312,6 @@ report_complete (FILE *errfp, message, va_alist)
#if defined(VA_START)
VA_START (args, message);
-#if defined(HAVE_VSNPRINTF) || defined(_LIBC)
for ( ; ; )
{
n = vsnprintf (partial_message + partial_message_size_used,
@@ -351,20 +327,8 @@ report_complete (FILE *errfp, message, va_alist)
partial_message_size += 2048;
partial_message = REALLOC (partial_message, partial_message_size);
}
-#else
- vsprintf (partial_message + partial_message_size_used, message, args);
- partial_message_size_used += strlen(partial_message+partial_message_size_used);
-
- /* Attempt to catch memory overwrites... */
- if (partial_message_size_used >= partial_message_size)
- {
- partial_message_size_used = 0;
- report (stderr, GT_("partial error message buffer overflow"));
- }
-#endif
va_end (args);
#else
-#if HAVE_SNPRINTF
for ( ; ; )
{
n = snprintf (partial_message + partial_message_size_used,
@@ -380,16 +344,6 @@ report_complete (FILE *errfp, message, va_alist)
partial_message_size += 2048;
partial_message = REALLOC (partial_message, partial_message_size);
}
-#else
- sprintf (partial_message + partial_message_size_used, message, a1, a2, a3, a4, a5, a6, a7, a8);
-
- /* Attempt to catch memory overwrites... */
- if ((partial_message_size_used = strlen (partial_message)) >= partial_message_size)
- {
- partial_message_size_used = 0;
- report (stderr, GT_("partial error message buffer overflow"));
- }
-#endif
#endif
/* Finally... print it. */