From 5d76dd5632d800615c795c28bcc5090e2a50315b Mon Sep 17 00:00:00 2001 From: "N.N." Date: Sun, 26 Apr 2009 17:15:18 +0000 Subject: moved some asprintf stuff that really should go in the .c instead of .h svn path=/trunk/; revision=11153 --- desiredata/src/desire.h | 19 ------------------- desiredata/src/kernel.c | 22 +++++++++++++++++++++- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/desiredata/src/desire.h b/desiredata/src/desire.h index eb87fef4..26645061 100644 --- a/desiredata/src/desire.h +++ b/desiredata/src/desire.h @@ -55,25 +55,6 @@ extern "C" { #ifndef HAVE_VASPRINTF #define HAVE_VASPRINTF -#include -#include -#include -#include -#include - -#ifndef VA_COPY -# ifdef HAVE_VA_COPY -# define VA_COPY(dest, src) va_copy(dest, src) -# else -# ifdef HAVE___VA_COPY -# define VA_COPY(dest, src) __va_copy(dest, src) -# else -# define VA_COPY(dest, src) (dest) = (src) -# endif -# endif -#endif - -#define INIT_SZ 128 extern int vasprintf(char **str, const char *fmt, va_list ap); #endif diff --git a/desiredata/src/kernel.c b/desiredata/src/kernel.c index 03ef0d59..f7ccc246 100644 --- a/desiredata/src/kernel.c +++ b/desiredata/src/kernel.c @@ -7,7 +7,7 @@ /* IOhannes : * changed the canvas_restore in "g_canvas.c", so that it might accept $args as well (like "pd $0_test") * so you can make multiple & distinguishable templates - * 1511:forum::für::umläute:2001 + * 1511:forum::f�r::uml�ute:2001 * change marked with IOhannes */ @@ -2362,6 +2362,26 @@ int asprintf(char **str, const char *fmt, ...) } #endif /* HAVE_ASPRINTF */ #ifndef HAVE_VASPRINTF +#include +#include +#include +#include +#include + +#ifndef VA_COPY +# ifdef HAVE_VA_COPY +# define VA_COPY(dest, src) va_copy(dest, src) +# else +# ifdef HAVE___VA_COPY +# define VA_COPY(dest, src) __va_copy(dest, src) +# else +# define VA_COPY(dest, src) (dest) = (src) +# endif +# endif +#endif + +#define INIT_SZ 128 + int vasprintf(char **str, const char *fmt, va_list ap) { int ret = -1; -- cgit v1.2.1