mingw-w64/mingw-w64-headers/crt
Pali Rohár 0988e3267d headers: Unified declaration of __argc, __argv, __wargv, _environ, _wenviron, _pgmptr, _wpgmptr, _osplatform, _osver, _winver, _winmajor, _winminor
Declare __argc, __argv, __wargv, _pgmptr, _wpgmptr via corresponding
__p_func() function as now it is provided by every CRT import library
(either directly or manually by mingw-w64 code) which also provides that
symbol.

Declare _environ and _wenviron based on architecture. On i386 and x64 in
msvcr*, and in UCRT on all architectures, it is always defined via
__p__environ() and __p__wenviron() functions which are provided by every
CRT import library (wide variant since VC20+). On arm32 and arm64 in
msvcrt, they are via _get_environ() and _get_wenviron() functions.

_osplatform, _osver, _winver, _winmajor, _winminor are declared as global
variables directly. They are available since the first crtdll.dll library
up to the msvcr80.dll (both i386 and x64). All these variables were removed
in Visual Studio 2008, together with corresponding __p_func fuctions. So
there is no reason to define them via functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-15 00:07:29 +03:00
..
sdks headers: Get rid of _mingw_directx.h. 2020-01-20 15:41:40 +01:00
sec_api include/tchar: Add more macros 2024-02-28 22:36:31 +08:00
sys headers/crt: Add timespec_get in time.h 2021-12-21 21:21:52 +02: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: Fix noreturn compile warning for __fastfail() 2022-12-19 22:14:15 +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 crt: Fix the parameter type for UCRT _crt_atexit 2021-05-03 11:05:55 +03:00
corecrt_stdio_config.h headers: Add corecrt_stdio_config.h header. 2020-03-10 11:33:26 +01: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: Fix _wctype declaration in header files 2024-06-15 00:07:24 +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: Make __MACHINEI a no-op on non-x86 architectures 2023-08-07 15:55:13 +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: crt: Add declarations for _aligned_msize 2023-04-02 21:12:13 +08:00
math.h crt/math: Reveal more names 2024-06-12 22:13:18 +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 Moved srtuct declarations from _mingw.h to crtdefs.h 2012-07-04 13:06:41 +00: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: Provide __iob_func function by every msvcrt import library 2024-06-15 00:07:22 +03:00
stdlib.h headers: Unified declaration of __argc, __argv, __wargv, _environ, _wenviron, _pgmptr, _wpgmptr, _osplatform, _osver, _winver, _winmajor, _winminor 2024-06-15 00:07:29 +03:00
string.h headers: Fix the signature of wcstok() for UCRT in string.h 2023-02-20 00:16:24 +02:00
strings.h Replace 'w64 mingw-runtime' by 'mingw-w64 runtime' 2012-06-28 15:40:59 +00:00
swprintf.inl headers: Don't redefine the __mingw_ovr define in swprintf.inl and wchar.h 2024-04-25 23:52:35 +03:00
syslimits.h Replace 'w64 mingw-runtime' by 'mingw-w64 runtime' 2012-06-28 15:40:59 +00:00
tchar.h include/tchar: Add more macros 2024-02-28 22:36:31 +08:00
time.h headers: Fix the order of asm() and attribute((deprecated())) in time.h 2024-06-05 10:44:42 +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 headers: Fix _wctype declaration in header files 2024-06-15 00:07:24 +03: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