1/** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 7#ifndef _INC_SWPRINTF_INL 8#define _INC_SWPRINTF_INL 9 10#include <vadefs.h> 11 12#undef __mingw_ovr 13#if defined (__GNUC__) 14#define __mingw_ovr static __attribute__ ((__unused__)) __inline__ __cdecl 15#elif defined(__cplusplus) 16#define __mingw_ovr inline __cdecl 17#else 18#define __mingw_ovr static __cdecl 19#endif 20 21__mingw_ovr 22/* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3) 23int vswprintf (wchar_t *__stream, size_t __count, const wchar_t *__format, __builtin_va_list __local_argv) 24{ 25 return vsnwprintf( __stream, __count, __format, __local_argv ); 26} 27 28__mingw_ovr 29/* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3) 30int swprintf (wchar_t *__stream, size_t __count, const wchar_t *__format, ...) 31{ 32 register int __retval; 33 __builtin_va_list __local_argv; 34 35 __builtin_va_start( __local_argv, __format ); 36 __retval = vswprintf( __stream, __count, __format, __local_argv ); 37 __builtin_va_end( __local_argv ); 38 return __retval; 39} 40 41#ifdef __cplusplus 42 43extern "C++" { 44 45__mingw_ovr 46/* __attribute__((__format__ (gnu_wprintf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2) 47int vswprintf (wchar_t *__stream, const wchar_t *__format, __builtin_va_list __local_argv) 48{ 49#if __USE_MINGW_ANSI_STDIO 50 return __mingw_vswprintf( __stream, __format, __local_argv ); 51#else 52 return _vswprintf( __stream, __format, __local_argv ); 53#endif 54} 55 56__mingw_ovr 57/* __attribute__((__format__ (gnu_wprintf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2) 58int swprintf (wchar_t *__stream, const wchar_t *__format, ...) 59{ 60 register int __retval; 61 __builtin_va_list __local_argv; 62 63 __builtin_va_start( __local_argv, __format ); 64 __retval = vswprintf( __stream, __format, __local_argv ); 65 __builtin_va_end( __local_argv ); 66 return __retval; 67} 68 69} 70 71#elif defined(_CRT_NON_CONFORMING_SWPRINTFS) 72 73#if __USE_MINGW_ANSI_STDIO 74#define swprintf __mingw_swprintf 75#define vswprintf __mingw_vswprintf 76#else 77#define swprintf _swprintf 78#define vswprintf _vswprintf 79#endif 80 81#endif /* __cplusplus */ 82 83#endif /* _INC_SWPRINTF_INL */