Commit Graph

7648 Commits

Author SHA1 Message Date
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
Pali Rohár
02affbd595 crt: msvcr120*.def.in: Cleanup comments
Remove Check!!! comments.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-26 15:27:25 +03:00
Pali Rohár
9a50ed3203 crt: msvcr120_app.def.in: Fix name of i386 NLG_Return2 symbol
x64 version has this symbol with two leading underlines.
i386 version has this symbol with just one leading underline.
Same applies for other msvcrt libraries.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-26 15:27:25 +03:00
Pali Rohár
436462ba40 crt: msvcr120.def.in: Fix cdecl symbols
Some cdecl functions have incorrect stdcall suffix @0 probably due to
false-positive detection by gendef. Remove incorrect suffix.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-26 15:27:25 +03:00
Pali Rohár
b2c57b623e crt: msvcr110.def.in: Cleanup comments
Remove Check!!! comments and move math comments to the correct lines.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-26 15:27:25 +03:00
Pali Rohár
5b5beb816b crt: msvcr110.def.in: Fix cdecl symbols
Some cdecl functions have incorrect stdcall suffix @0 probably due to
false-positive detection by gendef. Remove incorrect suffix.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-26 15:27:25 +03:00
Pali Rohár
ec070e49c9 crt: msvcr110.def.in: Add symbols introduced in Visual C++ 2012 Update 1
Visual C++ 2012 Update 1 introduced new symbols. Append them at the end of
def files.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-26 15:27:24 +03:00
Pali Rohár
48313a6c73 crt: msvcr100.def.in: Make MSVCR100.dll library name upper case
Export name is upper case in the original Visual C++ library.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-26 15:27:24 +03:00
Pali Rohár
c8c750c241 crt: msvcr90d.def.in: Remove Check!!! comment for _adj_fdiv_r
Function _adj_fdiv_r in msvcr90d.dll returns like in other msvcrt
libraries. Just gendef is not able to recognize it.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-26 15:27:24 +03:00
Pali Rohár
bccadd27ae crt: msvcr90.def.in: Make MSVCR90.dll library name upper case
Export name is upper case in the original Visual C++ library.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-26 15:27:24 +03:00
Pali Rohár
49172b600d crt: Fix some function symbols in msvcr90.def.in and msvcr100.def.in files
Following symbols represents functions. So remove DATA keyword from them.

__report_gsfailure
_byteswap_uint64
_byteswap_ulong
_byteswap_ushort
_get_errno
_rotl64
_rotr64
_set_errno
btowc
mbrlen
mbrtowc
mbsrtowcs
strnlen
wcrtomb
wcsnlen
wcsrtombs
wctob

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-26 15:27:24 +03:00
Pali Rohár
8436ad5f79 crt: Move $I10_OUTPUT symbol out of the C++ mangled section in lib64 def.in files
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-06-26 15:27:24 +03:00