source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/swprintf.inl@ 1175

Last change on this file since 1175 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 2.3 KB
Line 
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#ifdef __mingw_static_ovr
16#undef __mingw_static_ovr
17#define __mingw_static_ovr __mingw_ovr
18#endif
19#elif defined(__cplusplus)
20#define __mingw_ovr inline __cdecl
21#else
22#define __mingw_ovr static __cdecl
23#endif
24
25__mingw_ovr
26/* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3)
27int vswprintf (wchar_t *__stream, size_t __count, const wchar_t *__format, __builtin_va_list __local_argv)
28{
29 return vsnwprintf( __stream, __count, __format, __local_argv );
30}
31
32__mingw_ovr
33/* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3)
34int swprintf (wchar_t *__stream, size_t __count, const wchar_t *__format, ...)
35{
36 int __retval;
37 __builtin_va_list __local_argv;
38
39 __builtin_va_start( __local_argv, __format );
40 __retval = vswprintf( __stream, __count, __format, __local_argv );
41 __builtin_va_end( __local_argv );
42 return __retval;
43}
44
45#ifdef __cplusplus
46
47extern "C++" {
48
49__mingw_ovr
50/* __attribute__((__format__ (gnu_wprintf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2)
51int vswprintf (wchar_t *__stream, const wchar_t *__format, __builtin_va_list __local_argv)
52{
53#if __USE_MINGW_ANSI_STDIO
54 return __mingw_vswprintf( __stream, __format, __local_argv );
55#else
56 return _vswprintf( __stream, __format, __local_argv );
57#endif
58}
59
60__mingw_ovr
61/* __attribute__((__format__ (gnu_wprintf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
62int swprintf (wchar_t *__stream, const wchar_t *__format, ...)
63{
64 int __retval;
65 __builtin_va_list __local_argv;
66
67 __builtin_va_start( __local_argv, __format );
68 __retval = vswprintf( __stream, __format, __local_argv );
69 __builtin_va_end( __local_argv );
70 return __retval;
71}
72
73}
74
75#elif defined(_CRT_NON_CONFORMING_SWPRINTFS)
76
77#if __USE_MINGW_ANSI_STDIO
78#define swprintf __mingw_swprintf
79#define vswprintf __mingw_vswprintf
80#else
81#define swprintf _swprintf
82#define vswprintf _vswprintf
83#endif
84
85#endif /* __cplusplus */
86
87#endif /* _INC_SWPRINTF_INL */
Note: See TracBrowser for help on using the repository browser.