Commit Graph

4228 Commits

Author SHA1 Message Date
Martin Storsjö
3599f2fca7 headers: Don't use the ms_printf/scanf and gnu_printf/scanf format attributes with clang
Clang doesn't support the ms_printf/scanf and gnu_printf/scanf
format attributes, only plain "printf" and "scanf".

We already expand e.g. __MINGW_PRINTF_FORMAT (which differs depending
on __USE_MINGW_ANSI_STDIO) into plain "printf" for Clang, since
015e637b4b. However, a number
of functions explicitly declared either gnu or ms style formats,
which caused these functions to not get any format string diagnostics.

This fixes https://github.com/llvm/llvm-project/issues/68995,
which reported that no warnings are produced for mismatched
printf/scanf format strings, when compiling with Clang, with
a toolchain targeting msvcrt (i.e. in practice using
__USE_MINGW_ANSI_STDIO enabled).

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-05-17 10:18:57 +03:00
Martin Storsjö
0e7940f228 headers: Use the __MINGW_(MS|GNU)_(PRINTF|SCANF) macros
Prefer declaring these attributes with such macros, rather than
spelling out the full attribute.

These macros were added in 73e50d0577
in 2013, but haven't been used in mingw-w64 headers since (although
they may have been used in user code).

These macros, which expand to the full attribute, differ slightly
from the other preexisting macros (which are used quite widely)
like __MINGW_PRINTF_FORMAT, which expand only to the type string
"gnu_printf", "ms_printf" or "printf".

However as we do have these existing macros in this form, for
declaring a specific form of these format attributes, take them into
use where applicable.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-05-17 10:18:54 +03:00
LIU Hao
837c48d496 include/minwinbase: Fix enumerators of FILE_INFO_BY_HANDLE_CLASS
Closes https://github.com/mingw-w64/mingw-w64/issues/48

Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-05-17 09:17:14 +08:00
Jacek Caban
f10e1f17d0 headers: Update imported headers to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-05-16 01:44:10 +02:00
Martin Storsjö
e5ac8c5509 headers: Use asm() for redirecting time functions, instead of inline functions
Prior to 1652e9241b, the time.h
inline functions always were static. Due to reexporting such
symbols in C++20 modules (for the C++23 std module), the reexported
symbols must not be static, so the inline functions were changed
from static inline to __mingw_ovr, which practically is static
inline in C mode, but regular inline in C++ mode.

By using regular inline in C++ mode, each use of the functions
can (but doesn't need to) emit an external symbol for the
inline function, and the callers may either call that function
or inline the body of the function.

This can have two potential issues; if different translation units
are configured differently (with the _USE_32BIT_TIME_T define),
but both use the same external symbol for it, the linker will only
keep one of them (as they're both inline, and supposed to be the
same). In practice, this is rare for _USE_32BIT_TIME_T though.

Secondly, such an external symbol may conflict with the actual
import library. Such a case was reported at
https://github.com/mstorsjo/llvm-mingw/issues/427.

(Practically, the issue there was that some built object files
defined an external "_time" symbol, i.e. regular "time" with i386
cdecl underscore prefix, from the non-static inline functions. The
object also files reference _time32 with dllimport, which via the
weak aliases produced by llvm-dlltool end up pulling in the
__imp__time symbol, which also brings in a conflicting "_time" symbol.)

In short - inline functions can be problematic. Where possible,
it's less problematic to use asm(), via __MINGW_ASM_CALL(), to
redirect calls directly towards the right function.

This has a slight drawback, that this ends up calling the thunks
(as the declarations lack dllimport), while we previously could
inline the call directly to a dllimported function (avoiding the
thunk, fetching the target address via the __imp_ prefixed symbol).

We could, easily, add the dllimport attributes on these declarations,
but that triggers a GCC bug for how those symbol names are mangled
on i386, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114984. (The
bug seems to be noted and mentioned as early as 2007, in
https://sourceware.org/pipermail/cygwin/2007-February/154845.html,
but it doesn't seem to have been fixed since.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-05-10 00:37:31 +03:00
Jacek Caban
19cf5d171f include: Update d3dx9mesh.h to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-05-04 12:49:41 +02:00
Biswapriyo Nath
8fdf7c9b5c headers: Add tcpxcv.h
Fixes https://github.com/mingw-w64/mingw-w64/issues/46

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-04-26 10:16:09 +08:00
Martin Storsjö
8c13b28ace headers: Stop using the __mingw_static_ovr macro
We should prefer using a macro which doesn't declare functions
as static inline in C++ mode.

This macro was added in bc6a874889,
without an explanation of why it was added.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-04-25 23:52:41 +03:00
Martin Storsjö
1652e9241b headers: Use __mingw_ovr instead of explicitly static inline
When building the C++23 std modules, at least with libc++, the
C++ module needs to reexport a number of standard C functions.

The regular libc++ headers (the ones used even if not using
C++ modules) do this, essentially:

    namespace std {
        using ::ctime;
    }

Thus reexporting the regular C function ctime within the std
namespace.

When building libc++ as a module, this function gets emitted as
part of the C++ std module, like this:

    export namespace std {
        using std::ctime;
    }

This tries to export the function as part of the C++ module. In the
case of our inline functions, this errors out if the inline functions
are static inline:

    <prefix>/share/libc++/v1/std/ctime.inc:20:14: error: using declaration referring to 'ctime' with internal linkage cannot be exported
       20 |   using std::ctime;
          |              ^
    <prefix>/x86_64-w64-mingw32/include/time.h:267:29: note: target of using declaration
      267 | static __inline char *__CRTDECL ctime(const time_t *_Time) { return _ctime64(_Time); }
          |                                 ^

Therefore, prefer using the __mingw_ovr macro for these inline
declarations. This macro expands to regular plain (non-static)
inline in C++ mode, while it still expands to static inline in C mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-04-25 23:52:36 +03:00
Martin Storsjö
847164bcf5 headers: Don't redefine the __mingw_ovr define in swprintf.inl and wchar.h
This redefining of the macro was added in
824ceb1d12, without an explanation
of why that was done.

If we really do need to use a different inline declaration for
these functions, we should use a different macro, so we don't
alter the meaning of the __mingw_ovr define after including
swprintf.inl or wchar.h.

This practically has the effect, that these inlines are declared
as regular "inline" instead of "static __inline__" when built
in C++ mode with a GCC compatible compiler. This matches how
the __mingw_ovr macro is defined and used for many other inline
functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-04-25 23:52:35 +03:00
Martin Storsjö
30c0b623db headers: Remove UCRT inline fwprintf and _snwprintf
We already have non-inline versions of these functions; use the
non-inline version consistently, to avoid potential cases of
inconsistency.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-04-25 23:52:35 +03:00
LIU Hao
31dcedc3ca headers/pathcch: Add definition of PATHCCH_OPTIONS
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-04-09 22:17:55 +08:00
Pali Rohár
8f79d69dcb headers: stdio.h: Remove inline variant of UCRT _scprintf, _snprintf and _snscanf functions
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-04-08 22:11:51 +08:00
Jacek Caban
257321cea6 headers: Update to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-04-05 11:28:56 +02:00
Biswapriyo Nath
e54be04570 include: Add dyngraph.idl in strmif.idl
Remove duplicate symbols also.

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
2024-03-18 22:26:48 +01:00
Biswapriyo Nath
9004580db4 include: Import dyngraph.idl from wine
Required for strmif.idl

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
2024-03-18 22:25:40 +01:00
Jacek Caban
ad870662e6 headers: Update imported headers to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-03-18 22:21:49 +01:00
LIU Hao
1ec7fa2216 headers: Move some macros about deprecated functions from 'strsafe.h' into 'dontuse.h'
Since Windows SDK 8.0, `STRSAFE_NO_DEPRECATE` no longer has an effect. It's
still defined by some headers, but the check in 'strsafe.h' has been removed.
Those macros that match POSIX names have been moved to 'dontuse.h', so we do
the same.

Previously, inclusion of <strsafe.h> before <windows.h> could cause errors like

   In file included from C:/msys64/mingw64/include/windows.h:70,
                    from test.c:2:
   C:/msys64/mingw64/include/winbase.h:1499:37: error: expected identifier or '(' before 'LPSTR'
    1499 |   WINBASEAPI LPSTR WINAPI lstrcpyA (LPSTR lpString1, LPCSTR lpString2);
         |                                     ^~~~~

because the semicolon in the macro `lstrcpyA` affects not only invocations, but
also declarations. Those semicolons have been removed since Windows SDK 8.0, so
we remove them as well. This allows including 'strsafe.h' before 'windows.h'.

The macro `DEPRECATE_SUPPORTED` controls how deprecated functions are to be
deprecated. In Microsoft headers, existence of it deprecates those functions
with `#pragma deprecated`, and absense of it exposes macros which rename them
to non-existent ones, so any use of them results in errors such as

   ccYRG0RL.o:test.c:(.text+0x1c): undefined reference to `strcpy_instead_use_StringCbCopyA_or_StringCchCopyA'
   collect2.exe: error: ld returned 1 exit status

To match the behavior of Windows SDK, we define those renaming macros only if
`DEPRECATE_SUPPORTED` isn't defined, like in 'pathcch.h'. Unfortunately, GCC
does not support `#pragma deprecated`, so no warning will be issued if
`DEPRECATE_SUPPORTED` is defined by including 'winnt.h' or 'windows.h' before
'strsafe.h'. This may be improved in the future.

Reported-by: Julian Waters <tanksherman27@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-03-03 14:39:47 +08:00
LIU Hao
e0d90587c9 include/tchar: Add more macros
This should match latest Windows SDK except for `strtold_l()` and `wcstold_l()`.
The Microsoft implementations produce 64-bit numbers that do not match the GNU
ABI, and we at the moment do not have locale-aware implementations.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-02-28 22:36:31 +08:00
Jacek Caban
fb5a1c9a72 headers: Update imported headers to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-02-22 11:57:53 +01:00
Christian Franke
f8e088eb19 Ignore _FORTIFY_SOURCE if __MINGW32__ is not defined
This prevents bogus warnings or build aborts (-Werror) if Windows
includes are used on Cygwin.

Signed-off-by: Christian Franke <christian.franke@t-online.de>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-02-21 22:33:43 +08:00
Martin Storsjö
a4c0c1d00d headers: Adjust __cpuidex availability for Clang
Clang 18.x was meant to implement __cpuidex (a version was merged
during the development of Clang 17.x, but it was reverted and backed
out before Clang 17.x was completed) - however it was never merged
before Clang 18.x was branched after all. For further history of
the earlier changes within mingw-w64, see
0605217f5d and
2b6c924761.

Postpone this change to Clang 19 for now.

This fixes building software that uses __cpuidex with Clang 18.

Hopefully it can either be merged in Clang well in advance before
Clang 19 gets branched, or this issue revisited again long before
that.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-02-06 09:55:02 +02:00
Jacek Caban
a2686dadeb headers: Update imported headers to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-02-06 01:26:07 +01:00
Jacek Caban
ed05999bf5 headers: Update to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2024-01-18 13:30:17 +01:00
Oleg Tolmatcev
86a5e0f416 headers: rename SymRegisterCallback64W to SymRegisterCallbackW64
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-01-11 22:51:33 +08:00
LIU Hao
b4515a6935 Regenerate configure with autoconf 2.72
Reference: https://sourceforge.net/p/mingw-w64/mailman/message/58721403/
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-01-09 22:26:23 +08:00
Martin Storsjö
dddccbc3ef headers: Add a noreturn attribute on RtlRestoreContext
This should have less critical effect on code generation compared
to marking RtlCaptureContext as returns_twice, but can avoid
compiler warnings in some cases (although I don't have such
a case at hand right now).

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-01-04 14:52:28 +02:00
Biswapriyo Nath
4c8123efbe headers: Add processsnapshot.h
Required for https://github.com/python/cpython/blob/v3.12.0/Modules/posixmodule.c

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2024-01-01 13:51:13 +08:00
Martin Storsjö
e98e24be8c headers: Add the returns_twice attribute on the RtlCaptureContext function
This allows the compiler to generate correct code to resume
execution when returning to this point later.

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-12-21 23:00:10 +02:00
Martin Storsjö
940e8faa94 headers: Make getopt.h react to _BSD_SOURCE after being included once first
getopt.h is transitively included by unistd.h, which means that
users who include unistd.h (also potentially unintentionally as
a transitive dependency) won't be able to get "optreset" declared,
if they do e.g. this:

    #include <unistd.h>
    #define _BSD_SOURCE
    #include <getopt.h>

This recently broke building LLDB with latest nightly libc++ headers,
as libc++ headers would end up including unistd.h, while LLDB
later would define _BSD_SOURCE right before including getopt.h.

For definitions like _BSD_SOURCE, the most failsafe solution
generally is to define them before including any header, to avoid
this kind of issue. However, allowing getopt.h to react to
being reincluded with _BSD_SOURCE defined, is quite straightforward.

This allows fixing a recent LLDB build break reported at
https://github.com/llvm/llvm-project/issues/76050.

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-12-20 15:38:36 +02:00
Steve Lhomme
a0a6c0750e headers: move PPROC_THREAD_ATTRIBUTE_LIST in PARTITION_APP
It's needed by CreateProcess (via STARTUPINFOEX) which is available in UWP apps.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-12-18 22:13:38 +08:00
LIU Hao
3f7b241728 headers: Update to current Wine master
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-12-16 19:46:48 +08:00
LIU Hao
7f54c78e35 headers/ksmedia: Tiny fixes to match Windows SDK
Add a missing comma; move `STATIC_KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL`
and `STATIC_KSDATAFORMAT_SUBTYPE_IEC61937_DTS` outside `#ifdef _INC_MMREG` so
they match Windows SDK 10.0.22621.0.

This closes https://github.com/mingw-w64/mingw-w64/issues/40.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-12-02 14:51:58 +08:00
Jacek Caban
662e1305f8 headers: Update to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-11-30 12:10:42 +01:00
Nikolay Sivov
be9aa464e2 headers: Import mfmediaengine.idl from wine.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-11-29 18:46:43 +01:00
Nikolay Sivov
1248dbf1ce headers: Add missing import to the mfidl.idl.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-11-29 18:46:43 +01:00
Jacek Caban
b9311f731f headers: Update to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-11-29 18:46:43 +01:00
Steve Lhomme
01d406ab4d headers: include some IEC61937 GUID
This is used for HDMI passthrough.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-11-29 23:27:46 +08:00
Steve Lhomme
fc95de6d25 headers: add WAVEFORMATEXTENSIBLE_IEC61937
This is used for HDMI passthrough [1].

[1] https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ksmedia/ns-ksmedia-waveformatextensible_iec61937

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-11-29 23:18:03 +08:00
LIU Hao
b6de4efae6 Run autoreconf -ifv in top directory
Reference: https://sourceforge.net/p/mingw-w64/mailman/message/51784428/
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-11-16 22:44:40 +08:00
Jacek Caban
90a60d5828 headers: Update to current Wine version. 2023-11-09 11:46:09 +01:00
Biswapriyo Nath
3a137bd87e headers: Add new symbols in processthreadsapi.h
Required for pytorch/kineto

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-11-02 22:06:50 +08:00
Martin Storsjö
d6c07d9561 Revert commit f86c3e7bbd
This was pushed accidentally as part of an earlier branch, updating
files with a slightly different version of tools than what has been
used before.
2023-10-27 21:02:54 +03:00
Martin Storsjö
29f04ec3db headers: Don't do inline redirects from <func>f() to <func>() on UCRT
On UCRT, there are separate -f suffixed math functions that can
be faster than doing the regular version that operates on doubles
and just truncate the results to float.

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-10-27 18:25:19 +03:00
Martin Storsjö
f86c3e7bbd autoreconf 2023-10-26 12:02:51 +03:00
Biswapriyo Nath
e51e84aaf7 headers: Add missing symbols in ntsecapi.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-10-17 01:17:59 +08:00
Biswapriyo Nath
ffe883434d headers: Add missing symbols in sspi.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-10-15 23:30:25 +08:00
Oleg Tolmatcev
75d8613f48 headers: add LVFI_SUBSTRING in commctrl.h
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-10-13 22:57:00 +08:00
Oleg Tolmatcev
e7f866a32a headers: add ADDRINFOEX and LPLOOKUPSERVICE_COMPLETION_ROUTINE to ws2tcpip.h
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-10-13 22:57:00 +08:00
Martin Storsjö
4dd72e2cef headers: Add a new PF_* constant to winnt.h
The constant PF_ARM_V83_LRCPC_INSTRUCTIONS_AVAILABLE was
added in winnt.h in upstream WinSDK 10.0.22621.0.

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-10-12 23:02:45 +03:00
Oleg Tolmatcev
085c28eb12 headers: add LPCWAVEFORMATEX in dsound.h
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-10-12 22:27:06 +08:00
Jacek Caban
8cdb860e7d headers Update to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-10-11 11:57:12 +02:00
Steve Lhomme
f80dcb6c82 include/process: fix bare DllMain/_CRT_INIT signature
The DWORD reason corresponds to an "unsigned long", not an "unsigned".
This is also how it's defined in the Windows SDK.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-29 20:46:53 +08:00
Martin Storsjö
bf6f5c6646 headers: Update imported headers to current Wine version.
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-09-29 11:50:55 +03:00
Jacek Caban
c15e4dff86 headers: Import d3d12video.idl from Wine.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-09-27 12:50:36 +02:00
Oleg Tolmatcev
29dbb20018 headers: add symbols in cfgmgr32.h
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-24 18:42:12 +08:00
Oleg Tolmatcev
bd91b7211d headers: add NET_IFINDEX_UNSPECIFIED in ifdef.h
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-24 18:37:35 +08:00
Richard Copley
f9a95f08cd Explicit aggregate returns for new D2D methods
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-23 22:29:57 +08:00
Oleg Tolmatcev
6e945baffc headers: add SetupDiGetDeviceProperty in setupapi.h
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-23 22:29:06 +08:00
LIU Hao
fd5748efc5 headers: Regenerate Makefile.in
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-23 22:28:05 +08:00
LIU Hao
654ab536b2 headers/inputpaneinterop: Generate H from IDL
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-23 22:27:28 +08:00
Biswapriyo Nath
f54e478504 headers: Add inputpaneinterop.idl
Required for chromium/ui/base/ime/win/on_screen_keyboard_display_manager_input_pane.h

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-23 22:25:23 +08:00
LIU Hao
cc481d54bd headers/portabledeviceapi: Generate H from IDL
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-22 22:42:56 +08:00
LIU Hao
4a93d545f3 headers: Regenerate Makefile.in
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-22 22:41:09 +08:00
Biswapriyo Nath
b8f096e56d headers: Add portabledeviceapi.idl
Required for chromium/components/storage_monitor/portable_device_watcher_win.h

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-22 22:35:52 +08:00
Biswapriyo Nath
c1d9408f6f headers: Add d2d1_3helper.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
2023-09-22 13:00:49 +02:00
Biswapriyo Nath
6055f9cf8d headers: Add d2d1_3.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
2023-09-22 13:00:49 +02:00
Biswapriyo Nath
832ef55c53 headers: Add d2d1svg.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
2023-09-22 13:00:49 +02:00
Martin Storsjö
be3fd9eda8 headers: Regenerate d3d12.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-09-21 23:00:18 +03:00
Martin Storsjö
74817d2006 headers: Resync headers from latest wine, updating d3d12.idl
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-09-21 23:00:18 +03:00
Martin Storsjö
d34d36b2f8 headers: Restore syncing d3d12.idl from Wine again
The version of d3d12.idl in vkd3d has been completed further now,
and has been synced back to Wine; restore mingw-w64-headers to
include this header in future syncs from wine.

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-09-21 23:00:04 +03:00
Biswapriyo Nath
8a397f1673 headers: Add portabledevice.h
Required for chromium/components/storage_monitor/portable_device_watcher_win.cc

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-21 23:06:14 +08:00
Jacek Caban
f38ac7df61 headers: Update imported headers to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-09-21 17:04:07 +02:00
LIU Hao
833753684d headers/portabledevicetypes: Regenerate H from IDL
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-19 22:34:11 +08:00
Biswapriyo Nath
bf3cbdeada headers: Add missing symbols in portabledevicetypes.idl
Required for chromium/components/storage_monitor/portable_device_watcher_win.cc

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-19 22:01:19 +08:00
Martin Storsjö
602758b204 headers: Regenerate d3d12.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-09-18 00:50:58 +03:00
Martin Storsjö
a9cb243a31 headers: Sync d3d12.idl to the latest version from vkd3d
This only changes a few minor stylistic details compared to what
was merged before, that was pointed out during review in vkd3d.

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-09-18 00:50:58 +03:00
Biswapriyo Nath
679f04f2d2 headers: Add d2d1_2helper.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
2023-09-17 12:50:48 +02:00
Biswapriyo Nath
a9c45c85de headers: Add d2d1_2.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
2023-09-17 12:50:48 +02:00
Biswapriyo Nath
aa300ce324 headers: Add d2d1effects_2.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
2023-09-17 12:50:48 +02:00
Biswapriyo Nath
c6d5c3c260 headers: Add d2d1effects_1.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
2023-09-17 12:50:48 +02:00
Oleg Tolmatcev
04ae98c975 headers: add compatibility with C++ to HID headers
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-16 22:29:18 +08:00
Oleg Tolmatcev
5755d4b935 headers,crt: add symbols in dinput.h
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-15 22:56:21 +08:00
Oleg Tolmatcev
3d3956293f headers: remove conflicting declarations in qos2.h
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-14 11:41:19 +08:00
Martin Storsjö
0605217f5d headers: Provide __cpuidex for Clang 17
In 2b6c924761, we changed so that
we don't provide __cpuidex for Clang 17 or newer, as Clang itself
provided that as a builtin.

The __cpuidex builtin was added in Clang during the course of
development of Clang 17, but it was reverted before version 17 was
released (it was added initially in
2df77ac20a1ed996706b164b0c4ed5ad140f635f, in llvm-project, on May 24th,
but later reverted in f3baf63d9a1ba91974f4df6abb8f2abd9a0df5b5 on August
4th, which also was cherrypicked to the 17.x release branch).

Clang 17 isn't formally released yet, but it has been agreed to
not reland the change within the 17.x release series - in
https://reviews.llvm.org/D157115#4561681.

In current git main of llvm-project, the __cpuidex builtin isn't
yet readded, but it is being planned and it seems likely to
be readded before version 18 gets released in 6 months; thus
bump the version to 18 instead of removing the condition entirely.
Relanding it is being discussed in https://reviews.llvm.org/D158348.

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-09-13 11:15:01 +03:00
Biswapriyo Nath
1906d341c2 headers: Add missing symbols in wtsapi32.h
Required for chromium

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-12 22:44:28 +08:00
Martin Storsjö
c9af10e9d1 headers: Regenerate d3d12.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-09-12 13:52:52 +03:00
Martin Storsjö
310ca07517 headers: Manually import d3d12.idl from vkd3d
This is the latest version of vkd3d_d3d12.idl from
https://gitlab.winehq.org/wine/vkd3d, plus some additions that still
are under review at
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/332, with
slight adjustments to the include lines at the top.

Remove d3d12.idl from the list of files that manually are synced
from main wine, as d3d12.idl there is lacking lots of declarations.

Ideally the d3d12.idl in wine will be brought up to sync at some point,
but for now, exclude this header and sync it manually from vkd3d
instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-09-12 13:52:52 +03:00
Martin Storsjö
dae07c4b39 headers: Add the D3D12 shader compiler interface dxcapi.h
This header is appropriately licensed with a compatible open source
license, the University of Illinois Open Source License (a BSD-like
license).

This header originates from Microsoft, available at e.g.
https://github.com/microsoft/DirectXShaderCompiler/blob/main/include/dxc/dxcapi.h.
That version is incompatible with mingw though, but the Mesa project
has a version that adds mingw compatibility, at
https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/microsoft/compiler/dxcapi.h.

This includes the current version of the latter header.

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-09-12 13:52:52 +03:00
Biswapriyo Nath
48b7cb4191 headers: Define missing PHYSICAL_ADDRESS type in ntddser.h
This fixes the following compiler error in chromium.

ntddser.h: At global scope:
ntddser.h:368:9: error: 'PHYSICAL_ADDRESS' does not name a type; did you mean 'PNC_ADDRESS'?
  368 |         PHYSICAL_ADDRESS  PortAddress;
      |         ^~~~~~~~~~~~~~~~
      |         PNC_ADDRESS

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-10 18:56:06 +08:00
Biswapriyo Nath
0b1c7cfea0 headers: Add missing crt stdio functions
Required for
https://github.com/openjdk/jdk/blob/jdk-22%2B13/src/java.base/windows/native/libsyslookup/syslookup.c

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-07 23:00:01 +08:00
Jacek Caban
3190291110 headers: Update imported headers to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-09-06 17:04:23 +02:00
Biswapriyo Nath
ddc5b0f6ec headers: Add new symbols in bluetoothapis.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-03 19:11:55 +08:00
Biswapriyo Nath
427ab730f0 headers: Fix function declarations in bluetoothapis.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-03 19:11:55 +08:00
Biswapriyo Nath
938112c4a5 headers: Replace BOOL with WINBOOL in bluetoothapis.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-03 19:11:55 +08:00
Jacek Caban
4b1c83fef5 headers: Update imported headers to Wine 8.15 version. 2023-09-02 11:18:56 +02:00
LIU Hao
e1f496eafa headers/mfidl: Regenerate H from IDL
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-01 23:08:56 +08:00
Biswapriyo Nath
7b3825f7d0 headers: Add CLSIDs in mfidl.idl
Required for chromium.

chromium/media/gpu/windows/dxva_video_decode_accelerator_win.cc:1477:15:
error: use of undeclared identifier 'CLSID_MSVPxDecoder'

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-09-01 23:01:04 +08:00
LIU Hao
79d2573fbf include/strmif: Regenerate H from IDL
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-08-31 11:50:26 +08:00
Biswapriyo Nath
93aa9727c7 headers: Fix redefinition of DDPIXELFORMAT in ksmedia.h and ddraw.h
This fixes the following compiler error.

ddraw.h:773:16: error: redefinition of 'struct _DDPIXELFORMAT'
  773 | typedef struct _DDPIXELFORMAT {
      |                ^~~~~~~~~~~~~~
ksmedia.h:4262:16: note: previous definition of 'struct _DDPIXELFORMAT'
 4262 | typedef struct _DDPIXELFORMAT
      |                ^~~~~~~~~~~~~~

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-08-31 11:46:50 +08:00
Biswapriyo Nath
c26039d0b1 headers: Fix redefinition of TIMECODE_SAMPLE in strmif.idl
This fixes the following compiler error.

strmif.h:12304:18: error: redefinition of 'struct tagTIMECODE_SAMPLE'
12304 |   typedef struct tagTIMECODE_SAMPLE {
      |                  ^~~~~~~~~~~~~~~~~~
ksmedia.h:3851:16: note: previous definition of 'struct tagTIMECODE_SAMPLE'
 3851 | typedef struct tagTIMECODE_SAMPLE {
      |                ^~~~~~~~~~~~~~~~~~

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-08-31 11:46:40 +08:00
Biswapriyo Nath
024035cfd9 headers: Add missing symbols in bthdef.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-08-29 22:32:13 +08:00
Biswapriyo Nath
7e6eca6965 headers: Add more propkeys in functiondiscoverykeys_devpkey.h
This fixes the following compiler error with chromium.

media/audio/win/core_audio_util_win.cc: In static member function 'static std::string media::CoreAudioUtil::GetAudioControllerID(IMMDevice*, IMMDeviceEnumerator*)':
media/audio/win/core_audio_util_win.cc:710:35: error: 'PKEY_Device_InstanceId' was not declared in this scope
  710 |       FAILED(properties->GetValue(PKEY_Device_InstanceId,
      |                                   ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-08-27 23:00:14 +08:00
Jacek Caban
001eb1e1d3 headers: Update imported headers to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-08-27 12:52:28 +02:00
Pavel Shishpor
939d1ed0c3 headers: Fix CREATE_VIRTUAL_DISK_PARAMETERS
In accordance with MSDN:
https://learn.microsoft.com/en-us/windows/win32/api/virtdisk/ns-virtdisk-create_virtual_disk_parameters

Signed-off-by: Pavel Shishpor <pavel.shishpor@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-08-27 16:39:38 +08:00
Biswapriyo Nath
3a7104dd22 headers: Add missing symbols in bthsdpdef.h
Also fix a typo with _SDP_ELEMENT_DATA name

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-08-27 16:39:38 +08:00
Biswapriyo Nath
6bd9651b69 headers: Add bluetooth error codes in winerror.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-08-26 17:26:57 +08:00
Biswapriyo Nath
d082d4b0ba headers: Add more facility codes in winerror.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-08-26 17:26:57 +08:00
Biswapriyo Nath
d3ab8f62b9 headers: Add bluetoothleapis.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-08-23 22:35:52 +08:00
Biswapriyo Nath
3fc5347bb3 headers: Add bthledef.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-08-23 22:35:52 +08:00
Jacek Caban
c9ee24b82d headers: Update to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-08-22 11:06:59 +02:00
LIU Hao
c44c257014 include/wlanapi: Remove a duplicate of WLAN_MAX_NAME_LENGTH
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-08-18 23:07:02 +08:00
Biswapriyo Nath
e1c8c85dc5 headers: Add new symbols in wlanapi.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-08-18 22:57:33 +08:00
Jacek Caban
e89de847dd headers: Import xamlom.idl from Wine.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-08-15 23:07:37 +02:00
Jacek Caban
1765be0b57 headers: Update to current Wine version.
Skip windows.storage.idl, it needs more work on Wine side.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-08-15 21:07:57 +02:00
Steve Lhomme
2a7e9255df headers: use inline version of RtlSecureZeroMemory for UCRT builds
There's an intrinsic version in the kernel32 library. But it's not supposed
to be used with UCRT builds.

RtlSecureZeroMemory is not found in -O0 + UCRT builds without this fix.

In the Windows SDK it's a forced inline version no matter what.
(and there's an ARM version)

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-08-13 17:34:20 +08:00
Biswapriyo Nath
3aec835453 headers: Add new symbols in windot11.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-08-13 17:28:27 +08:00
Steve Lhomme
44fb800426 headers: allow RtlSecureZeroMemory in all targets
It's usually an inline function doing native CPU calls. It's also unrestricted
in the Windows SDK since Windows 8, as well as SecureZeroMemory.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-08-13 17:27:34 +08:00
Biswapriyo Nath
722dd2a437 headers: Add missing symbols in werapi.h
Required for crashpad project in chromium.

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-08-09 23:17:15 +08:00
Jacek Caban
f360b3eb48 propkeydef.h: Drop include once guards.
Fixes regression from 3638d5e9a6 reported https://bugzilla.mozilla.org/show_bug.cgi?id=1847683.

Those guards are not present in Wine and Windows SDK for a reason: if INITGUID is changed, it should be reflected in DEFINE_PROPERTYKEY macro.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-08-08 16:45:15 +02:00
Martin Storsjö
53d58c15fb headers: Add a missing 32 bit IMAGEHLP_LINEW
This got referenced after 95433fd59d,
even if there was no definition of that type.

This unbreaks 32 bit builds that include dbghelp.h.

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-08-07 15:55:30 +03:00
Martin Storsjö
69846cfb7f headers: Make __MACHINEI a no-op on non-x86 architectures
In older MSVC versions that had a __MACHINEI macro, it was defined
to only expand on Intel 32 and 64 bit x86.

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-08-07 15:55:13 +03:00
Biswapriyo Nath
95433fd59d headers: Add more macros for wide-char APIs in _dbg_common.h
This is required for rpcs3 project which defines DBGHELP_TRANSLATE_TCHAR.
Also this fixes the following compiler error.

error: cannot convert 'CHAR*' {aka 'char*'} to 'LPWSTR' {aka 'wchar_t*'}
error: 'SymGetLineFromAddrW' was not declared in this scope

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-08-06 21:56:42 +08:00
LIU Hao
2a65dba7d9 headers/intrin: Redefine __MACHINEX86X_NOIA64 as its name suggests
The old condition is strictly equivalent to `__MACHINEX86X_NOWIN64` so I
believe it was a typo. As its name suggests, it should denote x86 or x86_64,
and not Itanium i.e. it should be empty when neither x86 nor x86_64, or on
Itanium.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-08-02 22:55:16 +08:00
Biswapriyo Nath
38322905b6 headers: Add missing symbols in wlantypes.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-07-31 22:13:21 +08:00
Biswapriyo Nath
868b4a0773 headers: Add missing symbols in l2cmn.h
This also fixes the following error.

wlanapi.h:18:44: note: expanded from macro 'WLAN_NOTIFICATION_SOURCE_ALL'
                                           ^

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-07-28 12:01:58 +08:00
Biswapriyo Nath
757fe1460c headers: Add newer symbols in ntioring_x.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-07-28 12:01:58 +08:00
Biswapriyo Nath
9fb4054874 headers: Add newer APIs in ioringapi.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-07-28 12:01:58 +08:00
Biswapriyo Nath
6654655666 headers: Add missing APIs in fileapi.h
Required for libGetXSpace.c in openjdk

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-07-26 22:01:42 +08:00
Biswapriyo Nath
6e6a38976b headers: Add options at the IPPROTO_TCP level in ws2ipdef.h
Required for WindowsSocketOptions.c in openjdk

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-07-26 13:15:19 +08:00
Biswapriyo Nath
42d375481e headers: Add some missing macros in qos2.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-07-24 22:30:07 +08:00
Biswapriyo Nath
0c61406ad6 headers: Fix some data types in qos2.h
Define QOS_FLOWID before it is used. This fixes the following errors.

In file included from ../../../../../b/src/3rdparty/chromium/net/socket/udp_socket_win.h:14:
qos2.h:87:3: error: unknown type name 'PQOS_FLOWID'
  PQOS_FLOWID FlowId
  ^
qos2.h:112:3: error: unknown type name 'QOS_FLOWID'
  QOS_FLOWID FlowId,
  ^

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-07-24 22:30:07 +08:00
Biswapriyo Nath
c20b263540 headers: Include headers for basic data types in qos2.h
This fixes the following errors.

In file included from ../../../../../b/src/3rdparty/chromium/net/socket/udp_socket_win.h:14:
qos2.h:60:3: error: unknown type name 'UINT32'
  UINT32 RTT;
  ^
qos2.h:77:3: error: unknown type name 'USHORT'; did you mean 'SHORT'?
  USHORT MajorVersion;
  ^

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-07-24 22:30:07 +08:00
LIU Hao
c814857e95 Revert "headers: Import all d2d1 headers from wine"
This reverts commit ab126ce5e1.
2023-07-23 19:01:16 +08:00
LIU Hao
4fd54b35a1 Revert "headers: Define D2D1FORCEINLINE where needed"
This reverts commit 010cebed76.
2023-07-23 19:01:06 +08:00
LIU Hao
d40cd2aba7 Revert "headers: Update to wine master"
This reverts commit 7352638564.
2023-07-23 19:01:04 +08:00
LIU Hao
7352638564 headers: Update to wine master
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-07-23 17:40:32 +08:00
Biswapriyo Nath
010cebed76 headers: Define D2D1FORCEINLINE where needed
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-07-23 17:26:18 +08:00
Biswapriyo Nath
ab126ce5e1 headers: Import all d2d1 headers from wine
Required for cairo

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-07-23 17:25:36 +08:00
Biswapriyo Nath
607a0d51a5 headers: Add missing symbols in dhcpv6csdk.h
Also fix some function declarations.
Required for https://chromium.googlesource.com/chromium/chromium/+/HEAD/net/proxy/dhcpcsvc_init_win.cc

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-07-20 21:36:14 +08:00
Jacek Caban
0f4a2abd69 headers: Update to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-07-13 20:36:43 +02:00
Biswapriyo Nath
abb6e6a598 headers: Remove propkeydef.h and rpcsal.h from wine-import.sh
These two headers were reimplmented in previous 3638d5e9a6 commit.

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-07-13 10:25:02 +08:00
Dustin Gadal
3638d5e9a6 Reimplement propkeydef.h and rpcsal.h.
These files have been reimplemented with a more permissive license than their predecessors.

Signed-off-by: Dustin Gadal <dustin.gadal@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-07-04 17:28:28 +08:00
Dustin Gadal
47547b74c3 Remove LGPL2.1 implementations of propkeydef.h and rpcsal.h.
These files will be reimplemented with a more permissive license in a subsequent patch.

Signed-off-by: Dustin Gadal <dustin.gadal@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-07-04 17:28:21 +08:00
Biswapriyo Nath
bbae5ec1db headers: Add more symbols in dwmapi.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-07-01 20:56:54 +08:00
Kacper Michajłow
c7c93e36a5 crt: define L_tmpnam correctly for UCRT
UCRT version of tmpnam() returns absolute path and L_tmpnam has to be
defined to accomodate that.

Fixes buffer overflow in various software when building with UCRT.

Fixes: https://sourceforge.net/p/mingw-w64/bugs/915/
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-27 10:41:02 +08:00
Kacper Michajłow
124ee27ee1 crt: bump TMP_MAX for UCRT version
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-27 10:41:02 +08:00
Jacek Caban
82b8edc101 configure: Use ucrt for msvcrt by default.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-06-25 20:31:20 +02:00
Steve Lhomme
99144bb19f headers: allow more wincrypt API's in Win10 19H1 UWP builds
The API's are allowed in windowsapp since 19H1 and are allowed by the WACK.
Only the MS header don't specify it properly for WINAPI_FAMILY_PC_APP
but since the DLL is on all WINAPI_FAMILY_DESKTOP_APP and allowed by the
WACK this always works.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-24 18:20:47 +08:00
Steve Lhomme
bab93bd12c headers: allow more wincrypt API's in Win10 RS4 UWP builds
The API's are allowed in windowsapp since RS4 and are allowed by the WACK.
Only the MS header don't specify it properly for WINAPI_FAMILY_PC_APP
but since the DLL is on all WINAPI_FAMILY_DESKTOP_APP and allowed by the
WACK this always works.

CMS_DH_KEY_INFO is needed by CryptSetKeyParam().

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-24 18:20:47 +08:00
Steve Lhomme
4515f2a4c8 headers: allow CryptGenRandom in Win10 19H1 UWP builds
It's allowed by the WACK and in api-ms-win-security-cryptoapi-l1-1-0
since the 18362/19H1 SDK.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-24 18:20:47 +08:00
Steve Lhomme
372044adbc headers: allow CryptAcquireContext in Win10 RS4 UWP builds
It's allowed by the WACK and in api-ms-win-security-cryptoapi-l1-1-0
since the 16299/RS4 SDK.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-24 18:20:46 +08:00
Biswapriyo Nath
9dfaba214c headers: Add missing member in PROCESSOR_RELATIONSHIP structure
Required for firebird project.
d41cc85523

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-22 20:47:09 +08:00
Jøger Hansegård
b38a7d3e80 Fix reference counting bug in Microsoft::WRL::ComPtr::Attach
Microsoft::WRL::ComPtr::Attach should take ownership of an interface and
must therefore not increment the reference count of the attached
interface pointer.

This patch fixes this issue, and makes the MINGW64 implementation
behave the same way as the implementation shipped with the Microsoft
SDK.

Fixes: #892 Microsoft::WRL::ComPtr::Attach leaks references
Signed-off-by: Jøger Hansegård <joger.hansegard@qt.io>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-17 18:42:17 +08:00
Steve Lhomme
c84e095b9d headers: allow FORMAT_MESSAGE_ALLOCATE_BUFFER in UWP
FormatMessageA/W are allowed, so the flag should be allowed too.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-14 16:58:46 +08:00
LIU Hao
89ed79fd45 headers/winscard: Reformat some function declarations like the other ones
The contents of this commit should be examined with

  git show --color-words=.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-08 23:18:46 +08:00
Steve Lhomme
6a01246c74 headers: allow GetNumaHighestNodeNumber in Win10 19H1 UWP builds
It is not allowed in older SDK. It won't compile or won't link. The target DLL
will likely not have the function, so it should not be used when targetting older
Windows 10 versions in UWP mode.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-08 23:09:13 +08:00
Steve Lhomme
f29225e267 headers: restrict winscard to Desktop builds
It's not allowed in UWP.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-08 23:05:24 +08:00
LIU Hao
bbf449f20b crt: Bump FLS_MAXIMUM_AVAILABLE since Windows 10 19H1
Reference: https://learn.microsoft.com/en-us/windows-insider/archive/new-in-19h1#fls-slot-limit-increase
Suggested-by: Luca Bacci <luca.bacci@outlook.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-08 23:05:11 +08:00
Steve Lhomme
5115a1aa6b headers: Allow SetDllDirectoryW/A API in Win10 19H1 UWP builds
The documentation doesn't say it's allowed but they are allowed by the
Windows Application Certification Kit and the 18362 Windows SDK.

It is not allowed in older SDK. It won't compile or won't link.
The target DLL [1] will likely not have the function, so it should not
be used when targeting older Windows 10 versions in UWP mode.

We already have api-ms-win-core-kernel32-legacy-l1-1-1
in windowsapp.

[1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-kernel32-legacy-l1-1-1dll

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-07 22:37:19 +08:00
Steve Lhomme
dd8acff7ca headers: enabled LoadLibraryEx flags in Win10 19H1 UWP builds
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-07 22:37:19 +08:00
Biswapriyo Nath
0775a817a4 headers: Add missing macros in afunix.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-06 14:29:38 +08:00
Steve Lhomme
a688dcdf0e headers: Allow GetVolumeNameForVolumeMountPointW in Win10 20H1 UWP builds
The documentation doesn't say it's allowed but they are allowed by the
Windows Application Certification Kit and the 19041 Windows SDK.

It is not allowed in older SDK. It won't compile or won't link.
The target DLL api-ms-win-core-file-l1-2-0 will likely not have the
function, so it should not be used when targeting older Windows 10 versions
in UWP mode.

We now have api-ms-win-core-file-l1-2-0 in windowsapp.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-05 23:26:48 +08:00
Steve Lhomme
223479ec39 headers: Allow some file API in Win10 20H1 UWP builds
The documentation doesn't say it's allowed but they are allowed by the
Windows Application Certification Kit and the 19041 Windows SDK.

It is not allowed in older SDK. It won't compile or won't link.
The target DLL api-ms-win-core-file-l1-1-0 will likely not have the
function, so it should not be used when targeting older Windows 10 versions
in UWP mode.

The API entries have been added to api-ms-win-core-file-l1-1-0.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-05 23:26:22 +08:00
Steve Lhomme
433c9aa5fc headers: check which version of UWP Windows contains Virtual functions
* VirtualFree is always available in UWP
* VirtualAlloc is only available since 19H1/18362 SDK
* VirtualAllocEx is only available since 20H1/19041 SDK

They are all found in api-ms-win-core-memory-l1-1-0 which is in mincore
and windowsapp. It's one of the target DLLs [1]

[1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-memory-l1-1-0dll

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-05 22:50:54 +08:00
Steve Lhomme
85be3cab1a headers: enable FindResourceW in Win10 19H1 UWP builds
The documentation doesn't say it's allowed but they are allowed by the
Windows Application Certification Kit and the 18362 Windows SDK.

It is not allowed in older SDK. It won't compile or won't link.
The target DLL [1] will likely not have the function, so it should not
be used when targeting older Windows 10 versions in UWP mode.

We already have api-ms-win-core-libraryloader-l1-2-1 in mincore and windowsapp.

[1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-libraryloader-l1-2-1dll

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-05 22:48:03 +08:00
Steve Lhomme
24116dd29e headers: Allow CreateDirectoryExW/A in Win10 20H1 UWP builds
The documentation doesn't say it's allowed but they are allowed by the
Windows Application Certification Kit and the 19041 Windows SDK.

It is not allowed in older SDK. It won't compile or won't link.
The target DLL [1] will likely not have the function, so it should not
be used when targeting older Windows 10 versions in UWP mode.

We already have api-ms-win-core-file-l2-1-0 in mincore and windowsapp.

[1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-file-l2-1-0dll

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-05 22:47:13 +08:00
Steve Lhomme
76bb95c095 headers: Allow some Heap API in Win10 20H1 UWP builds
The documentation doesn't say it's allowed but they are allowed by the
Windows Application Certification Kit and the 19041 Windows SDK.

It is not allowed in older SDK. It won't compile or won't link.
The target DLL [1] will likely not have the function, so it should not
be used when targeting older Windows 10 versions in UWP mode.

We already have api-ms-win-core-heap-l1-1-0 and api-ms-win-core-heap-l1-2-0
in mincore and windowsapp.

[1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-heap-l1-2-0dll

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-05 22:46:46 +08:00
Steve Lhomme
90de543cc0 headers: Allow some Heap API in Win10 19H1 UWP builds
The documentation doesn't say it's allowed but they are allowed by the
Windows Application Certification Kit and the 18362 Windows SDK.

It is not allowed in older SDK. It won't compile or won't link.
The target DLL [1] will likely not have the function, so it should not
be used when targeting older Windows 10 versions in UWP mode.

We already have api-ms-win-core-heap-l1-1-0 and api-ms-win-core-heap-l1-2-0
in mincore and windowsapp.

[1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-heap-l1-2-0dll

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-05 22:46:06 +08:00
Steve Lhomme
ab81e5ba3d headers: allow Get/SetHandleInformation in Win10 19H1 UWP builds
The documentation doesn't say it's allowed but they are allowed by the
Windows Application Certification Kit and the 18362 Windows SDK.

It is not allowed in older SDK. It won't compile or won't link.
The target DLL [1] will likely not have the function, so it should not
be used when targeting older Windows 10 versions in UWP mode.

We already have api-ms-win-core-handle-l1-1-0 in mincore and windowsapp.

[1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-handle-l1-1-0dll

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-05 22:42:37 +08:00
Steve Lhomme
9dda8662fe headers: allow GetErrorMode in Win10 20H1 UWP builds
The documentation doesn't say it's allowed but they are allowed by the
Windows Application Certification Kit and the 19041 Windows SDK.

It is not allowed in older SDK. It won't compile or won't link.
The target DLL [1] will likely not have the function, so it should not
be used when targeting older Windows 10 versions in UWP mode.

We already have api-ms-win-core-errorhandling-l1-1-0 in mincore and windowsapp.

[1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-errorhandling-l1-1-0dll

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-05 22:42:10 +08:00
Steve Lhomme
50f2efaffa headers: only enable GetFileInformationByHandle for 19H1 UWP builds
It is not allowed in older SDK. It won't compile or won't link. The target DLL
will likely not have the function, so it should not be used when targetting older
Windows 10 versions in UWP mode.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-05 22:41:34 +08:00
Steve Lhomme
f444cc12e7 headers: enable LoadStringW/A in Win10 20H1 UWP builds
The documentation doesn't say it's allowed but they are allowed by the
Windows Application Certification Kit and the 19041 Windows SDK.

It is not allowed in older SDK. It won't compile or won't link.
The target DLL [1] will likely not have the function, so it should not
be used when targeting older Windows 10 versions in UWP mode.

We already have api-ms-win-core-libraryloader-l1-2-0 in mincore and windowsapp.

[1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-libraryloader-l1-2-0dll

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-05 22:35:41 +08:00
LIU Hao
98f9ebe120 include/winreg: Squash each function prototype into a single line
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-05 22:34:23 +08:00
Steve Lhomme
ec913d697f headers: enable some Registry API calls in Win10 19H1 UWP builds
The documentation doesn't say it's allowed but they are allowed by the
Windows Application Certification Kit and the 18362 Windows SDK.

It is not allowed in older SDK. It won't compile or won't link.
The target DLL api-ms-win-core-registry-l1-1-0 will likely not have the
function, so it should not be used when targeting older Windows 10 versions
in UWP mode.

We now have api-ms-win-core-registry-l1-1-0 in windowsapp.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-05 22:33:08 +08:00
Steve Lhomme
63747c6fb3 headers: enable more module API in Win10 19H1 UWP builds
The documentation doesn't say it's allowed but they are allowed by the
Windows Application Certification Kit and the 18362 Windows SDK.

It is not allowed in older SDK. It won't compile or won't link.
The target DLL [1] will likely not have the function, so it should not
be used when targeting older Windows 10 versions in UWP mode.

We already have api-ms-win-core-libraryloader-l1-2-0 in mincore and windowsapp.

[1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-libraryloader-l1-2-0dll

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-05 22:31:20 +08:00
Steve Lhomme
de3a671cca headers: enable CreateHardLinkW in Win10 19H1 UWP builds
The documentation doesn't say it's allowed but they are allowed by the
Windows Application Certification Kit and the 18362 Windows SDK.

It is not allowed in older SDK. It won't compile or won't link.
The target DLL [1] will likely not have the function, so it should not
be used when targeting older Windows 10 versions in UWP mode.

We already have api-ms-win-core-file-l2-1-0 in mincore and windowsapp.

[1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-file-l2-1-0dll

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-05 22:31:18 +08:00
Steve Lhomme
4e0ae2d751 headers: enable GET_MODULE_HANDLE_EX_xxx defines in UWP builds
It's available in the Windows 11 SDK for all builds targeting FAMILY_APP and more.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-06-05 22:31:18 +08:00
Jacek Caban
9817f79a04 wine-import.sh: Import all winrt IDLs from Wine.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-06-03 19:25:49 +02:00
Jacek Caban
22ae0dbe1b headers: Update imported headers to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-06-03 19:25:49 +02:00
Steve Lhomme
d78ef3552d headers: enable GetVolumePathNameW in Win10 UWP builds
The documentation doesn't say it's allowed, but the WIndows SDK allow it and
the Windows App Certification as well.

The official page for allowed API's also doesn't say it's allowed [1]
but the DLL that contains it is there.

[1] https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-file-l2-1-0dll

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-05-30 16:12:08 +08:00
Steve Lhomme
9df2e604dd headers: enable VirtualAlloc(Ex) in Win10 UWP builds
It is now officially allowed [1].

[1] https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualalloc

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-05-28 16:44:57 +08:00
Martin Storsjö
2b6c924761 headers: Skip defining __cpuidex for Clang 17
Just like GCC 11 got this function, Clang 17 also got an implementation
of it - thus skip our version to avoid conflicts.

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-05-25 12:47:35 +03:00
Steve Lhomme
3ffa2229ad headers: enable GetFileInformationByHandle in Win10 UWP builds
Contrary to what the documentation says, it's available in the Windows SDK,
both in the headers and when linking with WindowsApp.lib.

Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-05-24 23:04:09 +08:00
Bernhard Übelacker
813b571407 headers: Add C++ overloads for _strdate_s and _strtime_s in time.h.
Signed-off-by: Bernhard Übelacker <bernhardu@mailbox.org>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-05-19 10:08:18 +08:00
Bernhard Übelacker
38a73bab66 headers: Add C++ overload for _makepath_s in stdlib_s.h.
Signed-off-by: Bernhard Übelacker <bernhardu@mailbox.org>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-05-19 10:08:18 +08:00
Bernhard Übelacker
7b3ba1314e headers: Add C++ overload for wcsncat_s in string_s.h
Signed-off-by: Bernhard Übelacker <bernhardu@mailbox.org>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-05-19 10:08:18 +08:00
Bernhard Übelacker
bfca9fc869 headers: Remove semicolon from a few C++ overloads in string_s.h
Signed-off-by: Bernhard Übelacker <bernhardu@mailbox.org>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-05-19 10:08:18 +08:00
LIU Hao
776d3fbac8 headers: Update to wine master
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-04-30 21:41:51 +08:00
Biswapriyo Nath
c8efddaf55 headers: import windows.graphics.capture.interop.idl from wine
Required for pywinrt/python-winsdk project

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-04-30 21:29:31 +08:00
Jonathan Yong
f630e28a05 mmsystem: remove _WIN32 and WINVER checks
e8b3bf18df was breaking w32api for Cygwin, which use win32 APIs,
but don't define _WIN32.

Signed-off-by: Jonathan Yong <10walls@gmail.com>
2023-04-29 02:54:03 +00:00
Jonathan Yong
a08e769015 mingw-w64-headers: bump _mingw_mac.h to 12.0.0
Signed-off-by: Jonathan Yong <10walls@gmail.com>
2023-04-28 11:23:22 +00:00
LIU Hao
8b01df0b9c headers: Hide UTF-16 and UTF-32 functions from libmsvcrt
While these are standard C11 functions, Microsoft docs say they operate
on strings in UTF-8, instead of strings in the encoding determined by the
current locale. The MSVCRT `mbstate_t`, being an `int`, is too small for
implementations of these functions.

This commit ensures these functions are only declared for UCRT; when
targeting MSVCRT only the typedefs are available.

Reference: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/c16rtomb-c32rtomb1?view=msvc-170
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-04-27 23:12:07 +08:00
Martin Storsjö
e3f561cffc headers: Add IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY_XDATA
Also add enums for interpreting some fields in the arm64 pdata.

These have been present in WinSDK since 10.0.19041.0.

Curiously, there's no similar structs for interpreting
the ARM xdata (but the format is well documented, just like
for ARM64).

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-04-24 10:42:43 +03:00
Martin Storsjö
3929939ec6 headers: Define IMAGE_RUNTIME_FUNCTION_ENTRY for aarch64
We've had a definition of IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY since
0f9569488b in 2018, but we missed
the definition of the generic IMAGE_RUNTIME_FUNCTION_ENTRY to
point to the arch specific version of it.

The shorter names RUNTIME_FUNCTION and PRUNTIME_FUNCTION already
are typedefs for IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY though.

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-04-24 10:42:43 +03:00
Biswapriyo Nath
70ec1e0de4 headers: Add missing symbols in winioctl.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-04-15 17:03:25 +08:00
Jacek Caban
d1070d6094 headers: Import windows.ui.composition.interop.idl from Wine.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
2023-04-13 23:43:02 +02:00
Biswapriyo Nath
d48a95a494 headers: Add missing types in dispatcherqueue.h
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-04-12 09:15:54 +08:00
LIU Hao
ccf50c1413 headers/dxva2api: Regenerate H from IDL
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-04-11 23:17:16 +08:00
Biswapriyo Nath
ddeb05ab29 headers: Add missing values in winerror.h
Required for mozilla-central.

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2023-04-11 23:00:09 +08:00