• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <windows.h>
2 #include <malloc.h>
3 #include <errno.h>
4 #include <msvcrt.h>
5 #include <sec_api/wchar_s.h>
6 
7 static int __cdecl _int_vcwprintf_s_l (const wchar_t *, _locale_t, va_list);
8 static int __cdecl _stub (const wchar_t *, _locale_t, va_list);
9 
10 int __cdecl (*__MINGW_IMP_SYMBOL(_vcwprintf_s_l))(const wchar_t *, _locale_t, va_list) =
11  _stub;
12 
13 static int __cdecl
_stub(const wchar_t * s,_locale_t loc,va_list argp)14 _stub (const wchar_t *s, _locale_t loc, va_list argp)
15 {
16   int __cdecl (*f)(const wchar_t *, _locale_t, va_list) = __MINGW_IMP_SYMBOL(_vcwprintf_s_l);
17 
18   if (f == _stub)
19     {
20 	f = (int __cdecl (*)(const wchar_t *, _locale_t, va_list))
21 	    GetProcAddress (__mingw_get_msvcrt_handle (), "_vcwprintf_s_l");
22 	if (!f)
23 	  f = _int_vcwprintf_s_l;
24 	__MINGW_IMP_SYMBOL(_vcwprintf_s_l) = f;
25     }
26   return (*f)(s, loc, argp);
27 }
28 
29 int __cdecl
_vcwprintf_s_l(const wchar_t * s,_locale_t loc,va_list argp)30 _vcwprintf_s_l (const wchar_t *s, _locale_t loc, va_list argp)
31 {
32   return _stub (s, loc, argp);
33 }
34 
35 static int __cdecl
_int_vcwprintf_s_l(const wchar_t * s,_locale_t loc,va_list argp)36 _int_vcwprintf_s_l (const wchar_t *s, _locale_t loc, va_list argp)
37 {
38   return _vcwprintf_l (s, loc, argp);
39 }
40