Module: wine
Branch: master
Commit: 59da79021a6e441e3b21b933c744aba922208ec1
URL: https://source.winehq.org/git/wine.git/?a=commit;h=59da79021a6e441e3b21b933…
Author: Gerald Pfeifer <gerald(a)pfeifer.com>
Date: Tue Aug 10 22:36:27 2021 +0200
ntdll: Only use sysinfo function when present.
On some systems <sys/sysinfo.h> may be present while the sysinfo
function may not, or at least not as part of standard libraries,
so check whether the function is actually available before using
it.
This fixes builds on FreeBSD with the devel/libsysinfo present.
Signed-off-by: Gerald Pfeifer <gerald(a)pfeifer.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
configure | 1 +
configure.ac | 1 +
dlls/ntdll/unix/virtual.c | 3 ++-
include/config.h.in | 3 +++
4 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 1be0aa9d217..e8c1cb9e3a8 100755
--- a/configure
+++ b/configure
@@ -18068,6 +18068,7 @@ for ac_func in \
setprogname \
sigprocmask \
symlink \
+ sysinfo \
tcdrain \
thr_kill2
diff --git a/configure.ac b/configure.ac
index 69e27147088..065b3f231bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2205,6 +2205,7 @@ AC_CHECK_FUNCS(\
setprogname \
sigprocmask \
symlink \
+ sysinfo \
tcdrain \
thr_kill2
)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index a252e25fbc6..2cca90ac952 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -2737,7 +2737,8 @@ ULONG_PTR get_system_affinity_mask(void)
*/
void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info, BOOL wow64 )
{
-#if defined(HAVE_STRUCT_SYSINFO_TOTALRAM) && defined(HAVE_STRUCT_SYSINFO_MEM_UNIT)
+#if defined(HAVE_SYSINFO) \
+ && defined(HAVE_STRUCT_SYSINFO_TOTALRAM) && defined(HAVE_STRUCT_SYSINFO_MEM_UNIT)
struct sysinfo sinfo;
if (!sysinfo(&sinfo))
diff --git a/include/config.h.in b/include/config.h.in
index ad770281471..24f7b64ffd3 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -744,6 +744,9 @@
/* Define to 1 if you have the <syscall.h> header file. */
#undef HAVE_SYSCALL_H
+/* Define to 1 if you have the `sysinfo' function. */
+#undef HAVE_SYSINFO
+
/* Define to 1 if you have the
<SystemConfiguration/SCDynamicStoreCopyDHCPInfo.h> header file. */
#undef HAVE_SYSTEMCONFIGURATION_SCDYNAMICSTORECOPYDHCPINFO_H
Module: wine
Branch: master
Commit: 7a571127e4fb5e3eba3f382446f4a82ef5728b90
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7a571127e4fb5e3eba3f3824…
Author: Rémi Bernon <rbernon(a)codeweavers.com>
Date: Tue Aug 10 13:22:16 2021 +0200
xinput1_3/tests: Add some HID report tests.
This adds tests to validate the bogus HID devices exposed native XInput
driver. Interactive tests are also included to validate the HID report
values, and more specifically the weird combined triggers, which is
currently not implemented correctly in Wine.
Some third-party libraries, such as SDL, are known to rely on this bogus
HID devices and hardcode the expected report structure.
This has been tested on Windows 10 with XBox 360 controllers as well
as Xbox One S controllers.
The latter are detected as 045e:02ea on Linux, but as 045e:02ff on
Windows for some reason, and their descriptor seems a little bit
different.
Their exposed HID device also doesn't seem to work at all and ReadFile
never succeeds, so the interactive tests are skipped for these devices.
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/xinput1_3/tests/Makefile.in | 2 +-
dlls/xinput1_3/tests/xinput.c | 516 +++++++++++++++++++++++++++++++++++++++
2 files changed, 517 insertions(+), 1 deletion(-)
Diff: https://source.winehq.org/git/wine.git/?a=commitdiff;h=7a571127e4fb5e3eba3f…