From 036e919f2fba25afbb3d795f291876fb0aa06ce3 Mon Sep 17 00:00:00 2001 From: extrowerk <5569059+extrowerk@users.noreply.github.com> Date: Fri, 11 Mar 2022 21:03:53 +0100 Subject: [PATCH] Wine: bump (#6702) --- .../{wine-6.23.patchset => wine-7.1.patchset} | 629 ++++++++++++------ .../{wine-6.23.recipe => wine-7.1.recipe} | 5 +- 2 files changed, 444 insertions(+), 190 deletions(-) rename app-emulation/wine/patches/{wine-6.23.patchset => wine-7.1.patchset} (92%) rename app-emulation/wine/{wine-6.23.recipe => wine-7.1.recipe} (92%) diff --git a/app-emulation/wine/patches/wine-6.23.patchset b/app-emulation/wine/patches/wine-7.1.patchset similarity index 92% rename from app-emulation/wine/patches/wine-6.23.patchset rename to app-emulation/wine/patches/wine-7.1.patchset index 73e1491e5..9fdb60996 100644 --- a/app-emulation/wine/patches/wine-6.23.patchset +++ b/app-emulation/wine/patches/wine-7.1.patchset @@ -1,29 +1,14 @@ -From a7d16839941f7bb34820c2579aeaf48b7f4868f2 Mon Sep 17 00:00:00 2001 +From 2145081e5396ad52e74829053d10a7dad67c5421 Mon Sep 17 00:00:00 2001 From: X512 Date: Fri, 31 Dec 2021 08:17:23 +0900 Subject: Haiku: fix build and minimal operation ---- - dlls/nsiproxy.sys/ndis.c | 10 ++++++++ - dlls/ntdll/unix/file.c | 2 ++ - dlls/ntdll/unix/loader.c | 4 +++ - dlls/ntdll/unix/serial.c | 2 ++ - dlls/ntdll/unix/server.c | 3 +++ - dlls/ntdll/unix/signal_x86_64.c | 45 +++++++++++++++++++++++++++++++++ - dlls/ntdll/unix/socket.c | 7 +++++ - dlls/winex11.drv/bitblt.c | 1 + - dlls/ws2_32/unixlib.c | 6 +++++ - server/change.c | 3 +++ - server/fd.c | 3 +++ - server/signal.c | 3 +++ - server/sock.c | 8 ++++++ - 13 files changed, 97 insertions(+) diff --git a/dlls/nsiproxy.sys/ndis.c b/dlls/nsiproxy.sys/ndis.c -index 3e37bcecc78..ed8e206657b 100644 +index 036e8f1..57284a4 100644 --- a/dlls/nsiproxy.sys/ndis.c +++ b/dlls/nsiproxy.sys/ndis.c -@@ -264,6 +264,9 @@ static WCHAR *strdupAtoW( const char *str ) +@@ -256,6 +256,9 @@ static WCHAR *strdupAtoW( const char *str ) static struct if_entry *add_entry( DWORD index, char *name ) { @@ -33,7 +18,7 @@ index 3e37bcecc78..ed8e206657b 100644 struct if_entry *entry; int name_len = strlen( name ); -@@ -292,6 +295,7 @@ static struct if_entry *add_entry( DWORD index, char *name ) +@@ -284,6 +287,7 @@ static struct if_entry *add_entry( DWORD index, char *name ) list_add_tail( &if_list, &entry->entry ); return entry; @@ -41,7 +26,7 @@ index 3e37bcecc78..ed8e206657b 100644 } static void update_if_table( void ) -@@ -327,6 +331,7 @@ static void ifinfo_fill_dynamic( struct if_entry *entry, struct nsi_ndis_ifinfo_ +@@ -319,6 +323,7 @@ static void ifinfo_fill_dynamic( struct if_entry *entry, struct nsi_ndis_ifinfo_ fd = socket( PF_INET, SOCK_DGRAM, 0 ); if (fd == -1) return; @@ -49,7 +34,7 @@ index 3e37bcecc78..ed8e206657b 100644 if (!ioctl( fd, SIOCGIFFLAGS, &req )) { if (req.ifr_flags & IFF_UP) data->oper_status = IfOperStatusUp; -@@ -335,6 +340,7 @@ static void ifinfo_fill_dynamic( struct if_entry *entry, struct nsi_ndis_ifinfo_ +@@ -327,6 +332,7 @@ static void ifinfo_fill_dynamic( struct if_entry *entry, struct nsi_ndis_ifinfo_ #endif else data->oper_status = IfOperStatusDown; } else data->oper_status = IfOperStatusUnknown; @@ -57,7 +42,7 @@ index 3e37bcecc78..ed8e206657b 100644 data->flags.unk = 0; data->flags.not_media_conn = 0; -@@ -342,8 +348,12 @@ static void ifinfo_fill_dynamic( struct if_entry *entry, struct nsi_ndis_ifinfo_ +@@ -334,8 +340,12 @@ static void ifinfo_fill_dynamic( struct if_entry *entry, struct nsi_ndis_ifinfo_ data->media_conn_state = MediaConnectStateConnected; data->unk = 0; @@ -71,10 +56,10 @@ index 3e37bcecc78..ed8e206657b 100644 close( fd ); diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c -index 10d8f3de4a3..43e21056a0a 100644 +index a29b5cb..0d25f8b 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c -@@ -6529,6 +6529,7 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, IO_STATUS_BLOCK *io +@@ -6522,6 +6522,7 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, IO_STATUS_BLOCK *io } if (!get_mountmgr_fs_info( handle, fd, &drive, sizeof(drive) )) fs_type = drive.fs_type; @@ -82,7 +67,7 @@ index 10d8f3de4a3..43e21056a0a 100644 else { struct statfs stfs; -@@ -6560,6 +6561,7 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, IO_STATUS_BLOCK *io +@@ -6553,6 +6554,7 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, IO_STATUS_BLOCK *io #endif } } @@ -91,10 +76,10 @@ index 10d8f3de4a3..43e21056a0a 100644 switch (fs_type) { diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c -index 82d099de3be..a1e4515616f 100644 +index 96301b1..8976e81 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c -@@ -870,7 +870,11 @@ static NTSTATUS map_so_dll( const IMAGE_NT_HEADERS *nt_descr, HMODULE module ) +@@ -868,7 +868,11 @@ static NTSTATUS map_so_dll( const IMAGE_NT_HEADERS *nt_descr, HMODULE module ) + sizeof(IMAGE_NT_HEADERS) + nb_sections * sizeof(IMAGE_SECTION_HEADER)); @@ -107,10 +92,10 @@ index 82d099de3be..a1e4515616f 100644 dos = (IMAGE_DOS_HEADER *)addr; nt = (IMAGE_NT_HEADERS *)((BYTE *)(dos + 1) + sizeof(builtin_signature)); diff --git a/dlls/ntdll/unix/serial.c b/dlls/ntdll/unix/serial.c -index 83244d02d41..6d1d27c749e 100644 +index 16c5964..79b4085 100644 --- a/dlls/ntdll/unix/serial.c +++ b/dlls/ntdll/unix/serial.c -@@ -280,9 +280,11 @@ static NTSTATUS get_line_control(int fd, SERIAL_LINE_CONTROL* slc) +@@ -276,9 +276,11 @@ static NTSTATUS get_line_control(int fd, SERIAL_LINE_CONTROL* slc) switch (port.c_cflag & CSIZE) { case CS5: slc->WordLength = 5; break; @@ -123,10 +108,10 @@ index 83244d02d41..6d1d27c749e 100644 } diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c -index 1dcd0792072..e6eb2c39a71 100644 +index 9d0594d..39951fb 100644 --- a/dlls/ntdll/unix/server.c +++ b/dlls/ntdll/unix/server.c -@@ -76,6 +76,9 @@ +@@ -70,6 +70,9 @@ #define _POSIX_SPAWN_DISABLE_ASLR 0x0100 #endif #endif @@ -137,7 +122,7 @@ index 1dcd0792072..e6eb2c39a71 100644 #include "ntstatus.h" #define WIN32_NO_STATUS diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c -index 9e9a96db832..957f796444b 100644 +index 68855dc..535fed1 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -64,6 +64,11 @@ @@ -152,7 +137,7 @@ index 9e9a96db832..957f796444b 100644 #define NONAMELESSUNION #define NONAMELESSSTRUCT -@@ -232,6 +237,34 @@ __ASM_GLOBAL_FUNC( alloc_fs_sel, +@@ -234,6 +239,34 @@ __ASM_GLOBAL_FUNC( alloc_fs_sel, #define FPU_sig(context) ((XMM_SAVE_AREA32 *)&(context)->uc_mcontext->__fs.__fpu_fcw) #define XState_sig(context) NULL @@ -187,7 +172,7 @@ index 9e9a96db832..957f796444b 100644 #else #error You must define the signal context functions for your platform #endif -@@ -1511,10 +1544,12 @@ static inline void set_sigcontext( const CONTEXT *context, ucontext_t *sigcontex +@@ -1536,10 +1569,12 @@ static inline void set_sigcontext( const CONTEXT *context, ucontext_t *sigcontex R14_sig(sigcontext) = context->R14; R15_sig(sigcontext) = context->R15; RIP_sig(sigcontext) = context->Rip; @@ -200,7 +185,7 @@ index 9e9a96db832..957f796444b 100644 #ifdef DS_sig DS_sig(sigcontext) = context->SegDs; #endif -@@ -2171,7 +2206,9 @@ static void setup_raise_exception( ucontext_t *sigcontext, EXCEPTION_RECORD *rec +@@ -2196,7 +2231,9 @@ static void setup_raise_exception( ucontext_t *sigcontext, EXCEPTION_RECORD *rec } } @@ -210,7 +195,7 @@ index 9e9a96db832..957f796444b 100644 RIP_sig(sigcontext) = (ULONG_PTR)pKiUserExceptionDispatcher; RSP_sig(sigcontext) = (ULONG_PTR)stack; /* clear single-step, direction, and align check flag */ -@@ -2550,6 +2587,12 @@ static void segv_handler( int signal, siginfo_t *siginfo, void *sigcontext ) +@@ -2583,6 +2620,12 @@ static void segv_handler( int signal, siginfo_t *siginfo, void *sigcontext ) EXCEPTION_RECORD rec = { 0 }; struct xcontext context; ucontext_t *ucontext = sigcontext; @@ -223,7 +208,7 @@ index 9e9a96db832..957f796444b 100644 rec.ExceptionAddress = (void *)RIP_sig(ucontext); save_context( &context, sigcontext ); -@@ -2911,6 +2954,8 @@ void signal_init_thread( TEB *teb ) +@@ -2944,6 +2987,8 @@ void signal_init_thread( TEB *teb ) thread's gsbase. Have each thread record its gsbase pointer into its TEB so alloc_tls_slot() can find it. */ teb->Reserved5[0] = amd64_thread_data()->pthread_teb; @@ -233,10 +218,10 @@ index 9e9a96db832..957f796444b 100644 # error Please define setting %gs for your architecture #endif diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c -index 2e79b9baa0f..335b9fa8ed6 100644 +index 71dfcdd..39648d8 100644 --- a/dlls/ntdll/unix/socket.c +++ b/dlls/ntdll/unix/socket.c -@@ -168,7 +168,9 @@ static NTSTATUS sock_errno_to_status( int err ) +@@ -169,7 +169,9 @@ static NTSTATUS sock_errno_to_status( int err ) case EDESTADDRREQ: return STATUS_INVALID_PARAMETER; case EMSGSIZE: return STATUS_BUFFER_OVERFLOW; case EPROTONOSUPPORT: @@ -246,7 +231,7 @@ index 2e79b9baa0f..335b9fa8ed6 100644 case EPFNOSUPPORT: case EAFNOSUPPORT: case EPROTOTYPE: return STATUS_NOT_SUPPORTED; -@@ -1450,11 +1452,16 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc +@@ -1448,11 +1450,16 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc } else { @@ -264,7 +249,7 @@ index 2e79b9baa0f..335b9fa8ed6 100644 *(int *)out_buffer = !value; } diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c -index fad183b0b01..fe47611d8bf 100644 +index fad183b..fe47611 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -41,6 +41,7 @@ @@ -276,10 +261,10 @@ index fad183b0b01..fe47611d8bf 100644 #include "windef.h" #include "winbase.h" diff --git a/dlls/ws2_32/unixlib.c b/dlls/ws2_32/unixlib.c -index 67edf06368e..4b9274bf867 100644 +index 56a0bed..015850f 100644 --- a/dlls/ws2_32/unixlib.c +++ b/dlls/ws2_32/unixlib.c -@@ -166,7 +166,9 @@ static const int ip_protocol_map[][2] = +@@ -162,7 +162,9 @@ static const int ip_protocol_map[][2] = MAP( IPPROTO_ICMP ), MAP( IPPROTO_IGMP ), MAP( IPPROTO_RAW ), @@ -289,7 +274,7 @@ index 67edf06368e..4b9274bf867 100644 }; #undef MAP -@@ -338,7 +340,9 @@ static unsigned int errno_from_unix( int err ) +@@ -334,7 +336,9 @@ static unsigned int errno_from_unix( int err ) case EPROTOTYPE: return WSAEPROTOTYPE; case ENOPROTOOPT: return WSAENOPROTOOPT; case EPROTONOSUPPORT: return WSAEPROTONOSUPPORT; @@ -299,7 +284,7 @@ index 67edf06368e..4b9274bf867 100644 case EOPNOTSUPP: return WSAEOPNOTSUPP; case EPFNOSUPPORT: return WSAEPFNOSUPPORT; case EAFNOSUPPORT: return WSAEAFNOSUPPORT; -@@ -354,7 +358,9 @@ static unsigned int errno_from_unix( int err ) +@@ -350,7 +354,9 @@ static unsigned int errno_from_unix( int err ) case EISCONN: return WSAEISCONN; case ENOTCONN: return WSAENOTCONN; case ESHUTDOWN: return WSAESHUTDOWN; @@ -310,7 +295,7 @@ index 67edf06368e..4b9274bf867 100644 case ECONNREFUSED: return WSAECONNREFUSED; case ELOOP: return WSAELOOP; diff --git a/server/change.c b/server/change.c -index a01d6894151..a26f7d36214 100644 +index 6477b45..d7aa369 100644 --- a/server/change.c +++ b/server/change.c @@ -36,6 +36,9 @@ @@ -324,7 +309,7 @@ index a01d6894151..a26f7d36214 100644 #include "ntstatus.h" #define WIN32_NO_STATUS diff --git a/server/fd.c b/server/fd.c -index c9a21186722..1a0840f4113 100644 +index 1b4b98b..1ec8c06 100644 --- a/server/fd.c +++ b/server/fd.c @@ -88,6 +88,9 @@ @@ -338,7 +323,7 @@ index c9a21186722..1a0840f4113 100644 #include "ntstatus.h" #define WIN32_NO_STATUS diff --git a/server/signal.c b/server/signal.c -index 19b76d44c16..05dafe154f5 100644 +index 19b76d4..05dafe1 100644 --- a/server/signal.c +++ b/server/signal.c @@ -28,6 +28,9 @@ @@ -352,10 +337,10 @@ index 19b76d44c16..05dafe154f5 100644 #include "file.h" #include "object.h" diff --git a/server/sock.c b/server/sock.c -index c9b71137c4c..daeb937bf4e 100644 +index 40fb0ca..0348b21 100644 --- a/server/sock.c +++ b/server/sock.c -@@ -1483,7 +1483,9 @@ static int get_unix_protocol( int protocol ) +@@ -1539,7 +1539,9 @@ static int get_unix_protocol( int protocol ) case WS_IPPROTO_ICMP: return IPPROTO_ICMP; case WS_IPPROTO_IGMP: return IPPROTO_IGMP; case WS_IPPROTO_IP: return IPPROTO_IP; @@ -365,7 +350,7 @@ index c9b71137c4c..daeb937bf4e 100644 case WS_IPPROTO_IPV6: return IPPROTO_IPV6; case WS_IPPROTO_RAW: return IPPROTO_RAW; case WS_IPPROTO_TCP: return IPPROTO_TCP; -@@ -1943,7 +1945,9 @@ static unsigned int sock_get_error( int err ) +@@ -1999,7 +2001,9 @@ static unsigned int sock_get_error( int err ) case EPROTOTYPE: return WSAEPROTOTYPE; case ENOPROTOOPT: return WSAENOPROTOOPT; case EPROTONOSUPPORT: return WSAEPROTONOSUPPORT; @@ -375,7 +360,7 @@ index c9b71137c4c..daeb937bf4e 100644 case EOPNOTSUPP: return WSAEOPNOTSUPP; case EPFNOSUPPORT: return WSAEPFNOSUPPORT; case EAFNOSUPPORT: return WSAEAFNOSUPPORT; -@@ -1959,7 +1963,9 @@ static unsigned int sock_get_error( int err ) +@@ -2015,7 +2019,9 @@ static unsigned int sock_get_error( int err ) case EISCONN: return WSAEISCONN; case ENOTCONN: return WSAENOTCONN; case ESHUTDOWN: return WSAESHUTDOWN; @@ -385,7 +370,7 @@ index c9b71137c4c..daeb937bf4e 100644 case ETIMEDOUT: return WSAETIMEDOUT; case ECONNREFUSED: return WSAECONNREFUSED; case ELOOP: return WSAELOOP; -@@ -2010,7 +2016,9 @@ static int sock_get_ntstatus( int err ) +@@ -2066,7 +2072,9 @@ static int sock_get_ntstatus( int err ) case EDESTADDRREQ: return STATUS_INVALID_PARAMETER; case EMSGSIZE: return STATUS_BUFFER_OVERFLOW; case EPROTONOSUPPORT: @@ -399,62 +384,17 @@ index c9b71137c4c..daeb937bf4e 100644 2.30.2 -From a598228f33d61990d18e09560d5028a018a22d91 Mon Sep 17 00:00:00 2001 +From 758685affeed339dce6fa6f65b5903e484275c6d Mon Sep 17 00:00:00 2001 From: X512 Date: Sun, 16 Jan 2022 17:27:49 +0900 Subject: winehaiku.drv: add ---- - configure.ac | 1 + - dlls/winehaiku.drv/Makefile.in | 26 + - dlls/winehaiku.drv/clipboard.c | 105 ++ - dlls/winehaiku.drv/desktop.c | 45 + - dlls/winehaiku.drv/display.c | 96 ++ - dlls/winehaiku.drv/gdi.c | 163 +++ - dlls/winehaiku.drv/haikudrv.h | 307 ++++++ - dlls/winehaiku.drv/haikudrv_main.c | 109 ++ - dlls/winehaiku.drv/ime.c | 181 ++++ - dlls/winehaiku.drv/init.c | 103 ++ - dlls/winehaiku.drv/keyboard.c | 92 ++ - dlls/winehaiku.drv/mouse.c | 79 ++ - dlls/winehaiku.drv/settings.cpp | 74 ++ - dlls/winehaiku.drv/systray.c | 74 ++ - dlls/winehaiku.drv/version.rc | 22 + - dlls/winehaiku.drv/vidmode.c | 57 + - dlls/winehaiku.drv/vulkan.cpp | 418 ++++++++ - dlls/winehaiku.drv/window.cpp | 1393 +++++++++++++++++++++++++ - dlls/winehaiku.drv/winehaiku.drv.spec | 29 + - dlls/winehaiku.drv/wintab.c | 69 ++ - include/wine/server.h | 4 +- - include/wine/vulkan_driver.h | 40 +- - include/winuser.h | 2 +- - programs/explorer/desktop.c | 2 +- - 24 files changed, 3467 insertions(+), 24 deletions(-) - create mode 100644 dlls/winehaiku.drv/Makefile.in - create mode 100644 dlls/winehaiku.drv/clipboard.c - create mode 100644 dlls/winehaiku.drv/desktop.c - create mode 100644 dlls/winehaiku.drv/display.c - create mode 100644 dlls/winehaiku.drv/gdi.c - create mode 100644 dlls/winehaiku.drv/haikudrv.h - create mode 100644 dlls/winehaiku.drv/haikudrv_main.c - create mode 100644 dlls/winehaiku.drv/ime.c - create mode 100644 dlls/winehaiku.drv/init.c - create mode 100644 dlls/winehaiku.drv/keyboard.c - create mode 100644 dlls/winehaiku.drv/mouse.c - create mode 100644 dlls/winehaiku.drv/settings.cpp - create mode 100644 dlls/winehaiku.drv/systray.c - create mode 100644 dlls/winehaiku.drv/version.rc - create mode 100644 dlls/winehaiku.drv/vidmode.c - create mode 100644 dlls/winehaiku.drv/vulkan.cpp - create mode 100644 dlls/winehaiku.drv/window.cpp - create mode 100644 dlls/winehaiku.drv/winehaiku.drv.spec - create mode 100644 dlls/winehaiku.drv/wintab.c diff --git a/configure.ac b/configure.ac -index 4fdb1ef33df..c7b4e40cf5e 100644 +index fed12f6..a83e02b 100644 --- a/configure.ac +++ b/configure.ac -@@ -3547,6 +3547,7 @@ WINE_CONFIG_MAKEFILE(dlls/winepulse.drv) +@@ -3395,6 +3395,7 @@ WINE_CONFIG_MAKEFILE(dlls/winepulse.drv) WINE_CONFIG_MAKEFILE(dlls/wineusb.sys) WINE_CONFIG_MAKEFILE(dlls/winevulkan) WINE_CONFIG_MAKEFILE(dlls/winex11.drv) @@ -464,7 +404,7 @@ index 4fdb1ef33df..c7b4e40cf5e 100644 WINE_CONFIG_MAKEFILE(dlls/wing32) diff --git a/dlls/winehaiku.drv/Makefile.in b/dlls/winehaiku.drv/Makefile.in new file mode 100644 -index 00000000000..0db76dd3a93 +index 0000000..0db76dd --- /dev/null +++ b/dlls/winehaiku.drv/Makefile.in @@ -0,0 +1,26 @@ @@ -496,7 +436,7 @@ index 00000000000..0db76dd3a93 +RC_SRCS = version.rc diff --git a/dlls/winehaiku.drv/clipboard.c b/dlls/winehaiku.drv/clipboard.c new file mode 100644 -index 00000000000..8e840a543f1 +index 0000000..8e840a5 --- /dev/null +++ b/dlls/winehaiku.drv/clipboard.c @@ -0,0 +1,105 @@ @@ -607,7 +547,7 @@ index 00000000000..8e840a543f1 +} diff --git a/dlls/winehaiku.drv/desktop.c b/dlls/winehaiku.drv/desktop.c new file mode 100644 -index 00000000000..c06e22e65a3 +index 0000000..c06e22e --- /dev/null +++ b/dlls/winehaiku.drv/desktop.c @@ -0,0 +1,45 @@ @@ -658,7 +598,7 @@ index 00000000000..c06e22e65a3 +} diff --git a/dlls/winehaiku.drv/display.c b/dlls/winehaiku.drv/display.c new file mode 100644 -index 00000000000..d122ba270f2 +index 0000000..d122ba2 --- /dev/null +++ b/dlls/winehaiku.drv/display.c @@ -0,0 +1,96 @@ @@ -760,7 +700,7 @@ index 00000000000..d122ba270f2 +} diff --git a/dlls/winehaiku.drv/gdi.c b/dlls/winehaiku.drv/gdi.c new file mode 100644 -index 00000000000..3bfc6bc9400 +index 0000000..3bfc6bc --- /dev/null +++ b/dlls/winehaiku.drv/gdi.c @@ -0,0 +1,163 @@ @@ -929,7 +869,7 @@ index 00000000000..3bfc6bc9400 +} diff --git a/dlls/winehaiku.drv/haikudrv.h b/dlls/winehaiku.drv/haikudrv.h new file mode 100644 -index 00000000000..65ffb414ab1 +index 0000000..65ffb41 --- /dev/null +++ b/dlls/winehaiku.drv/haikudrv.h @@ -0,0 +1,307 @@ @@ -1242,7 +1182,7 @@ index 00000000000..65ffb414ab1 +#endif /* __WINE_HAIKUDRV_H */ diff --git a/dlls/winehaiku.drv/haikudrv_main.c b/dlls/winehaiku.drv/haikudrv_main.c new file mode 100644 -index 00000000000..031f6d95a76 +index 0000000..031f6d9 --- /dev/null +++ b/dlls/winehaiku.drv/haikudrv_main.c @@ -0,0 +1,109 @@ @@ -1357,7 +1297,7 @@ index 00000000000..031f6d95a76 +} diff --git a/dlls/winehaiku.drv/ime.c b/dlls/winehaiku.drv/ime.c new file mode 100644 -index 00000000000..beb8d7c29e3 +index 0000000..beb8d7c --- /dev/null +++ b/dlls/winehaiku.drv/ime.c @@ -0,0 +1,181 @@ @@ -1544,7 +1484,7 @@ index 00000000000..beb8d7c29e3 +} diff --git a/dlls/winehaiku.drv/init.c b/dlls/winehaiku.drv/init.c new file mode 100644 -index 00000000000..a0a279b9837 +index 0000000..a0a279b --- /dev/null +++ b/dlls/winehaiku.drv/init.c @@ -0,0 +1,103 @@ @@ -1653,7 +1593,7 @@ index 00000000000..a0a279b9837 +} diff --git a/dlls/winehaiku.drv/keyboard.c b/dlls/winehaiku.drv/keyboard.c new file mode 100644 -index 00000000000..007004f4924 +index 0000000..007004f --- /dev/null +++ b/dlls/winehaiku.drv/keyboard.c @@ -0,0 +1,92 @@ @@ -1751,7 +1691,7 @@ index 00000000000..007004f4924 +} diff --git a/dlls/winehaiku.drv/mouse.c b/dlls/winehaiku.drv/mouse.c new file mode 100644 -index 00000000000..b44039e9d76 +index 0000000..b44039e --- /dev/null +++ b/dlls/winehaiku.drv/mouse.c @@ -0,0 +1,79 @@ @@ -1836,7 +1776,7 @@ index 00000000000..b44039e9d76 +} diff --git a/dlls/winehaiku.drv/settings.cpp b/dlls/winehaiku.drv/settings.cpp new file mode 100644 -index 00000000000..967ae928b6f +index 0000000..967ae92 --- /dev/null +++ b/dlls/winehaiku.drv/settings.cpp @@ -0,0 +1,74 @@ @@ -1916,7 +1856,7 @@ index 00000000000..967ae928b6f +} diff --git a/dlls/winehaiku.drv/systray.c b/dlls/winehaiku.drv/systray.c new file mode 100644 -index 00000000000..a6ee21766c0 +index 0000000..a6ee217 --- /dev/null +++ b/dlls/winehaiku.drv/systray.c @@ -0,0 +1,74 @@ @@ -1996,7 +1936,7 @@ index 00000000000..a6ee21766c0 +} diff --git a/dlls/winehaiku.drv/version.rc b/dlls/winehaiku.drv/version.rc new file mode 100644 -index 00000000000..56c62174719 +index 0000000..56c6217 --- /dev/null +++ b/dlls/winehaiku.drv/version.rc @@ -0,0 +1,22 @@ @@ -2024,7 +1964,7 @@ index 00000000000..56c62174719 +#include "wine/wine_common_ver.rc" diff --git a/dlls/winehaiku.drv/vidmode.c b/dlls/winehaiku.drv/vidmode.c new file mode 100644 -index 00000000000..0930257d57b +index 0000000..0930257 --- /dev/null +++ b/dlls/winehaiku.drv/vidmode.c @@ -0,0 +1,57 @@ @@ -2087,7 +2027,7 @@ index 00000000000..0930257d57b +} diff --git a/dlls/winehaiku.drv/vulkan.cpp b/dlls/winehaiku.drv/vulkan.cpp new file mode 100644 -index 00000000000..32929122ff7 +index 0000000..3292912 --- /dev/null +++ b/dlls/winehaiku.drv/vulkan.cpp @@ -0,0 +1,418 @@ @@ -2511,7 +2451,7 @@ index 00000000000..32929122ff7 +} diff --git a/dlls/winehaiku.drv/window.cpp b/dlls/winehaiku.drv/window.cpp new file mode 100644 -index 00000000000..26667b2ad0c +index 0000000..26667b2 --- /dev/null +++ b/dlls/winehaiku.drv/window.cpp @@ -0,0 +1,1393 @@ @@ -3910,7 +3850,7 @@ index 00000000000..26667b2ad0c +} diff --git a/dlls/winehaiku.drv/winehaiku.drv.spec b/dlls/winehaiku.drv/winehaiku.drv.spec new file mode 100644 -index 00000000000..9be88c47358 +index 0000000..9be88c4 --- /dev/null +++ b/dlls/winehaiku.drv/winehaiku.drv.spec @@ -0,0 +1,29 @@ @@ -3945,7 +3885,7 @@ index 00000000000..9be88c47358 +@ stdcall ImeGetImeMenuItems(long long long ptr ptr long) diff --git a/dlls/winehaiku.drv/wintab.c b/dlls/winehaiku.drv/wintab.c new file mode 100644 -index 00000000000..47e0e9a4681 +index 0000000..47e0e9a --- /dev/null +++ b/dlls/winehaiku.drv/wintab.c @@ -0,0 +1,69 @@ @@ -4019,7 +3959,7 @@ index 00000000000..47e0e9a4681 + return 0; +} diff --git a/include/wine/server.h b/include/wine/server.h -index 57bcdbbb00d..5f3327b20a8 100644 +index b05271b..9efe425 100644 --- a/include/wine/server.h +++ b/include/wine/server.h @@ -70,7 +70,7 @@ static inline data_size_t wine_server_reply_size( const void *reply ) @@ -4041,7 +3981,7 @@ index 57bcdbbb00d..5f3327b20a8 100644 req->u.req.request_header.reply_size = max_size; } diff --git a/include/wine/vulkan_driver.h b/include/wine/vulkan_driver.h -index c2a2acfc282..853244058d9 100644 +index 110716e..9d3b74e 100644 --- a/include/wine/vulkan_driver.h +++ b/include/wine/vulkan_driver.h @@ -56,17 +56,17 @@ static inline void *get_vulkan_driver_device_proc_addr( @@ -4120,7 +4060,7 @@ index c2a2acfc282..853244058d9 100644 name -= 2; diff --git a/include/winuser.h b/include/winuser.h -index 898c9034e33..048f86e9956 100644 +index 898c903..048f86e 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -4442,7 +4442,7 @@ struct user_api_hook @@ -4133,7 +4073,7 @@ index 898c9034e33..048f86e9956 100644 #endif diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c -index 6d577dd0fd1..c96a85f2d60 100644 +index 6d577dd..c96a85f 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -39,7 +39,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(explorer); @@ -4149,18 +4089,14 @@ index 6d577dd0fd1..c96a85f2d60 100644 2.30.2 -From 1e8491ce2859de2d937b78bbeca413bd7f4efb30 Mon Sep 17 00:00:00 2001 +From 4a909e312d3dffd91444e0b4b99847438a5e2215 Mon Sep 17 00:00:00 2001 From: X512 Date: Thu, 20 Jan 2022 22:28:08 +0900 Subject: winehaiku.drv: stand alone Vulkan WSI implementation ---- - dlls/winehaiku.drv/Makefile.in | 2 +- - dlls/winehaiku.drv/vulkan.cpp | 849 ++++++++++++++++++++++++++++++--- - 2 files changed, 787 insertions(+), 64 deletions(-) diff --git a/dlls/winehaiku.drv/Makefile.in b/dlls/winehaiku.drv/Makefile.in -index 0db76dd3a93..6a8d910ed66 100644 +index 0db76dd..6a8d910 100644 --- a/dlls/winehaiku.drv/Makefile.in +++ b/dlls/winehaiku.drv/Makefile.in @@ -2,7 +2,7 @@ MODULE = winehaiku.drv @@ -4173,7 +4109,7 @@ index 0db76dd3a93..6a8d910ed66 100644 EXTRADLLFLAGS = -mcygwin diff --git a/dlls/winehaiku.drv/vulkan.cpp b/dlls/winehaiku.drv/vulkan.cpp -index 32929122ff7..59bf952ebb7 100644 +index 3292912..59bf952 100644 --- a/dlls/winehaiku.drv/vulkan.cpp +++ b/dlls/winehaiku.drv/vulkan.cpp @@ -1,3 +1,5 @@ @@ -5158,22 +5094,14 @@ index 32929122ff7..59bf952ebb7 100644 2.30.2 -From 619fb2083a29685c115014d3e45b5b00cf285992 Mon Sep 17 00:00:00 2001 +From ff659948b7635dcfb821932663976ee33ee750fc Mon Sep 17 00:00:00 2001 From: X512 Date: Thu, 20 Jan 2022 22:28:58 +0900 Subject: winehaiku.drv: update ---- - dlls/winehaiku.drv/Makefile.in | 2 +- - dlls/winehaiku.drv/{mouse.c => mouse.cpp} | 22 +++++++- - dlls/winehaiku.drv/window.cpp | 60 ++-------------------- - dlls/winehaiku.drv/window.h | 62 +++++++++++++++++++++++ - 4 files changed, 86 insertions(+), 60 deletions(-) - rename dlls/winehaiku.drv/{mouse.c => mouse.cpp} (85%) - create mode 100644 dlls/winehaiku.drv/window.h diff --git a/dlls/winehaiku.drv/Makefile.in b/dlls/winehaiku.drv/Makefile.in -index 6a8d910ed66..2e0d0232fa5 100644 +index 6a8d910..2e0d023 100644 --- a/dlls/winehaiku.drv/Makefile.in +++ b/dlls/winehaiku.drv/Makefile.in @@ -13,7 +13,7 @@ C_SRCS = \ @@ -5189,7 +5117,7 @@ diff --git a/dlls/winehaiku.drv/mouse.c b/dlls/winehaiku.drv/mouse.cpp similarity index 85% rename from dlls/winehaiku.drv/mouse.c rename to dlls/winehaiku.drv/mouse.cpp -index b44039e9d76..cbf4eaafff6 100644 +index b44039e..cbf4eaa 100644 --- a/dlls/winehaiku.drv/mouse.c +++ b/dlls/winehaiku.drv/mouse.cpp @@ -25,7 +25,11 @@ @@ -5244,7 +5172,7 @@ index b44039e9d76..cbf4eaafff6 100644 /*********************************************************************** diff --git a/dlls/winehaiku.drv/window.cpp b/dlls/winehaiku.drv/window.cpp -index 26667b2ad0c..18dcba70c69 100644 +index 26667b2..18dcba7 100644 --- a/dlls/winehaiku.drv/window.cpp +++ b/dlls/winehaiku.drv/window.cpp @@ -29,19 +29,11 @@ @@ -5333,7 +5261,7 @@ index 26667b2ad0c..18dcba70c69 100644 auto it = sWindows->find(hwnd); diff --git a/dlls/winehaiku.drv/window.h b/dlls/winehaiku.drv/window.h new file mode 100644 -index 00000000000..dc737c38fa3 +index 0000000..dc737c3 --- /dev/null +++ b/dlls/winehaiku.drv/window.h @@ -0,0 +1,62 @@ @@ -5403,28 +5331,17 @@ index 00000000000..dc737c38fa3 2.30.2 -From 084d7361e7c331d191d3b523a65f5af0f7070767 Mon Sep 17 00:00:00 2001 +From 5ec783f8457f00b99d8b5bf98d09bcd29ff0985e Mon Sep 17 00:00:00 2001 From: X512 Date: Thu, 20 Jan 2022 22:31:14 +0900 Subject: haiku: update ---- - dlls/ntdll/unix/signal_x86_64.c | 64 +++++++++++++++++++++++++++++++-- - dlls/ntdll/unix/virtual.c | 7 ++++ - dlls/winex11.drv/keyboard.c | 4 +-- - dlls/winex11.drv/x11drv_main.c | 3 +- - dlls/ws2_32/unixlib.c | 1 + - programs/winedbg/winedbg.c | 2 ++ - server/fd.c | 1 + - server/signal.c | 3 ++ - tools/winegcc/winegcc.c | 3 ++ - 9 files changed, 82 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c -index 957f796444b..063892046e1 100644 +index 535fed1..51477df 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c -@@ -254,7 +254,7 @@ __ASM_GLOBAL_FUNC( alloc_fs_sel, +@@ -256,7 +256,7 @@ __ASM_GLOBAL_FUNC( alloc_fs_sel, #define R13_sig(context) ((context)->uc_mcontext.r13) #define R14_sig(context) ((context)->uc_mcontext.r14) #define R15_sig(context) ((context)->uc_mcontext.r15) @@ -5433,7 +5350,7 @@ index 957f796444b..063892046e1 100644 #define FS_sig(context) NULL #define GS_sig(context) NULL #define EFL_sig(context) ((context)->uc_mcontext.rflags) -@@ -2577,6 +2577,46 @@ static BOOL handle_syscall_trap( ucontext_t *sigcontext ) +@@ -2610,6 +2610,46 @@ static BOOL handle_syscall_trap( ucontext_t *sigcontext ) } @@ -5480,7 +5397,7 @@ index 957f796444b..063892046e1 100644 /********************************************************************** * segv_handler * -@@ -2588,11 +2628,16 @@ static void segv_handler( int signal, siginfo_t *siginfo, void *sigcontext ) +@@ -2621,11 +2661,16 @@ static void segv_handler( int signal, siginfo_t *siginfo, void *sigcontext ) struct xcontext context; ucontext_t *ucontext = sigcontext; printf("segv_handler\n"); @@ -5498,7 +5415,7 @@ index 957f796444b..063892046e1 100644 rec.ExceptionAddress = (void *)RIP_sig(ucontext); save_context( &context, sigcontext ); -@@ -2781,6 +2826,18 @@ static void int_handler( int signal, siginfo_t *siginfo, void *sigcontext ) +@@ -2814,6 +2859,18 @@ static void int_handler( int signal, siginfo_t *siginfo, void *sigcontext ) */ static void abrt_handler( int signal, siginfo_t *siginfo, void *sigcontext ) { @@ -5517,7 +5434,7 @@ index 957f796444b..063892046e1 100644 EXCEPTION_RECORD rec = { EXCEPTION_WINE_ASSERTION, EH_NONCONTINUABLE }; setup_exception( sigcontext, &rec ); -@@ -2807,7 +2864,7 @@ static void quit_handler( int signal, siginfo_t *siginfo, void *ucontext ) +@@ -2840,7 +2897,7 @@ static void quit_handler( int signal, siginfo_t *siginfo, void *ucontext ) static void usr1_handler( int signal, siginfo_t *siginfo, void *ucontext ) { struct xcontext context; @@ -5526,7 +5443,7 @@ index 957f796444b..063892046e1 100644 if (is_inside_syscall( ucontext )) { DECLSPEC_ALIGN(64) XSTATE xs; -@@ -2824,6 +2881,7 @@ static void usr1_handler( int signal, siginfo_t *siginfo, void *ucontext ) +@@ -2857,6 +2914,7 @@ static void usr1_handler( int signal, siginfo_t *siginfo, void *ucontext ) wait_suspend( &context.c ); restore_context( &context, ucontext ); } @@ -5535,7 +5452,7 @@ index 957f796444b..063892046e1 100644 diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c -index 5873a3e2335..ca6bb6caceb 100644 +index 94b300c..3182a73 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -22,6 +22,12 @@ @@ -5551,7 +5468,7 @@ index 5873a3e2335..ca6bb6caceb 100644 #include "config.h" #include -@@ -3164,6 +3170,7 @@ NTSTATUS virtual_alloc_thread_stack( INITIAL_TEB *stack, ULONG_PTR zero_bits, SI +@@ -3106,6 +3112,7 @@ NTSTATUS virtual_alloc_thread_stack( INITIAL_TEB *stack, ULONG_PTR zero_bits, SI if (!reserve_size) reserve_size = main_image_info.MaximumStackSize; if (!commit_size) commit_size = main_image_info.CommittedStackSize; @@ -5560,7 +5477,7 @@ index 5873a3e2335..ca6bb6caceb 100644 size = max( reserve_size, commit_size ); if (size < 1024 * 1024) size = 1024 * 1024; /* Xlib needs a large stack */ diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c -index c6eab6f5cfa..9086a9db8cb 100644 +index c6eab6f..9086a9d 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c @@ -2132,7 +2132,7 @@ INT CDECL X11DRV_GetKeyNameText(LONG lParam, LPWSTR lpBuffer, INT nSize) @@ -5582,10 +5499,10 @@ index c6eab6f5cfa..9086a9db8cb 100644 LeaveCriticalSection( &kbd_section ); diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c -index e5592184337..d1b1cd362c0 100644 +index 32beb84..a7be7f9 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c -@@ -624,10 +624,11 @@ static BOOL process_attach(void) +@@ -620,10 +620,11 @@ static BOOL process_attach(void) X11DRV_XComposite_Init(); #endif X11DRV_XInput2_Init(); @@ -5599,10 +5516,10 @@ index e5592184337..d1b1cd362c0 100644 if (use_xim) use_xim = X11DRV_InitXIM( input_style ); diff --git a/dlls/ws2_32/unixlib.c b/dlls/ws2_32/unixlib.c -index 4b9274bf867..d46ac996968 100644 +index 015850f..d1b321b 100644 --- a/dlls/ws2_32/unixlib.c +++ b/dlls/ws2_32/unixlib.c -@@ -90,6 +90,7 @@ +@@ -86,6 +86,7 @@ # include # define HAS_IRDA #endif @@ -5611,7 +5528,7 @@ index 4b9274bf867..d46ac996968 100644 #include "ntstatus.h" #define WIN32_NO_STATUS diff --git a/programs/winedbg/winedbg.c b/programs/winedbg/winedbg.c -index 659ca364544..3a503dccaf3 100644 +index dab5fbd..ae26bc0 100644 --- a/programs/winedbg/winedbg.c +++ b/programs/winedbg/winedbg.c @@ -621,6 +621,8 @@ static void restart_if_wow64(void) @@ -5624,7 +5541,7 @@ index 659ca364544..3a503dccaf3 100644 HANDLE hFile = INVALID_HANDLE_VALUE; enum dbg_start ds; diff --git a/server/fd.c b/server/fd.c -index 1a0840f4113..3b47269aef7 100644 +index 1ec8c06..d135fb7 100644 --- a/server/fd.c +++ b/server/fd.c @@ -1001,6 +1001,7 @@ void main_loop(void) @@ -5636,7 +5553,7 @@ index 1a0840f4113..3b47269aef7 100644 set_current_time(); diff --git a/server/signal.c b/server/signal.c -index 05dafe154f5..c620d7c2af3 100644 +index 05dafe1..c620d7c 100644 --- a/server/signal.c +++ b/server/signal.c @@ -259,6 +259,7 @@ int watchdog_triggered(void) @@ -5657,10 +5574,10 @@ index 05dafe154f5..c620d7c2af3 100644 void init_signals(void) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c -index e8457e46643..0626329837b 100644 +index 8644afe..d67bed3 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c -@@ -1341,6 +1341,9 @@ static void build(struct options* opts) +@@ -1349,6 +1349,9 @@ static void build(struct options* opts) { strarray_add(&link_args, "-lm"); strarray_add(&link_args, "-lc"); @@ -5674,17 +5591,14 @@ index e8457e46643..0626329837b 100644 2.30.2 -From e63186126bd1bc120ae6f919f29dd5d68a9e17c9 Mon Sep 17 00:00:00 2001 +From c49eff8598c184abc71f7deb8f4d344852684139 Mon Sep 17 00:00:00 2001 From: X512 Date: Tue, 25 Jan 2022 22:12:25 +0900 Subject: ntdll: register PE modules for Haiku ---- - dlls/ntdll/unix/virtual.c | 51 +++++++++++++++++++++++++++++++++++++-- - 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c -index ca6bb6caceb..86778e158d3 100644 +index 3182a73..a738893 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -22,14 +22,19 @@ @@ -5709,7 +5623,7 @@ index ca6bb6caceb..86778e158d3 100644 #include #include #include -@@ -625,6 +630,47 @@ void release_builtin_module( void *module ) +@@ -616,6 +621,47 @@ void release_builtin_module( void *module ) } @@ -5757,7 +5671,7 @@ index ca6bb6caceb..86778e158d3 100644 /*********************************************************************** * get_builtin_so_handle */ -@@ -2537,6 +2583,7 @@ static NTSTATUS virtual_map_image( HANDLE mapping, ACCESS_MASK access, void **ad +@@ -2479,6 +2525,7 @@ static NTSTATUS virtual_map_image( HANDLE mapping, ACCESS_MASK access, void **ad if (status >= 0) { if (is_builtin) add_builtin_module( view->base, NULL ); @@ -5769,17 +5683,14 @@ index ca6bb6caceb..86778e158d3 100644 2.30.2 -From 8300eac14bc52a462a1e03173590168801e6d8e7 Mon Sep 17 00:00:00 2001 +From 6e142ac504ee25309d598f318bb8d22ee7e7e8b0 Mon Sep 17 00:00:00 2001 From: X512 Date: Tue, 25 Jan 2022 22:13:57 +0900 Subject: winehaiku.drv: update ---- - dlls/winehaiku.drv/window.cpp | 38 +++++++++++++++++++++++++++-------- - 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/dlls/winehaiku.drv/window.cpp b/dlls/winehaiku.drv/window.cpp -index 18dcba70c69..41331e31c24 100644 +index 18dcba7..41331e3 100644 --- a/dlls/winehaiku.drv/window.cpp +++ b/dlls/winehaiku.drv/window.cpp @@ -536,6 +536,16 @@ WineWindow* HaikuThisWindow(HWND hwnd, bool create) @@ -5888,3 +5799,347 @@ index 18dcba70c69..41331e31c24 100644 -- 2.30.2 + +From 0663973114c8aff83b4399fa5f58aff92362c015 Mon Sep 17 00:00:00 2001 +From: X512 +Date: Thu, 3 Feb 2022 20:46:17 +0900 +Subject: ntdll: update for Haiku + + +diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c +index 39648d8..e06fe37 100644 +--- a/dlls/ntdll/unix/socket.c ++++ b/dlls/ntdll/unix/socket.c +@@ -586,10 +586,11 @@ static NTSTATUS try_recv( int fd, struct async_recv_ioctl *async, ULONG_PTR *siz + } + hdr.msg_iov = async->iov; + hdr.msg_iovlen = async->count; +-#ifndef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS ++#if 0 //ndef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS + hdr.msg_control = control_buffer; + hdr.msg_controllen = sizeof(control_buffer); + #endif ++ TRACE("async->unix_flags: %#x\n", async->unix_flags); + while ((ret = virtual_locked_recvmsg( fd, &hdr, async->unix_flags )) < 0 && errno == EINTR); + + if (ret < 0) +@@ -599,6 +600,7 @@ static NTSTATUS try_recv( int fd, struct async_recv_ioctl *async, ULONG_PTR *siz + if ((async->unix_flags & MSG_OOB) && errno == EINVAL) + errno = EWOULDBLOCK; + ++ // warn:winsock:try_recv recvmsg: Operation not supported + if (errno != EWOULDBLOCK) WARN( "recvmsg: %s\n", strerror( errno ) ); + return sock_errno_to_status( errno ); + } +diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c +index 618ebb8..1b087a6 100644 +--- a/dlls/ntdll/unix/thread.c ++++ b/dlls/ntdll/unix/thread.c +@@ -24,6 +24,14 @@ + + #include "config.h" + ++#ifdef __HAIKU__ ++#define cpu_info haiku_cpu_info ++#define exit_thread haiku_exit_thread ++#include ++#undef cpu_info ++#undef exit_thread ++#endif ++ + #include + #include + #include +@@ -1821,6 +1829,13 @@ BOOL get_thread_times(int unix_pid, int unix_tid, LARGE_INTEGER *kernel_time, LA + } + procstat_close(pstat); + return ret; ++#elif defined(__HAIKU__) ++ thread_info info; ++ if (get_thread_info(unix_tid, &info) < B_OK) ++ return FALSE; ++ kernel_time->QuadPart = 10 * info.kernel_time; ++ user_time->QuadPart = 10 * info.user_time; ++ return TRUE; + #else + static int once; + if (!once++) FIXME("not implemented on this platform\n"); +-- +2.30.2 + + +From d70ba4d19e98a08dcc3bdcc797f832bacc824bbd Mon Sep 17 00:00:00 2001 +From: X512 +Date: Thu, 3 Feb 2022 20:47:05 +0900 +Subject: winehaiku.drv: update + +it message for your changes. Lines starting + +diff --git a/dlls/winehaiku.drv/vulkan.cpp b/dlls/winehaiku.drv/vulkan.cpp +index 59bf952..1a60c4f 100644 +--- a/dlls/winehaiku.drv/vulkan.cpp ++++ b/dlls/winehaiku.drv/vulkan.cpp +@@ -421,10 +421,10 @@ VkResult VKWineSurface::GetCapabilities(VkPhysicalDevice physDev, VkSurfaceCapab + + VkResult VKWineSurface::GetFormats(VkPhysicalDevice physDev, uint32_t *count, VkSurfaceFormatKHR *surfaceFormats) + { +-/* ++#if 0 + VkFormat formats[] = {VK_FORMAT_B8G8R8A8_UNORM}; + uint32_t formatCnt = 1; +-*/ ++#else + constexpr int max_core_1_0_formats = VK_FORMAT_ASTC_12x12_SRGB_BLOCK + 1; + VkFormat formats[max_core_1_0_formats]; + uint32_t formatCnt = 0; +@@ -440,6 +440,7 @@ VkResult VKWineSurface::GetFormats(VkPhysicalDevice physDev, uint32_t *count, Vk + formats[formatCnt++] = (VkFormat)format; + } + } ++#endif + + if (surfaceFormats == NULL) { + *count = formatCnt; +@@ -537,7 +538,7 @@ VkResult VKWineSwapchain::CreateBuffer() + VkImageCreateInfo createInfo{ + .sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, + .imageType = VK_IMAGE_TYPE_2D, +- .format = VK_FORMAT_R8G8B8A8_UNORM, ++ .format = VK_FORMAT_B8G8R8A8_UNORM, + .extent = { + .width = fImageExtent.width, + .height = fImageExtent.height, +@@ -586,6 +587,7 @@ VkResult VKWineSwapchain::CopyToBuffer(VkImage srcImage, int32_t width, int32_t + + // srcImage is already in VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, and does not need to be transitioned + ++#if 0 + VkImageCopy imageCopyRegion{}; + imageCopyRegion.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + imageCopyRegion.srcSubresource.layerCount = 1; +@@ -602,6 +604,29 @@ VkResult VKWineSwapchain::CopyToBuffer(VkImage srcImage, int32_t width, int32_t + 1, + &imageCopyRegion + ); ++#endif ++ // Define the region to blit (we will blit the whole swapchain image) ++ VkOffset3D blitSize; ++ blitSize.x = width; ++ blitSize.y = height; ++ blitSize.z = 1; ++ VkImageBlit imageBlitRegion{}; ++ imageBlitRegion.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; ++ imageBlitRegion.srcSubresource.layerCount = 1; ++ imageBlitRegion.srcOffsets[1] = blitSize; ++ imageBlitRegion.dstSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; ++ imageBlitRegion.dstSubresource.layerCount = 1; ++ imageBlitRegion.dstOffsets[1] = blitSize; ++ ++ // Issue the blit command ++ vkCmdBlitImage( ++ copyCmd, ++ srcImage, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, ++ fBuffer->ToHandle(), VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, ++ 1, ++ &imageBlitRegion, ++ VK_FILTER_NEAREST ++ ); + + // Transition destination image to general layout, which is the required layout for mapping the image memory later on + insertImageMemoryBarrier( +-- +2.30.2 + + +From a7b574bedf199b88f1620a311ce01f07d6a9dee5 Mon Sep 17 00:00:00 2001 +From: X512 +Date: Thu, 3 Feb 2022 22:05:52 +0900 +Subject: winehaiku.drv: fix Vulkan for Wine 7.1 + + +diff --git a/dlls/winehaiku.drv/haikudrv.h b/dlls/winehaiku.drv/haikudrv.h +index 65ffb41..5ba3339 100644 +--- a/dlls/winehaiku.drv/haikudrv.h ++++ b/dlls/winehaiku.drv/haikudrv.h +@@ -63,7 +63,7 @@ extern BOOL CDECL HAIKUDRV_CreateDC(PHYSDEV *pdev, LPCWSTR device, LPCWSTR outpu + extern BOOL CDECL HAIKUDRV_CreateCompatibleDC(PHYSDEV orig, PHYSDEV *pdev); + extern BOOL CDECL HAIKUDRV_DeleteDC(PHYSDEV dev); + extern INT CDECL HAIKUDRV_GetDeviceCaps(PHYSDEV dev, INT cap); +-extern const struct vulkan_funcs *CDECL HAIKUDRV_wine_get_vulkan_driver(PHYSDEV dev, UINT version); ++extern const struct vulkan_funcs *CDECL HAIKUDRV_wine_get_vulkan_driver(UINT version); + + extern BOOL CDECL HAIKUDRV_ActivateKeyboardLayout( HKL hkl, UINT flags ) DECLSPEC_HIDDEN; + extern void CDECL HAIKUDRV_Beep(void) DECLSPEC_HIDDEN; +diff --git a/dlls/winehaiku.drv/init.c b/dlls/winehaiku.drv/init.c +index a0a279b..7f3dffc 100644 +--- a/dlls/winehaiku.drv/init.c ++++ b/dlls/winehaiku.drv/init.c +@@ -37,7 +37,6 @@ const struct user_driver_funcs haikudrv_funcs = + // GDI_HOOK(GetDeviceGammaRamp), + // GDI_HOOK(SetDeviceGammaRamp), + // GDI_WINE_HOOK(wine_get_wgl_driver), +- GDI_WINE_HOOK(wine_get_vulkan_driver), + .dc_funcs.priority = GDI_PRIORITY_GRAPHICS_DRV, + + /* keyboard functions */ +@@ -90,6 +89,8 @@ const struct user_driver_funcs haikudrv_funcs = + /* system parameters */ + USER_HOOK(SystemParametersInfo), + ++ USER_HOOK(wine_get_vulkan_driver), ++ + /* thread management */ + USER_HOOK(ThreadDetach), + }; +diff --git a/dlls/winehaiku.drv/vulkan.cpp b/dlls/winehaiku.drv/vulkan.cpp +index 1a60c4f..042a3a2 100644 +--- a/dlls/winehaiku.drv/vulkan.cpp ++++ b/dlls/winehaiku.drv/vulkan.cpp +@@ -1139,7 +1139,7 @@ static void *haikudrv_get_vk_instance_proc_addr(VkInstance instance, const char + } + + +-static const struct vulkan_funcs *get_vulkan_driver(UINT version) ++const struct vulkan_funcs *HAIKUDRV_wine_get_vulkan_driver(UINT version) + { + TRACE("()\n"); + if (version != WINE_VULKAN_DRIVER_VERSION) +@@ -1150,17 +1150,3 @@ static const struct vulkan_funcs *get_vulkan_driver(UINT version) + + return &vulkan_funcs; + } +- +- +-const struct vulkan_funcs *CDECL HAIKUDRV_wine_get_vulkan_driver(PHYSDEV dev, UINT version) +-{ +- TRACE("()\n"); +- const struct vulkan_funcs *ret; +- +- if (!(ret = get_vulkan_driver( version ))) +- { +- dev = GET_NEXT_PHYSDEV( dev, wine_get_vulkan_driver ); +- ret = dev->funcs->wine_get_vulkan_driver( dev, version ); +- } +- return ret; +-} +-- +2.30.2 + + +From b3f6106f4c78c4921483cfbd5e4978638c5ad27e Mon Sep 17 00:00:00 2001 +From: X512 +Date: Sat, 5 Feb 2022 11:49:48 +0900 +Subject: crypt32: fix certificate path for Haiku + + +diff --git a/dlls/crypt32/unixlib.c b/dlls/crypt32/unixlib.c +index a345b5e..f347abf 100644 +--- a/dlls/crypt32/unixlib.c ++++ b/dlls/crypt32/unixlib.c +@@ -612,6 +612,9 @@ static void import_certs_from_path(LPCSTR path, BOOL allow_dir) + } + + static const char * const CRYPT_knownLocations[] = { ++#ifdef __HAIKU__ ++ "/boot/system/data/ssl/CARootCertificates.pem", ++#else + "/etc/ssl/certs/ca-certificates.crt", + "/etc/ssl/certs", + "/etc/pki/tls/certs/ca-bundle.crt", +@@ -619,6 +622,7 @@ static const char * const CRYPT_knownLocations[] = { + "/usr/local/share/certs/", + "/etc/sfw/openssl/certs", + "/etc/security/cacerts", /* Android */ ++#endif + }; + + static void load_root_certs(void) +-- +2.30.2 + + +From f3a73643e1a7a3be8c6f037a9576a5c37a58f1d8 Mon Sep 17 00:00:00 2001 +From: X512 +Date: Thu, 10 Mar 2022 00:00:28 +0900 +Subject: update + + +diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c +index 9f49b9e..7c72be2 100644 +--- a/dlls/ntdll/unix/system.c ++++ b/dlls/ntdll/unix/system.c +@@ -24,6 +24,12 @@ + + #include "config.h" + ++#ifdef __HAIKU__ ++#define cpu_info haiku_cpu_info ++#include ++#undef cpu_info ++#endif ++ + #include + #include + #include +@@ -2008,6 +2014,17 @@ static void get_performance_info( SYSTEM_PERFORMANCE_INFORMATION *info ) + #endif + } + #endif ++ ++#ifdef __HAIKU__ ++ system_info sysInfo; ++ if (get_system_info(&sysInfo) >= B_OK) { ++ totalram = sysInfo.max_pages * B_PAGE_SIZE; ++ freeram = sysInfo.free_memory; ++ totalswap = sysInfo.max_swap_pages * B_PAGE_SIZE; ++ freeswap = sysInfo.free_swap_pages * B_PAGE_SIZE; ++ } ++#endif ++ + info->AvailablePages = freeram / page_size; + info->TotalCommittedPages = (totalram + totalswap - freeram - freeswap) / page_size; + info->TotalCommitLimit = (totalram + totalswap) / page_size; +-- +2.30.2 + + +From 7a6b7e62f8a8972d1719f658c6c5fc87f864d5b5 Mon Sep 17 00:00:00 2001 +From: X512 +Date: Thu, 10 Mar 2022 00:01:35 +0900 +Subject: ntdll/unix/signal_x86_64: update for set GS base syscall change + + +diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c +index 51477df..7d2e184 100644 +--- a/dlls/ntdll/unix/signal_x86_64.c ++++ b/dlls/ntdll/unix/signal_x86_64.c +@@ -66,9 +66,17 @@ + #endif + #ifdef __HAIKU__ + # include ++#if 0 ++# include ++# include ++#else ++#define THREAD_SYSCALLS "thread" ++#define THREAD_SET_GS_BASE 1 ++ + extern status_t _kern_generic_syscall(const char *subsystem, uint32 function, + void *buffer, size_t bufferSize); + #endif ++#endif + + #define NONAMELESSUNION + #define NONAMELESSSTRUCT +@@ -3046,7 +3054,7 @@ void signal_init_thread( TEB *teb ) + TEB so alloc_tls_slot() can find it. */ + teb->Reserved5[0] = amd64_thread_data()->pthread_teb; + #elif defined (__HAIKU__) +- _kern_generic_syscall("thread", /*THREAD_SET_GS_BASE*/ 1, teb, 0); ++ _kern_generic_syscall(THREAD_SYSCALLS, THREAD_SET_GS_BASE, &teb, sizeof(teb)); + #else + # error Please define setting %gs for your architecture + #endif +-- +2.30.2 + diff --git a/app-emulation/wine/wine-6.23.recipe b/app-emulation/wine/wine-7.1.recipe similarity index 92% rename from app-emulation/wine/wine-6.23.recipe rename to app-emulation/wine/wine-7.1.recipe index 73555883a..d52956cde 100644 --- a/app-emulation/wine/wine-6.23.recipe +++ b/app-emulation/wine/wine-7.1.recipe @@ -10,12 +10,11 @@ COPYRIGHT="1993-2021 the Wine project authors" LICENSE="GNU LGPL v2.1" REVISION="1" SOURCE_URI="https://github.com/wine-mirror/wine/archive/refs/tags/wine-${portVersion}.tar.gz" -CHECKSUM_SHA256="a377546970b780d1d184d7a9dc45cc3c4373541de2861c8fb354008ff965f79a" +CHECKSUM_SHA256="754a7e1f9bd79e18e01f9f552abe83413140403f68cc37b8ef98b80d271450c8" SOURCE_DIR="wine-wine-${portVersion}" PATCHES="wine-$portVersion.patchset" -# disabled: pending Haiku changes -ARCHITECTURES="?all !x86_gcc2" +ARCHITECTURES="all !x86_gcc2" SECONDARY_ARCHITECTURES="!x86" PROVIDES="