And this time with attachment ....

2014-04-05 21:41 GMT+02:00 Kai Tietz <[email protected]>:
> Something like this patch might resolve the issue you found.
>
> Kai
>
> PS:  Not sure if patch is complete.  For stdio_s we moved _l and _p
> functions to secure-API too.  Nevertheless we didn't did so for
> wchar(_s), and stdlib(_s) headers.  This looks to me at least
> inconsistent.
Index: stdio.h
===================================================================
--- stdio.h     (Revision 6548)
+++ stdio.h     (Arbeitskopie)
@@ -453,7 +453,6 @@ int vsnprintf (char *__stream, size_t __n, const c
   int __cdecl fputs(const char * __restrict__ _Str,FILE * __restrict__ _File);
   size_t __cdecl fread(void * __restrict__ _DstBuf,size_t _ElementSize,size_t 
_Count,FILE * __restrict__ _File);
   FILE *__cdecl freopen(const char * __restrict__ _Filename,const char * 
__restrict__ _Mode,FILE * __restrict__ _File) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
-  int __cdecl _fscanf_l(FILE * __restrict__ _File,const char * __restrict__ 
_Format,_locale_t locale,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   int __cdecl fsetpos(FILE *_File,const fpos_t *_Pos);
   int __cdecl fsetpos64(FILE *_File,const fpos_t *_Pos); /* fsetpos already 
64bit */
   int __cdecl fseek(FILE *_File,long _Offset,int _Origin);
@@ -515,7 +514,6 @@ int vsnprintf (char *__stream, size_t __n, const c
 #endif
   void __cdecl rewind(FILE *_File);
   _CRTIMP int __cdecl _rmtmp(void);
-  int __cdecl _scanf_l(const char * __restrict__ format,_locale_t locale,... ) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   void __cdecl setbuf(FILE * __restrict__ _File,char * __restrict__ _Buffer) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   _CRTIMP int __cdecl _setmaxstdio(int _Max);
   _CRTIMP unsigned int __cdecl _set_output_format(unsigned int _Format);
@@ -522,18 +520,13 @@ int vsnprintf (char *__stream, size_t __n, const c
   _CRTIMP unsigned int __cdecl _get_output_format(void);
   int __cdecl setvbuf(FILE * __restrict__ _File,char * __restrict__ _Buf,int 
_Mode,size_t _Size);
   _CRTIMP int __cdecl _scprintf(const char * __restrict__ _Format,...);
-  int __cdecl _sscanf_l(const char * __restrict__ buffer,const char * 
__restrict__ format,_locale_t locale,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   _CRTIMP int __cdecl _snscanf(const char * __restrict__ _Src,size_t 
_MaxCount,const char * __restrict__ _Format,...) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
-  _CRTIMP int __cdecl _snscanf_l(const char * __restrict__ input,size_t 
length,const char * __restrict__ format,_locale_t locale,...) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   FILE *__cdecl tmpfile(void) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   char *__cdecl tmpnam(char *_Buffer);
   int __cdecl ungetc(int _Ch,FILE *_File);
 
   _CRTIMP int __cdecl _snprintf(char * __restrict__ _Dest,size_t _Count,const 
char * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
-  _CRTIMP int __cdecl _snprintf_l(char * __restrict__ buffer,size_t 
count,const char * __restrict__ format,_locale_t locale,...) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   _CRTIMP int __cdecl _vsnprintf(char * __restrict__ _Dest,size_t _Count,const 
char * __restrict__ _Format,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
-  _CRTIMP int __cdecl _vsnprintf_l(char * __restrict__ buffer,size_t 
count,const char * __restrict__ format,_locale_t locale,va_list argptr) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
-  int __cdecl _sprintf_l(char * __restrict__ buffer,const char * __restrict__ 
format,_locale_t locale,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
 
 #if !defined (__USE_MINGW_ANSI_STDIO) || __USE_MINGW_ANSI_STDIO == 0
 /* this is here to deal with software defining
@@ -790,7 +783,6 @@ int vsnwprintf (wchar_t *__stream, size_t __n, con
   _CRTIMP int __cdecl _putws(const wchar_t *_Str);
 
   _CRTIMP int __cdecl _scwprintf(const wchar_t * __restrict__ _Format,...);
-  _CRTIMP int __cdecl _swprintf_l(wchar_t * __restrict__ buffer,size_t 
count,const wchar_t * __restrict__ format,_locale_t locale,... ) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   _CRTIMP int __cdecl _swprintf_c(wchar_t * __restrict__ _DstBuf,size_t 
_SizeInWords,const wchar_t * __restrict__ _Format,...);
   _CRTIMP int __cdecl _vswprintf_c(wchar_t * __restrict__ _DstBuf,size_t 
_SizeInWords,const wchar_t * __restrict__ _Format,va_list _ArgList);
   _CRTIMP int __cdecl _snwprintf(wchar_t * __restrict__ _Dest,size_t 
_Count,const wchar_t * __restrict__ _Format,...) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
@@ -825,36 +817,8 @@ int vsnwprintf (wchar_t *__stream, size_t __n, con
 #endif
 
 #endif /* ! __NO_ISOCEXT */
-  _CRTIMP int __cdecl _fwprintf_p(FILE * __restrict__ _File,const wchar_t * 
__restrict__ _Format,...);
-  _CRTIMP int __cdecl _wprintf_p(const wchar_t * __restrict__ _Format,...);
-  _CRTIMP int __cdecl _vfwprintf_p(FILE * __restrict__ _File,const wchar_t * 
__restrict__ _Format,va_list _ArgList);
-  _CRTIMP int __cdecl _vwprintf_p(const wchar_t * __restrict__ _Format,va_list 
_ArgList);
-  _CRTIMP int __cdecl _swprintf_p(wchar_t * __restrict__ _DstBuf,size_t 
_MaxCount,const wchar_t * __restrict__ _Format,...);
-  _CRTIMP int __cdecl _vswprintf_p(wchar_t * __restrict__ _DstBuf,size_t 
_MaxCount,const wchar_t * __restrict__ _Format,va_list _ArgList);
-  _CRTIMP int __cdecl _scwprintf_p(const wchar_t * __restrict__ _Format,...);
-  _CRTIMP int __cdecl _vscwprintf_p(const wchar_t * __restrict__ 
_Format,va_list _ArgList);
-  _CRTIMP int __cdecl _wprintf_l(const wchar_t * __restrict__ 
_Format,_locale_t _Locale,...);
-  _CRTIMP int __cdecl _wprintf_p_l(const wchar_t * __restrict__ 
_Format,_locale_t _Locale,...);
-  _CRTIMP int __cdecl _vwprintf_l(const wchar_t * __restrict__ 
_Format,_locale_t _Locale,va_list _ArgList);
-  _CRTIMP int __cdecl _vwprintf_p_l(const wchar_t * __restrict__ 
_Format,_locale_t _Locale,va_list _ArgList);
-  _CRTIMP int __cdecl _fwprintf_l(FILE * __restrict__ _File,const wchar_t * 
__restrict__ _Format,_locale_t _Locale,...);
-  _CRTIMP int __cdecl _fwprintf_p_l(FILE * __restrict__ _File,const wchar_t * 
__restrict__ _Format,_locale_t _Locale,...);
-  _CRTIMP int __cdecl _vfwprintf_l(FILE * __restrict__ _File,const wchar_t * 
__restrict__ _Format,_locale_t _Locale,va_list _ArgList);
-  _CRTIMP int __cdecl _vfwprintf_p_l(FILE * __restrict__ _File,const wchar_t * 
__restrict__ _Format,_locale_t _Locale,va_list _ArgList);
-  _CRTIMP int __cdecl _swprintf_c_l(wchar_t * __restrict__ _DstBuf,size_t 
_MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
-  _CRTIMP int __cdecl _swprintf_p_l(wchar_t * __restrict__ _DstBuf,size_t 
_MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
-  _CRTIMP int __cdecl _vswprintf_c_l(wchar_t * __restrict__ _DstBuf,size_t 
_MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list 
_ArgList);
-  _CRTIMP int __cdecl _vswprintf_p_l(wchar_t * __restrict__ _DstBuf,size_t 
_MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list 
_ArgList);
-  _CRTIMP int __cdecl _scwprintf_l(const wchar_t * __restrict__ 
_Format,_locale_t _Locale,...);
-  _CRTIMP int __cdecl _scwprintf_p_l(const wchar_t * __restrict__ 
_Format,_locale_t _Locale,...);
-  _CRTIMP int __cdecl _vscwprintf_p_l(const wchar_t * __restrict__ 
_Format,_locale_t _Locale,va_list _ArgList);
-  _CRTIMP int __cdecl _snwprintf_l(wchar_t * __restrict__ _DstBuf,size_t 
_MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
-  _CRTIMP int __cdecl _vsnwprintf_l(wchar_t * __restrict__ _DstBuf,size_t 
_MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list 
_ArgList) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   _CRTIMP int __cdecl _swprintf(wchar_t * __restrict__ _Dest,const wchar_t * 
__restrict__ _Format,...);
   _CRTIMP int __cdecl _vswprintf(wchar_t * __restrict__ _Dest,const wchar_t * 
__restrict__ _Format,va_list _Args);
-  _CRTIMP int __cdecl __swprintf_l(wchar_t * __restrict__ _Dest,const wchar_t 
* __restrict__ _Format,_locale_t _Plocinfo,...) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
-  _CRTIMP int __cdecl _vswprintf_l(wchar_t * __restrict__ buffer,size_t 
count,const wchar_t * __restrict__ format,_locale_t locale,va_list argptr) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
-  _CRTIMP int __cdecl __vswprintf_l(wchar_t * __restrict__ _Dest,const wchar_t 
* __restrict__ _Format,_locale_t _Plocinfo,va_list _Args) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
 
 #ifndef RC_INVOKED
 #include <swprintf.inl>
@@ -869,12 +833,7 @@ int vsnwprintf (wchar_t *__stream, size_t __n, con
 
   _CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t 
*_FilePrefix);
   _CRTIMP int __cdecl _vscwprintf(const wchar_t * __restrict__ _Format,va_list 
_ArgList);
-  _CRTIMP int __cdecl _vscwprintf_l(const wchar_t * __restrict__ 
_Format,_locale_t _Locale,va_list _ArgList);
-  _CRTIMP int __cdecl _fwscanf_l(FILE * __restrict__ _File,const wchar_t * 
__restrict__ _Format,_locale_t _Locale,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
-  _CRTIMP int __cdecl _swscanf_l(const wchar_t * __restrict__ _Src,const 
wchar_t * __restrict__ _Format,_locale_t _Locale,...) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   _CRTIMP int __cdecl _snwscanf(const wchar_t * __restrict__ _Src,size_t 
_MaxCount,const wchar_t * __restrict__ _Format,...);
-  _CRTIMP int __cdecl _snwscanf_l(const wchar_t * __restrict__ _Src,size_t 
_MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
-  _CRTIMP int __cdecl _wscanf_l(const wchar_t * __restrict__ _Format,_locale_t 
_Locale,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   _CRTIMP FILE *__cdecl _wfdopen(int _FileHandle ,const wchar_t *_Mode);
   _CRTIMP FILE *__cdecl _wfopen(const wchar_t * __restrict__ _Filename,const 
wchar_t *__restrict__  _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   _CRTIMP FILE *__cdecl _wfreopen(const wchar_t * __restrict__ _Filename,const 
wchar_t * __restrict__ _Mode,FILE * __restrict__ _OldFile) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to