Cygwin: access: Fix X_OK behaviour for backup operators and admins
[newlib-cygwin.git] / newlib / libc / machine / spu / vsnprintf.c
blob298165f5a03f85c399cd19cc142c9230bdba2ca0
1 #include <_ansi.h>
2 #include <stdio.h>
4 #include "c99ppe.h"
6 #include <stdarg.h>
8 #ifdef INTEGER_ONLY
9 # define vsnprintf vsniprintf
10 #endif
12 typedef struct
14 char* str;
15 unsigned int pad0[ 3 ];
16 size_t size;
17 unsigned int pad1[ 3 ];
18 const char* fmt;
19 unsigned int pad2[ 3 ];
20 va_list ap;
21 } c99_vsnprintf_t;
23 #ifndef _REENT_ONLY
25 int
26 vsnprintf (char *__restrict str,
27 size_t size,
28 const char *__restrict fmt,
29 va_list ap)
31 c99_vsnprintf_t args;
33 CHECK_STR_INIT(_REENT);
35 args.str = str;
36 args.size = size;
37 args.fmt = fmt;
38 va_copy(args.ap,ap);
40 return __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSNPRINTF, &args);
43 #endif /* ! _REENT_ONLY */