Commit Graph

7809 Commits

Author SHA1 Message Date
Pali Rohár
cb2010956e crt: crt-aliases.def.in: Provide _wtoll and _wtoll_l symbols aliases
Use same conditions for providing _wtoll and _wtoll_l symbols aliases as
are already used for atoll and _atoll_l symbol aliases.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-23 11:17:35 +03:00
Martin Storsjö
bca8736923 crt: Regenerate Makefile.in
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-23 11:17:35 +03:00
Pali Rohár
007cfa004b crt: Define C99 wcsto[u]ll/wcsto[iu]max functions for all CRT import libraries
Functions _wcstoi64() and _wcstoui64() are available since msvcr70.dll and
are equivalent to C99 wcstoll() and wcstoull() functions. As mingw-w64
defines intmax_t and uintmax_t types 64-bit, same as (unsigned) long long,
these functions are equivalent also to C99 wcstoimax() and wcstoumax()
functions.

So for msvcr70+ import libraries define C99 function symbols wcstoll,
wcstoull, wcstoimax and wcstoumax as aliases to _wcstoi64 and _wcstoui64
symbols in the same way as are defined aliases to _strtoi64 and _strtoui64
symbols.

For previous versions use mingw-w64 implementation from wcstoimax.c and
wcstoumax.c files. Move them from libmingwex library to individual CRT
import libraries, to ensure that for msvcr70+ is used the native version
(and not the one from libmingwex).

This change mimics commits c52f1eb099 and
4953f7746a but for wide-char functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-23 11:16:28 +03:00
Martin Storsjö
aea728e04b crt: Regenerate Makefile.in
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-22 23:41:03 +03:00
Martin Storsjö
e53cded112 crt: Fix the CPPFLAGS for libmsvcr110_extra.a for arm32
This was added incorrectly in 4899f4e895.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-22 23:38:52 +03:00
Martin Storsjö
9e6c327c15 crt: Regenerate Makefile.in
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-22 16:04:00 +03:00
Pali Rohár
09c8ca1e1a crt: Add import library for msvcr110d.dll
msvcr110d.dll is debug version of the msvcr110.dll and provides additional
debugging functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-22 16:03:17 +03:00
Pali Rohár
c69cd03f47 crt: Add import library for msvcr100d.dll
msvcr100d.dll is debug version of the msvcr100.dll and provides additional
debugging functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-22 16:03:17 +03:00
Martin Storsjö
a62f8fa282 crt: Regenerate Makefile.in
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-22 16:01:08 +03:00
Pali Rohár
4899f4e895 crt: Move isblank from libmingwex.a to individual CRT import libraries
C99 isblank symbol is natively available since msvcr120.dll, so include
mingw-w64 implementation of isblank to CRT import libraries only up to the
msvcr110 version.

This allows to use native isblank symbol for UCRT and msvcr120 builds.

Import libraries msvcr100 and msvcr110 currently do not have version
specific extra library, so define it and include it in MRI scripts.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-22 16:01:08 +03:00
Biswapriyo Nath
85ca1edc5c headers: Add new WSA error codes in winerror.h
From 6511cade21388aa4055b6f9058db6cc5ba52641f Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath <nathbappai@gmail.com>
Date: Sun, 14 Jul 2024 17:52:19 +0000
Subject: [PATCH 2/2] headers: Add new WSA error codes in winerror.h

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-07-16 21:44:52 +08:00
Biswapriyo Nath
d5f47f39ac headers: Add DNS related error codes in winerror.h
From ab59761e3e4395ef118ddf02137ed4948d27115b Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath <nathbappai@gmail.com>
Date: Sun, 14 Jul 2024 17:50:34 +0000
Subject: [PATCH 1/2] headers: Add DNS related error codes in winerror.h

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-07-16 21:44:52 +08:00
Biswapriyo Nath
a751e6401f include: Add WHV_ARM64_PROCESSOR_FEATURES for aarch64 in winhvplatformdefs.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-07-10 22:10:41 +08:00
Biswapriyo Nath
d9faaee6c5 headers: Rename WHV_PROCESSOR_FEATURES1 for x86_64 in winhvplatformdefs.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-07-10 22:10:41 +08:00
Biswapriyo Nath
12f03404e8 headers: Rename WHV_PROCESSOR_FEATURES for x86_64 in winhvplatformdefs.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-07-10 22:10:41 +08:00
Biswapriyo Nath
b128f9e697 include: Add new members in WHV_SYNTHETIC_PROCESSOR_FEATURES in winhvplatformdefs.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-07-10 22:10:41 +08:00
LIU Hao
d2d568e4e0 headers: Update to current Wine master
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-07-08 22:52:06 +08:00
Biswapriyo Nath
a885fe98b0 headers: Import x3daudio.h from wine
Required for https://github.com/microsoft/DirectXTK

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-07-08 22:44:47 +08:00
Biswapriyo Nath
0cf06d5cb6 headers: Add macros for all inline functions in intsafe.h
Required for https://github.com/microsoft/DirectXShaderCompiler

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-07-08 22:40:10 +08:00
Jacek Caban
4ef04b0a7f headers: Updated imported headers to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-07-06 11:01:36 +02:00
Jacek Caban
b18c569f47 widl: Updated to Wine version 69e3c712dca9cc697830c74725e07daa46d23bdf.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-07-06 10:54:14 +02:00
Biswapriyo Nath
5528297739 headers: Add new symbols in bcrypt.h
Required for https://github.com/googleapis/google-cloud-cpp

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-07-05 23:11:13 +08:00
Biswapriyo Nath
da831a04d5 headers: Add new _Pre and _Post macros in sal.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-07-03 22:32:00 +08:00
Biswapriyo Nath
dbb781a800 headers: Add more error codes in winerror.h
Required for https://github.com/microsoft/DirectXShaderCompiler

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-06-30 14:07:52 +08:00
Martin Storsjö
ed0024ccd2 crt: Regenerate Makefile.in
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-30 00:20:59 +03:00
Pali Rohár
d8c084656c crt: msvcrt.def.in: Replace F_I386+F_ARM_ANY by new F_NON_X64() macro
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-30 00:20:58 +03:00
Pali Rohár
68336bc7b7 crt: msvcrt.def.in: Add comments for symbols provided by mingw-w64
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-30 00:20:58 +03:00
Pali Rohár
34b300e480 crt: msvcrt.def.in: Do not use emulation of Vista+ symbols on ARM32/64
ARM32 and ARM64 always contain all Vista symbols. So use them directly
instead of the mingw-w64 emulation.

The only Vista+ symbol which stay disabled in the def file is vsnprintf.
It is because this Vista+ vsnprintf symbol is not C99 compatible and is
just an alias to _vsnprintf symbol which does not fill nul term byte.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-30 00:20:58 +03:00
Pali Rohár
ddf0d28bc4 crt: msvcrt.def.in: Remove Windows 10 TODO
There are no new i386/x64/arm32/arm64 symbols in Windows 10 (up to 22H2
version) since Windows 8.1.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-30 00:20:58 +03:00
Pali Rohár
1c75d326c6 crt: msvcrt.def.in: Fix list of ARM64 symbols
Include all ARM64 C++ mangled symbols. Add _local_unwind symbol which is
present also in ARM64 version. And remove _setjmp, setjmp and __jump_unwind
symbols which are not present in any ARM64 version.

As a reference were checked msvcrt.dll versions 7.0.17083.1000 and
7.0.19041.546 and all have same set of symbols.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-30 00:20:58 +03:00
Pali Rohár
f4641b617e crt: msvcrt.def.in: Symbols _memcpy_strict_align and fabsf are available on ARM since Win RT 8.0
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-30 00:20:58 +03:00
Pali Rohár
16eea155ed crt: msvcrt.def.in: Use F_I386() instead of #ifdef DEF_I386
Usage of F_I386() macro per symbol allows to easily identify via "git grep"
if the particular symbol is available for specific architecture or not.
"#ifdef DEF_I386" prevents easy usage of "git grep".

So change remaining "#ifdef DEF_I386" blocks by per-symbol F_I386() macros.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-30 00:20:58 +03:00
Martin Storsjö
af1549375b crt: Regenerate Makefile.in
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-30 00:20:58 +03:00
Pali Rohár
c6a4bfe95f crt: Provide _fseeki64() and _ftelli64() functions for all CRT import libraries
Functions _fseeki64() and _ftelli64() are natively available since
msvcr80.dll.

mingw-w64 already provides emulation of _fseeki64() and _ftelli64()
functions for msvcrt.dll import library via _filelengthi64(), fgetpos(),
fsetpos() and fflush() functions.

So include this emulation into all pre-msvcr80 CRT import libraries as all
of import libraries for them already contains all ABI-compatible dependent
functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-30 00:20:58 +03:00
Pali Rohár
012344caed crt: Provide _filelengthi64() function for crtdll.dll, msvcrt10.dll and msvcrt20.dll
Function _filelengthi64() is available since msvcrt40.dll.

For previous CRT versions, which have only 32-bit file offsets, define it
as wrapper around 32-bit _filelength() function.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-30 00:20:58 +03:00
Pali Rohár
4bc1b2bfe7 crt: Define fgetpos64() and fsetpos64() functions in crt-aliases.def.in as symbol aliases
Functions fgetpos64() and fsetpos64() are just aliases for functions
fgetpos() and fsetpos() as they are already using 64-bit fpos_t type.

Most aliased functions are defined in crt-aliases.def.in file. Do same also
for fgetpos64() and fsetpos64() functions by moving them from individual C
files stdio/fgetpos64.c and stdio/fsetpos64.c.

Libraries which do not have real fgetpos() and fsetpos() have aliases
defined in the same file were are defined compatibility wrappers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-30 00:20:58 +03:00
Pali Rohár
2437bc9459 crt: Fix fgetpos() and fsetpos() functions for crtdll.dll, msvcrt10.dll and msvcrt20.dll
Functions fgetpos() and fsetpos() in these libraries have different ABI
than in all later versions starting with msvcrt40.

Their second argument is pointer to 32-bit signed value, which is not
compatible with the fpos_t type (64-bit), used by all later versions.

So rename these functions in these import libraries to names with suffix 32
and provides mingw-w64 fpos_t (64-bit) wrappers around them for ABI
compatibility.

This change fixes ABI compatibility for those older DLL libraries.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-30 00:20:58 +03:00
Pali Rohár
b59ca53d7b crt: Provide _get_errno() and _set_errno() functions for all CRT import libraries
Functions _get_errno() and _set_errno() are natively available since
msvcr80.dll and also since Windows Vista version of msvcrt.dll.

Import libraries for crtdll, msvcrt10-40 and msvcrt.dll already contains
emulation of these functions. Include this emulation also for msvcr70 and
msvcr71, so these functions would be available in all CRT import libraries.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-30 00:20:58 +03:00
Pali Rohár
e3194476ad crt: Provide _wassert() function for all CRT import libraries
Function _wassert() is natively available since msvcr80.dll and also since
Windows Vista version of msvcrt.dll.

Import library for i386 version of msvcrt.dll already contains emulation of
this function.

Include this emulation into x64 version of msvcrt.dll and also into crtdll,
msvcrt10-40 and msvcr70-71 libraries, so function _wassert() would be
available in all CRT import libraries.

For import libraries other than msvcrt.dll, improve emulation code, so it
does not try to resolve that function from DLL as in other versions it is
never available.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-30 00:20:58 +03:00
Pali Rohár
335425724b crt: Provide _set_purecall_handler() function for all CRT import libraries
Function _set_purecall_handler() is natively available since msvcr70.dll.
For all previous CRT versions include mingw-w64 emulation.

Emulation is already included for msvcrt-os.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-30 00:20:58 +03:00
Pali Rohár
0ad7f73fdc crt: Provide _get_output_format() and _set_output_format() functions for all CRT import libraries
These functions are natively available since msvcr80.dll and also since
Vista version of msvcrt.dll. They are available also in ARM versions.
For all older CRT versions include mingw-w64 emulation.

Emulation in misc/output_format.c is slightly updated to optimize code for
non-msvcrt.dll version which do not provide these functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-30 00:20:58 +03:00
Pali Rohár
f6af09e2d3 crt: Provide _configthreadlocale() function for all CRT import libraries
Function _configthreadlocale() is natively available since msvcr80.dll.
For all previous CRT versions include mingw-w64 emulation.

Emulation is already included for msvcrt-os.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-30 00:20:58 +03:00
Biswapriyo Nath
8234d921e2 headers: Add wrappers and ioctls for the ideal send backlog in ws2tcpip.h
Required for
55c241902d/sdk/core/azure-core/src/http/curl/curl.cpp (L192)

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-06-27 22:27:02 +08:00
Pali Rohár
1101c262a1 crt: api-ms-win-crt-math-l1-1-0.def.in: Don't provide long double functions on x86
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-26 15:51:17 +03:00
Pali Rohár
c97df23062 crt: api-ms-win-crt-convert-l1-1-0.def.in: Don't provide long double functions on x86
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-26 15:50:55 +03:00
Pali Rohár
ca1326bbcd crt: ucrtbase.def.in: Don't provide long double functions on x86
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-26 15:50:55 +03:00
Pali Rohár
b706fb8900 crt: msvcr120*.def.in: Don't provide long double _strtold_l and _wcstold_l functions on x86
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-26 15:50:15 +03:00
Pali Rohár
64b6736dc4 crt: Do not include nextafter symbol alias for msvcr120* and UCRT
msvcr120 and UCRT provides native nextafter symbol. So do not define
duplicate symbol nextafter via crt-aliases.def.in file for these import
libraries.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-26 15:27:25 +03:00
Pali Rohár
3d3c1bf04a crt: msvcr120*.def.in: Don't provide long double functions for x86
Long double type for msvc is 64-bit but for gcc it is 80-bit.
So these long double functions are not compatible with gcc.
Comment them in all msvcr120 def files for x86 platform.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-26 15:27:25 +03:00
Pali Rohár
701946a5cc crt: msvcr120*.def.in: Add missing nextafter symbol
All msvcr120 DLL libraries provides C99 nextafter() function. i386
msvcr120d.def.in already contains it. In other def files it is missing.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-26 15:27:25 +03:00