diff options
author | thevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4> | 2009-03-27 09:34:03 +0000 |
---|---|---|
committer | thevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4> | 2009-03-27 09:34:03 +0000 |
commit | b4181d68215d3d4dd85d7d84f32c64516d55710f (patch) | |
tree | 81ac53191b586f807cb57e3f22ee045f67fb3779 /printf.c | |
parent | 8427a181b42c4156f0abc20fe6b77fc29fb556ee (diff) | |
download | mpfr-b4181d68215d3d4dd85d7d84f32c64516d55710f.tar.gz |
acinclude.m4: remove definition of va_copy, just detect its presence.
printf.c vasprintf.c: #define a replacement of va_copy if needed (in the same way as gmp).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6143 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'printf.c')
-rw-r--r-- | printf.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -28,6 +28,19 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., #ifdef HAVE_STDARG #include <stdarg.h> + +#ifndef HAVE_VA_COPY +# ifdef HAVE___VA_COPY +# define va_copy(dst,src) __va_copy(dst, src) +# else +/* autoconf manual advocates this fallback. + This is also the solution chosen by gmp */ +# define va_copy(dst,src) \ + do { memcpy(&(dst), &(src), sizeof(va_list)); } while (0) +# endif /* HAVE___VA_COPY */ +#endif /* HAVE_VA_COPY */ + + #include <errno.h> #include "mpfr-impl.h" |