Go to file
Pali Rohár 581532b8e4 headers: Fix _*tscanf and _*tprintf macros which expands to ISO C functions
Ensure that all these MS specific _*t* macros always expands to MS variant
of scanf and printf functions independently of __USE_MINGW_ANSI_STDIO.

Majority of the _*t* macros expands to MS specific variants of stdio
functions which are not provided by mingw when __USE_MINGW_ANSI_STDIO=1.

But some few are, e.g. _tscanf which currently expands to scanf or wscanf.
And this can cause that _tscanf behaves differently than _tscanf_l (which
does not have __USE_MINGW_ANSI_STDIO=1 replacement.

Another example is %s in _stprintf() macro. MS variant of wide-printf
treats %s as wchar_*t, but C95+ mandates that %s is always char*.

_stprintf() is suppose to be called as:

  _stprintf(buffer, _T("%s"), _T("string"));

And wide variant would work correctly only in the case %s takes wchar_t*.

With this change behavior of all _*t* macros would be same and expands
always only to MS function, which also ensures compatibility of %s with
arguments passed to _*t* macros.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-11-15 23:54:11 +02:00
build-aux Regenerate configure with autoconf 2.72 2024-01-09 22:26:23 +08:00
COPYING.MinGW-w64 Remove Fixme about csq.h 2010-02-23 15:17:58 +00:00
COPYING.MinGW-w64-runtime Add 2011-2013 to copyright years 2013-02-26 20:28:23 +00:00
mingw-w64-crt crt: Add _(v)scwprintf emulation for msvcrt.dll 2024-11-15 23:54:11 +02:00
mingw-w64-doc doc: ucrt-vs-msvcrt.txt: Update information about CRT options and links how to obtain UCRT 2024-09-02 23:17:51 +03:00
mingw-w64-headers headers: Fix _*tscanf and _*tprintf macros which expands to ISO C functions 2024-11-15 23:54:11 +02:00
mingw-w64-libraries winpthreads: also use SetThreadDescription to set thread name 2024-10-29 22:39:01 +08:00
mingw-w64-tools widl: Import Wine version wine-9.20. 2024-10-18 23:16:01 +02:00
.gitignore winpthreads: Ignore MSVC object files and Autotools generated files 2023-12-19 15:25:13 +02:00
aclocal.m4 Regenerate configure with autoconf 2.72 2024-01-09 22:26:23 +08:00
AUTHORS Merge commit '954b97bcfc515152cb5e666411d3ca0b256d589b' 2019-06-03 10:37:03 +02:00
config.h.in Add top level configury system 2010-02-24 17:55:02 +00:00
configure Regenerate configure with autoconf 2.72 2024-01-09 22:26:23 +08:00
configure.ac build: enable specific tools and libraries 2017-11-06 23:05:00 +00:00
COPYING Add 2013 as copyright year. 2013-02-26 20:29:09 +00:00
DISCLAIMER removed svn:executable property. 2010-01-15 20:22:39 +00:00
DISCLAIMER.PD Replace 'w64 mingw-runtime' by 'mingw-w64 runtime' 2012-06-28 15:40:59 +00:00
Makefile.am build: autoconf: support winpthreads library 2017-10-07 23:36:26 +00:00
Makefile.in Regenerate autotools scripts with automake 1.16.5 2023-11-17 13:14:02 +08:00