summaryrefslogtreecommitdiff
path: root/libc/stdio/vasprintf.c
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2005-02-14 05:58:08 +0000
committerManuel Novoa III <mjn3@codepoet.org>2005-02-14 05:58:08 +0000
commit371ca78703d0f0a6aedb9879a3120b75d9f6e587 (patch)
tree3349b8a62ea0980c7bf51c8e9cb97e26f92b9768 /libc/stdio/vasprintf.c
parent67256bd81271093c911a516aa00a5b33a63d6cbd (diff)
When I broke up the stdio code, the "support pre C99 compilers" va_copy compat
define was no longer visible to vasprintf. I didn't catch this since I no longer use such old tools. Unfortunately, some well-meaning but misguided individual decided to just cut-and-paste the macro. :-( Try to clean up the situation by putting it into a header that can be overriden by any archs that need to. If this breaks for anyone (as I said, I no longer use such old tools and so haven't tested), let me know and I'll fix it.
Diffstat (limited to 'libc/stdio/vasprintf.c')
-rw-r--r--libc/stdio/vasprintf.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/libc/stdio/vasprintf.c b/libc/stdio/vasprintf.c
index 1ef75df94..688ab7cd5 100644
--- a/libc/stdio/vasprintf.c
+++ b/libc/stdio/vasprintf.c
@@ -7,6 +7,7 @@
#include "_stdio.h"
#include <stdarg.h>
+#include <bits/uClibc_va_copy.h>
#ifdef __UCLIBC_MJN3_ONLY__
/* Do the memstream stuff inline to avoid fclose and the openlist? */
@@ -17,19 +18,6 @@
#warning Skipping vasprintf since no vsnprintf!
#else
-/* Deal with pre-C99 compilers. */
-
-#ifndef va_copy
-
-#ifdef __va_copy
-#define va_copy(A,B) __va_copy(A,B)
-#else
-#warning Neither va_copy (C99/SUSv3) nor __va_copy is defined. Using a simple copy instead. But you should really check that this is appropriate...
-#define va_copy(A,B) A = B
-#endif
-
-#endif /* va_copy */
-
int vasprintf(char **__restrict buf, const char * __restrict format,
va_list arg)
{