• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 // For ucrt, this function normally is an inline function in stdio.h.
8 // libmingwex doesn't use the ucrt version of headers, and wassert.c can
9 // end up requiring a concrete version of it.
10 
11 #ifdef __GNUC__
12 #pragma GCC diagnostic push
13 #pragma GCC diagnostic ignored "-Winline"
14 #endif
15 
16 #undef __MSVCRT_VERSION__
17 #define _UCRT
18 
19 #define _snwprintf real__snwprintf
20 
21 #include <stdarg.h>
22 #include <stdio.h>
23 
24 #undef _snwprintf
25 
26 int __cdecl _snwprintf(wchar_t * restrict _Dest, size_t _Count, const wchar_t * restrict _Format, ...);
27 
_snwprintf(wchar_t * restrict _Dest,size_t _Count,const wchar_t * restrict _Format,...)28 int __cdecl _snwprintf(wchar_t * restrict _Dest, size_t _Count, const wchar_t * restrict _Format, ...)
29 {
30   va_list ap;
31   int ret;
32   va_start(ap, _Format);
33   ret = vsnwprintf(_Dest, _Count, _Format, ap);
34   va_end(ap);
35   return ret;
36 }
37 
38 int __cdecl (*__MINGW_IMP_SYMBOL(_snwprintf))(wchar_t *restrict, size_t, const wchar_t *restrict, ...) = _snwprintf;
39 #ifdef __GNUC__
40 #pragma GCC diagnostic pop
41 #endif
42