Cygwin: Add new APIs tc[gs]etwinsize()
[newlib-cygwin.git] / newlib / libc / machine / spu / vsprintf.c
blob8317a66365b1d46990f6b9b9c7181a972cf42c1a
2 #include <_ansi.h>
3 #include <stdio.h>
5 #include "c99ppe.h"
7 #include <stdarg.h>
9 #ifdef INTEGER_ONLY
10 # define vsprintf vsiprintf
11 #endif
13 typedef struct
15 char *str;
16 unsigned int pad0[ 3 ];
17 char *fmt;
18 unsigned int pad1[ 3 ];
19 va_list ap;
20 } c99_vsprintf_t;
22 #ifndef _REENT_ONLY
24 int
25 vsprintf (char *__restrict str,
26 const char *__restrict fmt,
27 va_list ap)
29 c99_vsprintf_t args;
31 CHECK_STR_INIT(_REENT);
33 args.str = str;
34 args.fmt = (char*) fmt;
35 va_copy(args.ap,ap);
37 return __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSPRINTF, &args);
40 #endif /* ! _REENT_ONLY */