From 371ca78703d0f0a6aedb9879a3120b75d9f6e587 Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Mon, 14 Feb 2005 05:58:08 +0000 Subject: 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. --- libc/sysdeps/linux/common/bits/uClibc_va_copy.h | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 libc/sysdeps/linux/common/bits/uClibc_va_copy.h (limited to 'libc/sysdeps') diff --git a/libc/sysdeps/linux/common/bits/uClibc_va_copy.h b/libc/sysdeps/linux/common/bits/uClibc_va_copy.h new file mode 100644 index 000000000..cc41b6029 --- /dev/null +++ b/libc/sysdeps/linux/common/bits/uClibc_va_copy.h @@ -0,0 +1,27 @@ +/* Copyright (C) 2005 Manuel Novoa III + * + * GNU Library General Public License (LGPL) version 2 or later. + * + * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details. + */ + +#ifndef _UCLIBC_VA_COPY_H +#define _UCLIBC_VA_COPY_H 1 + +#include + +/* 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) or __va_copy is defined. Using a simple copy instead. But you should really check that this is appropriate and supply an arch-specific override if necessary. + /* the glibc manual suggests that this will usually suffice when + __va_copy doesn't exist. */ +#define va_copy(A,B) A = B +#endif + +#endif /* va_copy */ + +#endif /* _UCLIBC_VA_COPY_H */ -- cgit v1.2.3