mingw-w64/mingw-w64-headers/crt
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
..
sdks headers: Get rid of _mingw_directx.h. 2020-01-20 15:41:40 +01:00
sec_api headers: Add missing cases of _CRT_INTERNAL_LOCAL_PRINTF_OPTIONS for narrow printfs 2024-09-06 13:49:07 +03:00
sys headers: Fix ftime function for __CRT__NO_INLINE 2024-09-27 23:52:58 +03:00
_bsd_types.h Fix typo ... 2012-07-30 15:15:58 +00:00
_cygwin.h Fix Cygwin builds 2013-07-23 12:33:54 +00:00
_mingw_mac.h _mingw_mac.h: bump to 13.x 2024-05-29 02:40:37 +00:00
_mingw_off_t.h removed svn:executable property 2011-08-09 13:29:32 +00:00
_mingw_secapi.h Remove support for --disable-secure-api. 2019-03-01 12:36:44 +01:00
_mingw_stat64.h headers: Fix *stat* macros in _mingw_stat64.h header file 2024-05-30 15:52:48 +03:00
_mingw_stdarg.h Replace 'w64 mingw-runtime' by 'mingw-w64 runtime' 2012-06-28 15:40:59 +00:00
_mingw_unicode.h Replace 'w64 mingw-runtime' by 'mingw-w64 runtime' 2012-06-28 15:40:59 +00:00
_mingw.h.in headers/_mingw: Add macros for conditional constexpr 2024-11-12 17:03:09 +08:00
_timeval.h Replace 'w64 mingw-runtime' by 'mingw-w64 runtime' 2012-06-28 15:40:59 +00:00
assert.h headers: Add noreturn attributes to the _assert/_wassert functions 2023-04-05 14:25:29 +03:00
ChangeLog 2014-03-03 Ray Donnelly mingw.android@gmail.com 2014-03-03 19:55:42 +00:00
ChangeLog-2009 formatting/whitespace fix for ChangeLog 2010-05-02 15:01:14 +00:00
ChangeLog.2010 Fix Changelog format. 2011-01-04 09:35:43 +00:00
ChangeLog.2011 Rotate ChangeLog 2012-01-06 14:52:24 +00:00
ChangeLog.2012 Bump 2012 2013-01-11 16:06:50 +00:00
ChangeLog.2013 Rotate 2013 log 2014-01-25 02:21:20 +00:00
complex.h complex: Add clog10*. 2016-03-25 18:53:37 +08:00
conio.h crt/{stdio,conio,wchar}: Move attributes before function declarators 2021-04-22 11:14:26 +08:00
corecrt_startup.h headers: Declare missing UCRT corecrt_startup.h functions 2024-08-12 23:14:00 +03:00
corecrt_stdio_config.h headers: Enable _CRT_INTERNAL_PRINTF_STANDARD_ROUNDING by default 2024-09-06 13:49:07 +03:00
corecrt_wstdlib.h headers: Add missing extern "C" from 228a789d38 2019-03-02 08:38:54 +02:00
corecrt.h headers: Move _UCRT into '_mingw.h' from 'corecrt.h' 2021-07-25 11:36:02 +08:00
crtdbg.h headers: crt: Add declarations for _aligned_msize 2023-04-02 21:12:13 +08:00
crtdefs.h corecrt.h: Add new file and move declaration from crtdefs.h there. 2019-03-01 12:36:49 +01:00
ctype.h headers: Expose the wchar ctype _l functions for msvcrt.dll for Vista 2024-10-12 00:55:33 +03:00
dir.h Replace 'w64 mingw-runtime' by 'mingw-w64 runtime' 2012-06-28 15:40:59 +00:00
direct.h include/crt: Ensure declarations of _*_nolock match MSVCRT version 2021-02-06 10:11:49 +08:00
dirent.h Moved srtuct declarations from _mingw.h to crtdefs.h 2012-07-04 13:06:41 +00:00
dos.h headers: crt: disable some drive API's in winstore builds 2020-04-21 21:43:02 +08:00
dvec.h Moved srtuct declarations from _mingw.h to crtdefs.h 2012-07-04 13:06:41 +00:00
eh.h headers: Include typeinfo in eh.h for std::type_info 2022-12-13 11:58:44 +08:00
errno.h some errnos added(PR 564) 2016-10-09 02:50:06 +03:00
excpt.h headers: Fix macros in except.h 2023-01-07 20:23:09 +08:00
fcntl.h Moved srtuct declarations from _mingw.h to crtdefs.h 2012-07-04 13:06:41 +00:00
fenv.h fenv: Merge the arm and aarch64 sections of fenv.h 2017-08-27 14:01:31 +03:00
float.h headers: Fix _SECIMP comment 2022-09-20 11:18:06 +03:00
fpieee.h Moved srtuct declarations from _mingw.h to crtdefs.h 2012-07-04 13:06:41 +00:00
ftw.h Add new header and implementation for File Tree Walking API. 2014-08-20 15:51:39 +02:00
fvec.h headers: Fix include order of fvec.h/ivec.h/dvec.h referring to each other 2020-05-07 20:11:26 +03:00
getopt.h headers: Make getopt.h react to _BSD_SOURCE after being included once first 2023-12-20 15:38:36 +02:00
ieeefp.h Do not include non-exist header file 'ansidecl.h'. 2015-01-03 15:56:30 +08:00
intrin.h headers: Stop including mm3dnow.h in intrin.h 2024-07-29 23:53:39 +03:00
inttypes.h inttypes: Fix check for __USE_MINGW_ANSI_STDIO 2023-03-02 14:52:47 +08:00
io.h headers: _FORTIFY_SOURCE: Enhance missing open() argument warning 2023-02-04 21:18:04 +08:00
ivec.h headers: Fix include order of fvec.h/ivec.h/dvec.h referring to each other 2020-05-07 20:11:26 +03:00
libgen.h Moved srtuct declarations from _mingw.h to crtdefs.h 2012-07-04 13:06:41 +00:00
limits.h Fix CHAR_MIN and CHAR_MAX for C11 when -funsigned-char is used 2015-09-01 21:20:03 +08:00
locale.h headers/locale: Make result of localeconv() accord to GCC's -funsigned-char option 2021-06-14 19:27:13 +08:00
malloc.h headers: Fix _amblksiz definition 2024-08-09 14:13:47 +03:00
math.h headers: Avoid false-positive -Wconversion warnings in isnan() macro 2024-09-14 20:08:38 +08:00
mbctype.h crt: Provide __p__mbcasemap() function and use it for _mbcasemap 2024-06-15 00:07:25 +03:00
mbstring.h Moved srtuct declarations from _mingw.h to crtdefs.h 2012-07-04 13:06:41 +00:00
mem.h Replace 'w64 mingw-runtime' by 'mingw-w64 runtime' 2012-06-28 15:40:59 +00:00
memory.h headers: Fix _SECIMP comment 2022-09-20 11:18:06 +03:00
new.h headers: Fix new.h to work also in C mode 2024-08-12 23:14:00 +03:00
process.h include/process: fix bare DllMain/_CRT_INIT signature 2023-09-29 20:46:53 +08:00
profile.h Move profile-header from platform-headers to C-runtime-headers. 2014-05-22 12:47:37 +02:00
pthread_signal.h spelling 2015-08-16 15:20:15 +08:00
pthread_time.h spelling 2015-08-16 15:20:15 +08:00
pthread_unistd.h spelling 2015-08-16 15:20:15 +08:00
search.h crt: Implement tdestroy 2022-10-23 21:58:24 +08:00
sehmap.h Replace 'w64 mingw-runtime' by 'mingw-w64 runtime' 2012-06-28 15:40:59 +00:00
setjmp.h headers: Remove the unused ifdefs for USE_NO_MINGW_SETJMP_TWO_ARGS 2023-03-09 14:05:35 +02:00
setjmpex.h Replace 'w64 mingw-runtime' by 'mingw-w64 runtime' 2012-06-28 15:40:59 +00:00
share.h Replace 'w64 mingw-runtime' by 'mingw-w64 runtime' 2012-06-28 15:40:59 +00:00
signal.h New dummy signal.h entry for pthread 2013-09-07 05:29:31 +00:00
stdarg.h 2010-07-22 Ozkan Sezer <sezeroz@gmail.com> 2010-07-22 20:30:46 +00:00
stddef.h stddef.h: Avoid max_align_t declaration conflict with clang stddef.h. 2018-07-13 00:37:16 +02:00
stdexcpt.h Moved srtuct declarations from _mingw.h to crtdefs.h 2012-07-04 13:06:41 +00:00
stdint.h Moved srtuct declarations from _mingw.h to crtdefs.h 2012-07-04 13:06:41 +00:00
stdio.h crt: Fix non-ISO (v)snwprintf() functions when __USE_MINGW_ANSI_STDIO=0 2024-11-15 23:54:11 +02:00
stdlib.h crt: Define and use __p_ function for _osplatform 2024-09-18 13:42:29 +03:00
string.h crt: Add support for C95 wcstok() function for non-UCRT import libraries 2024-11-15 23:54:11 +02:00
strings.h Replace 'w64 mingw-runtime' by 'mingw-w64 runtime' 2012-06-28 15:40:59 +00:00
swprintf.inl crt: Add support for C95 (v)swprintf() functions when __USE_MINGW_ANSI_STDIO=0 2024-11-15 23:54:11 +02:00
syslimits.h Replace 'w64 mingw-runtime' by 'mingw-w64 runtime' 2012-06-28 15:40:59 +00:00
tchar.h headers: Fix _*tscanf and _*tprintf macros which expands to ISO C functions 2024-11-15 23:54:11 +02:00
time.h crt: Provide __daylight(), __dstbias(), __timezone() and __tzname() functions for pre-msvcr80 builds 2024-09-27 15:01:17 +03:00
uchar.h headers: Hide UTF-16 and UTF-32 functions from libmsvcrt 2023-04-27 23:12:07 +08:00
unistd.h winstorecompat: provide getpid 2020-05-15 00:10:53 +03:00
utime.h Replace 'w64 mingw-runtime' by 'mingw-w64 runtime' 2012-06-28 15:40:59 +00:00
vadefs.h crtdefs.h: Moved remaining typedefs from _mingw.h to crtdefs.h. 2014-03-23 10:41:51 +00:00
varargs.h Replace 'w64 mingw-runtime' by 'mingw-w64 runtime' 2012-06-28 15:40:59 +00:00
wchar.h crt: Fix non-ISO (v)snwprintf() functions when __USE_MINGW_ANSI_STDIO=0 2024-11-15 23:54:11 +02:00
wctype.h headers: Fix _wctype declaration in header files 2024-06-15 00:07:24 +03:00
xlocinfo.h Replace 'w64 mingw-runtime' by 'mingw-w64 runtime' 2012-06-28 15:40:59 +00:00
xmath.h _SECIMP patch 2 of 3: These data imports are *always* resolved from DLLs. 2016-08-26 17:24:11 -07:00
ymath.h Replace 'w64 mingw-runtime' by 'mingw-w64 runtime' 2012-06-28 15:40:59 +00:00
yvals.h ucrt: Use multibyte functions from ucrt instead of libmingwex 2019-10-29 16:09:32 +02:00