winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2020
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
947 discussions
Start a n
N
ew thread
Daniel Lehman : server: Fail if non-empty directory marked for deletion.
by Alexandre Julliard
09 Jun '20
09 Jun '20
Module: wine Branch: master Commit: a302ab44acaf72ecc9b0307c82a7d11f759e6a72 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a302ab44acaf72ecc9b0307c…
Author: Daniel Lehman <dlehman25(a)gmail.com> Date: Thu May 28 20:28:09 2020 -0700 server: Fail if non-empty directory marked for deletion. Signed-off-by: Daniel Lehman <dlehman25(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/file.c | 3 -- server/fd.c | 74 +++++++++++++++++++++++++++++++++++++------------ 2 files changed, 57 insertions(+), 20 deletions(-) diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index 31c18454f0..1d0682a633 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -3185,17 +3185,14 @@ todo_wine CloseHandle( handle2 ); fdi.DoDeleteFile = TRUE; res = pNtSetInformationFile( handle, &io, &fdi, sizeof fdi, FileDispositionInformation ); - todo_wine ok( res == STATUS_DIRECTORY_NOT_EMPTY, "unexpected FileDispositionInformation result (expected STATUS_DIRECTORY_NOT_EMPTY, got %x)\n", res ); fileDeleted = DeleteFileA( buffer ); ok( fileDeleted, "File should have been deleted\n" ); buffer[dirpos] = '\0'; CloseHandle( handle ); fileDeleted = GetFileAttributesA( buffer ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND; - todo_wine ok( !fileDeleted, "Directory shouldn't have been deleted\n" ); fileDeleted = RemoveDirectoryA( buffer ); -todo_wine ok( fileDeleted, "Directory should have been deleted\n" ); } diff --git a/server/fd.c b/server/fd.c index 06d1d81bdb..7ea8ac273e 100644 --- a/server/fd.c +++ b/server/fd.c @@ -23,6 +23,7 @@ #include "wine/port.h" #include <assert.h> +#include <dirent.h> #include <errno.h> #include <fcntl.h> #include <limits.h> @@ -2364,6 +2365,31 @@ static struct fd *get_handle_fd_obj( struct process *process, obj_handle_t handl return fd; } +static int is_dir_empty( int fd ) +{ + DIR *dir; + int empty; + struct dirent *de; + + if ((fd = dup( fd )) == -1) + return -1; + + if (!(dir = fdopendir( fd ))) + { + close( fd ); + return -1; + } + + empty = 1; + while (empty && (de = readdir( dir ))) + { + if (!strcmp( de->d_name, "." ) || !strcmp( de->d_name, ".." )) continue; + empty = 0; + } + closedir( dir ); + return empty; +} + /* set disposition for the fd */ static void set_fd_disposition( struct fd *fd, int unlink ) { @@ -2381,24 +2407,38 @@ static void set_fd_disposition( struct fd *fd, int unlink ) return; } - if (fstat( fd->unix_fd, &st ) == -1) + if (unlink) { - file_set_error(); - return; - } - - /* can't unlink special files */ - if (unlink && !S_ISDIR(st.st_mode) && !S_ISREG(st.st_mode)) - { - set_error( STATUS_INVALID_PARAMETER ); - return; - } - - /* can't unlink files we don't have permission to write */ - if (unlink && !(st.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)) && !S_ISDIR(st.st_mode)) - { - set_error( STATUS_CANNOT_DELETE ); - return; + if (fstat( fd->unix_fd, &st ) == -1) + { + file_set_error(); + return; + } + if (S_ISREG( st.st_mode )) /* can't unlink files we don't have permission to write */ + { + if (!(st.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH))) + { + set_error( STATUS_CANNOT_DELETE ); + return; + } + } + else if (S_ISDIR( st.st_mode )) /* can't remove non-empty directories */ + { + switch (is_dir_empty( fd->unix_fd )) + { + case -1: + file_set_error(); + return; + case 0: + set_error( STATUS_DIRECTORY_NOT_EMPTY ); + return; + } + } + else /* can't unlink special files */ + { + set_error( STATUS_INVALID_PARAMETER ); + return; + } } fd->closed->unlink = unlink ? 1 : 0;
1
0
0
0
Rémi Bernon : dinput: Use dedicated list for mouse and keyboard.
by Alexandre Julliard
09 Jun '20
09 Jun '20
Module: wine Branch: master Commit: 306c40e67319cae8e4c448ec8fc8d3996f87943f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=306c40e67319cae8e4c448ec…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Jun 8 09:47:09 2020 +0200 dinput: Use dedicated list for mouse and keyboard. Instead of using function pointer, which is also not very CPU friendly. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/device_private.h | 1 - dlls/dinput/dinput_main.c | 54 ++++++++++++++++++++++++++++---------------- dlls/dinput/dinput_private.h | 3 ++- dlls/dinput/keyboard.c | 3 +-- dlls/dinput/mouse.c | 5 +--- 5 files changed, 38 insertions(+), 28 deletions(-) diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h index 5879409c1d..fe5644f21c 100644 --- a/dlls/dinput/device_private.h +++ b/dlls/dinput/device_private.h @@ -68,7 +68,6 @@ struct IDirectInputDeviceImpl DWORD dwCoopLevel; HWND win; int acquired; - DI_EVENT_PROC event_proc; /* function to receive mouse & keyboard events */ LPDIDEVICEOBJECTDATA data_queue; /* buffer for 'GetDeviceData'. */ int queue_len; /* valid size of the queue */ diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 4986e5857b..2e56150240 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -100,6 +100,8 @@ HINSTANCE DINPUT_instance; static BOOL check_hook_thread(void); static CRITICAL_SECTION dinput_hook_crit; static struct list direct_input_list = LIST_INIT( direct_input_list ); +static struct list acquired_mouse_list = LIST_INIT( acquired_mouse_list ); +static struct list acquired_keyboard_list = LIST_INIT( acquired_keyboard_list ); static struct list acquired_device_list = LIST_INIT( acquired_device_list ); static HRESULT initialize_directinput_instance(IDirectInputImpl *This, DWORD dwVersion); @@ -110,7 +112,12 @@ void dinput_hooks_acquire_device(LPDIRECTINPUTDEVICE8W iface) IDirectInputDeviceImpl *dev = impl_from_IDirectInputDevice8W(iface); EnterCriticalSection( &dinput_hook_crit ); - list_add_tail( &acquired_device_list, &dev->entry ); + if (IsEqualGUID( &dev->guid, &GUID_SysMouse )) + list_add_tail( &acquired_mouse_list, &dev->entry ); + else if (IsEqualGUID( &dev->guid, &GUID_SysKeyboard )) + list_add_tail( &acquired_keyboard_list, &dev->entry ); + else + list_add_tail( &acquired_device_list, &dev->entry ); LeaveCriticalSection( &dinput_hook_crit ); } @@ -1659,13 +1666,15 @@ static LRESULT CALLBACK LL_hook_proc( int code, WPARAM wparam, LPARAM lparam ) if (code != HC_ACTION) return CallNextHookEx( 0, code, wparam, lparam ); EnterCriticalSection( &dinput_hook_crit ); - LIST_FOR_EACH_ENTRY( dev, &acquired_device_list, IDirectInputDeviceImpl, entry ) + LIST_FOR_EACH_ENTRY( dev, &acquired_mouse_list, IDirectInputDeviceImpl, entry ) { - if (dev->event_proc) - { - TRACE("calling %p->%p (%lx %lx)\n", dev, dev->event_proc, wparam, lparam); - skip |= dev->event_proc( &dev->IDirectInputDevice8A_iface, wparam, lparam ); - } + TRACE("calling dinput_mouse_hook (%p %lx %lx)\n", dev, wparam, lparam); + skip |= dinput_mouse_hook( &dev->IDirectInputDevice8A_iface, wparam, lparam ); + } + LIST_FOR_EACH_ENTRY( dev, &acquired_keyboard_list, IDirectInputDeviceImpl, entry ) + { + TRACE("calling dinput_keyboard_hook (%p %lx %lx)\n", dev, wparam, lparam); + skip |= dinput_keyboard_hook( &dev->IDirectInputDevice8A_iface, wparam, lparam ); } LeaveCriticalSection( &dinput_hook_crit ); @@ -1693,6 +1702,22 @@ static LRESULT CALLBACK callwndproc_proc( int code, WPARAM wparam, LPARAM lparam IDirectInputDevice_Unacquire( &dev->IDirectInputDevice8A_iface ); } } + LIST_FOR_EACH_ENTRY_SAFE( dev, next, &acquired_mouse_list, IDirectInputDeviceImpl, entry ) + { + if (msg->hwnd == dev->win && msg->hwnd != foreground) + { + TRACE( "%p window is not foreground - unacquiring %p\n", dev->win, dev ); + IDirectInputDevice_Unacquire( &dev->IDirectInputDevice8A_iface ); + } + } + LIST_FOR_EACH_ENTRY_SAFE( dev, next, &acquired_keyboard_list, IDirectInputDeviceImpl, entry ) + { + if (msg->hwnd == dev->win && msg->hwnd != foreground) + { + TRACE( "%p window is not foreground - unacquiring %p\n", dev->win, dev ); + IDirectInputDevice_Unacquire( &dev->IDirectInputDevice8A_iface ); + } + } LeaveCriticalSection( &dinput_hook_crit ); return CallNextHookEx( 0, code, wparam, lparam ); @@ -1713,7 +1738,6 @@ static DWORD WINAPI hook_thread_proc(void *param) if (msg.message == WM_USER+0x10) { - IDirectInputDeviceImpl *dev; HANDLE finished_event = (HANDLE)msg.lParam; TRACE( "Processing hook change notification wp:%ld lp:%#lx\n", msg.wParam, msg.lParam ); @@ -1727,18 +1751,8 @@ static DWORD WINAPI hook_thread_proc(void *param) } EnterCriticalSection( &dinput_hook_crit ); - - /* Count acquired keyboards and mice*/ - LIST_FOR_EACH_ENTRY( dev, &acquired_device_list, IDirectInputDeviceImpl, entry ) - { - if (!dev->event_proc) continue; - - if (IsEqualGUID( &dev->guid, &GUID_SysKeyboard )) - kbd_cnt++; - else - if (IsEqualGUID( &dev->guid, &GUID_SysMouse )) - mice_cnt++; - } + kbd_cnt = list_count( &acquired_keyboard_list ); + mice_cnt = list_count( &acquired_mouse_list ); LeaveCriticalSection( &dinput_hook_crit ); if (kbd_cnt && !kbd_hook) diff --git a/dlls/dinput/dinput_private.h b/dlls/dinput/dinput_private.h index 121c487c2d..06a439d6a4 100644 --- a/dlls/dinput/dinput_private.h +++ b/dlls/dinput/dinput_private.h @@ -71,10 +71,11 @@ extern const struct dinput_device joystick_osx_device DECLSPEC_HIDDEN; extern void dinput_hooks_acquire_device(LPDIRECTINPUTDEVICE8W iface); extern void dinput_hooks_unacquire_device(LPDIRECTINPUTDEVICE8W iface); +extern int dinput_mouse_hook(LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM lparam); +extern int dinput_keyboard_hook(LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM lparam); extern void check_dinput_hooks(LPDIRECTINPUTDEVICE8W, BOOL) DECLSPEC_HIDDEN; extern void check_dinput_events(void) DECLSPEC_HIDDEN; -typedef int (*DI_EVENT_PROC)(LPDIRECTINPUTDEVICE8A, WPARAM, LPARAM); extern void _copy_diactionformatAtoW(LPDIACTIONFORMATW, LPDIACTIONFORMATA) DECLSPEC_HIDDEN; extern void _copy_diactionformatWtoA(LPDIACTIONFORMATA, LPDIACTIONFORMATW) DECLSPEC_HIDDEN; diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c index 6675a79f84..9981372d95 100644 --- a/dlls/dinput/keyboard.c +++ b/dlls/dinput/keyboard.c @@ -103,7 +103,7 @@ static BYTE map_dik_code(DWORD scanCode, DWORD vkCode, DWORD subType, DWORD vers return scanCode; } -static int KeyboardCallback( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM lparam ) +int dinput_keyboard_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM lparam ) { SysKeyboardImpl *This = impl_from_IDirectInputDevice8A(iface); int dik_code, ret = This->base.dwCoopLevel & DISCL_EXCLUSIVE; @@ -264,7 +264,6 @@ static SysKeyboardImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput) newDevice->base.ref = 1; memcpy(&newDevice->base.guid, rguid, sizeof(*rguid)); newDevice->base.dinput = dinput; - newDevice->base.event_proc = KeyboardCallback; InitializeCriticalSection(&newDevice->base.crit); newDevice->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SysKeyboardImpl*->base.crit"); newDevice->subtype = get_keyboard_subtype(); diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c index abf6fb9599..5e6f34f0ec 100644 --- a/dlls/dinput/mouse.c +++ b/dlls/dinput/mouse.c @@ -92,8 +92,6 @@ static inline IDirectInputDevice8W *IDirectInputDevice8W_from_impl(SysMouseImpl return &This->base.IDirectInputDevice8W_iface; } -static int dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM lparam ); - static void _dump_mouse_state(const DIMOUSESTATE2 *m_state) { int i; @@ -213,7 +211,6 @@ static SysMouseImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput) InitializeCriticalSection(&newDevice->base.crit); newDevice->base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SysMouseImpl*->base.crit"); newDevice->base.dinput = dinput; - newDevice->base.event_proc = dinput_mouse_hook; get_app_key(&hkey, &appkey); if (!get_config_key(hkey, appkey, "MouseWarpOverride", buffer, sizeof(buffer))) @@ -310,7 +307,7 @@ const struct dinput_device mouse_device = { */ /* low-level mouse hook */ -static int dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM lparam ) +int dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM lparam ) { MSLLHOOKSTRUCT *hook = (MSLLHOOKSTRUCT *)lparam; SysMouseImpl* This = impl_from_IDirectInputDevice8A(iface);
1
0
0
0
Rémi Bernon : dinput: Use a single list for all acquired devices.
by Alexandre Julliard
09 Jun '20
09 Jun '20
Module: wine Branch: master Commit: 26c1131201f8fd9918a01231a7eb6f1989400858 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=26c1131201f8fd9918a01231…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Jun 8 09:47:08 2020 +0200 dinput: Use a single list for all acquired devices. Instead of going through devices list of dinputs list, and checking their acquired field, which is not CPU friendly. This also removes the now unused IDirectInputImpl critical section and devices list. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/device.c | 16 +++---- dlls/dinput/device_private.h | 2 +- dlls/dinput/dinput_main.c | 88 +++++++++++++++++---------------------- dlls/dinput/dinput_private.h | 5 ++- dlls/dinput/joystick_linux.c | 4 -- dlls/dinput/joystick_linuxinput.c | 4 -- dlls/dinput/joystick_osx.c | 4 -- dlls/dinput/keyboard.c | 4 -- dlls/dinput/mouse.c | 4 -- 9 files changed, 51 insertions(+), 80 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=26c1131201f8fd9918a0…
1
0
0
0
Rémi Bernon : dinput: Stop sending WM_WINE_NOTIFY_ACTIVITY on every input.
by Alexandre Julliard
09 Jun '20
09 Jun '20
Module: wine Branch: master Commit: 9463684d550a05289c1a6d1e9a603fa28c7bccad URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9463684d550a05289c1a6d1e…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Jun 8 09:47:07 2020 +0200 dinput: Stop sending WM_WINE_NOTIFY_ACTIVITY on every input. This message triggers screensaver notification in the user drivers, but it is not useful to send it on every input message, and it even hurts performance when high polling mouse is used. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=33643
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46976
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/device.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 8c5aa31883..51ae349f34 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -931,13 +931,19 @@ HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, L void queue_event(LPDIRECTINPUTDEVICE8A iface, int inst_id, DWORD data, DWORD time, DWORD seq) { + static ULONGLONG notify_ms = 0; IDirectInputDeviceImpl *This = impl_from_IDirectInputDevice8A(iface); int next_pos, ofs = id_to_offset(&This->data_format, inst_id); + ULONGLONG time_ms = GetTickCount64(); /* Event is being set regardless of the queue state */ if (This->hEvent) SetEvent(This->hEvent); - PostMessageW(GetDesktopWindow(), WM_WINE_NOTIFY_ACTIVITY, 0, 0); + if (time_ms - notify_ms > 1000) + { + PostMessageW(GetDesktopWindow(), WM_WINE_NOTIFY_ACTIVITY, 0, 0); + notify_ms = time_ms; + } if (!This->queue_len || This->overflow || ofs < 0) return;
1
0
0
0
Jacek Caban : ntdll: Export builtin functions as cdecl.
by Alexandre Julliard
09 Jun '20
09 Jun '20
Module: wine Branch: master Commit: f2e886a0068e8662c239b5a7e412216e51e5c191 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f2e886a0068e8662c239b5a7…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jun 8 18:13:44 2020 +0200 ntdll: Export builtin functions as cdecl. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/large_int.c | 101 ++++++++++++++++++++---------------- dlls/ntdll/ntdll.spec | 16 +++--- dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 16 +++--- 3 files changed, 71 insertions(+), 62 deletions(-) diff --git a/dlls/ntdll/large_int.c b/dlls/ntdll/large_int.c index cf8a3df093..748d17adb9 100644 --- a/dlls/ntdll/large_int.c +++ b/dlls/ntdll/large_int.c @@ -545,6 +545,15 @@ NTSTATUS WINAPI RtlInt64ToUnicodeString( #ifdef __i386__ +/* those builtin functions use stdcall calling convention, but compilers reference them without stdcall declarations */ +#if defined(__MINGW32__) || defined(_MSC_VER) +LONGLONG WINAPI _alldiv( LONGLONG a, LONGLONG b ) asm("_alldiv"); +LONGLONG WINAPI _allmul( LONGLONG a, LONGLONG b ) asm("_allmul"); +LONGLONG WINAPI _allrem( LONGLONG a, LONGLONG b ) asm("_allrem"); +ULONGLONG WINAPI _aulldiv( ULONGLONG a, ULONGLONG b ) asm("_aulldiv"); +ULONGLONG WINAPI _aullrem( ULONGLONG a, ULONGLONG b ) asm("_aullrem"); +#endif + static ULONGLONG udivmod(ULONGLONG a, ULONGLONG b, ULONGLONG *rem) { const ULARGE_INTEGER n = { .QuadPart = a }; @@ -873,29 +882,29 @@ LONGLONG WINAPI _allshr( LONGLONG a, LONG b ) * Returns the quotient of a and b in edx:eax. * Returns the remainder of a and b in ebx:ecx. */ -__ASM_STDCALL_FUNC( _alldvrm, 16, - "pushl %ebp\n\t" - __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") - __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") - "movl %esp,%ebp\n\t" - __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") - "pushl 20(%ebp)\n\t" - "pushl 16(%ebp)\n\t" - "pushl 12(%ebp)\n\t" - "pushl 8(%ebp)\n\t" - "call " __ASM_NAME("_allrem") "\n\t" - "movl %edx,%ebx\n\t" - "pushl %eax\n\t" - "pushl 20(%ebp)\n\t" - "pushl 16(%ebp)\n\t" - "pushl 12(%ebp)\n\t" - "pushl 8(%ebp)\n\t" - "call " __ASM_NAME("_alldiv") "\n\t" - "popl %ecx\n\t" - "leave\n\t" - __ASM_CFI(".cfi_def_cfa %esp,4\n\t") - __ASM_CFI(".cfi_same_value %ebp\n\t") - "ret $16" ) +__ASM_GLOBAL_FUNC( _alldvrm, + "pushl %ebp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") + __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") + "movl %esp,%ebp\n\t" + __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") + "pushl 20(%ebp)\n\t" + "pushl 16(%ebp)\n\t" + "pushl 12(%ebp)\n\t" + "pushl 8(%ebp)\n\t" + "call " __ASM_NAME("_allrem") "\n\t" + "movl %edx,%ebx\n\t" + "pushl %eax\n\t" + "pushl 20(%ebp)\n\t" + "pushl 16(%ebp)\n\t" + "pushl 12(%ebp)\n\t" + "pushl 8(%ebp)\n\t" + "call " __ASM_NAME("_alldiv") "\n\t" + "popl %ecx\n\t" + "leave\n\t" + __ASM_CFI(".cfi_def_cfa %esp,4\n\t") + __ASM_CFI(".cfi_same_value %ebp\n\t") + "ret $16" ) /****************************************************************************** * _aullrem (NTDLL.@) @@ -946,28 +955,28 @@ ULONGLONG WINAPI _aullshr( ULONGLONG a, LONG b ) * Returns the quotient of a and b in edx:eax. * Returns the remainder of a and b in ebx:ecx. */ -__ASM_STDCALL_FUNC( _aulldvrm, 16, - "pushl %ebp\n\t" - __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") - __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") - "movl %esp,%ebp\n\t" - __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") - "pushl 20(%ebp)\n\t" - "pushl 16(%ebp)\n\t" - "pushl 12(%ebp)\n\t" - "pushl 8(%ebp)\n\t" - "call " __ASM_NAME("_aullrem") "\n\t" - "movl %edx,%ebx\n\t" - "pushl %eax\n\t" - "pushl 20(%ebp)\n\t" - "pushl 16(%ebp)\n\t" - "pushl 12(%ebp)\n\t" - "pushl 8(%ebp)\n\t" - "call " __ASM_NAME("_aulldiv") "\n\t" - "popl %ecx\n\t" - "leave\n\t" - __ASM_CFI(".cfi_def_cfa %esp,4\n\t") - __ASM_CFI(".cfi_same_value %ebp\n\t") - "ret $16" ) +__ASM_GLOBAL_FUNC( _aulldvrm, + "pushl %ebp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") + __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") + "movl %esp,%ebp\n\t" + __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") + "pushl 20(%ebp)\n\t" + "pushl 16(%ebp)\n\t" + "pushl 12(%ebp)\n\t" + "pushl 8(%ebp)\n\t" + "call " __ASM_NAME("_aullrem") "\n\t" + "movl %edx,%ebx\n\t" + "pushl %eax\n\t" + "pushl 20(%ebp)\n\t" + "pushl 16(%ebp)\n\t" + "pushl 12(%ebp)\n\t" + "pushl 8(%ebp)\n\t" + "call " __ASM_NAME("_aulldiv") "\n\t" + "popl %ecx\n\t" + "leave\n\t" + __ASM_CFI(".cfi_def_cfa %esp,4\n\t") + __ASM_CFI(".cfi_same_value %ebp\n\t") + "ret $16" ) #endif /* __i386__ */ diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index ce5c580bd5..e054eabba3 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -1427,17 +1427,17 @@ @ cdecl __iscsym(long) NTDLL___iscsym @ cdecl __iscsymf(long) NTDLL___iscsymf @ cdecl __toascii(long) NTDLL___toascii -@ stdcall -arch=i386 -ret64 _alldiv(int64 int64) -@ stdcall -arch=i386 -norelay _alldvrm(int64 int64) -@ stdcall -arch=i386 -ret64 _allmul(int64 int64) -@ stdcall -arch=i386 -norelay _alloca_probe() -@ stdcall -arch=i386 -ret64 _allrem(int64 int64) +@ cdecl -arch=i386 -ret64 _alldiv(int64 int64) +@ cdecl -arch=i386 -norelay _alldvrm(int64 int64) +@ cdecl -arch=i386 -ret64 _allmul(int64 int64) +@ cdecl -arch=i386 -norelay _alloca_probe() +@ cdecl -arch=i386 -ret64 _allrem(int64 int64) @ stdcall -arch=i386 -ret64 _allshl(int64 long) @ stdcall -arch=i386 -ret64 _allshr(int64 long) @ cdecl -ret64 _atoi64(str) -@ stdcall -arch=i386 -ret64 _aulldiv(int64 int64) -@ stdcall -arch=i386 -norelay _aulldvrm(int64 int64) -@ stdcall -arch=i386 -ret64 _aullrem(int64 int64) +@ cdecl -arch=i386 -ret64 _aulldiv(int64 int64) +@ cdecl -arch=i386 -norelay _aulldvrm(int64 int64) +@ cdecl -arch=i386 -ret64 _aullrem(int64 int64) @ stdcall -arch=i386 -ret64 _aullshr(int64 long) @ cdecl -arch=i386 -norelay _chkstk() @ stub _fltused diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index 902609b071..6acdec5dc5 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -1514,16 +1514,16 @@ @ cdecl -private -arch=i386 _CIsin() @ cdecl -private -arch=i386 _CIsqrt() @ cdecl -private _abnormal_termination() -@ stdcall -arch=i386 -ret64 _alldiv(int64 int64) -@ stdcall -arch=i386 -norelay _alldvrm(int64 int64) -@ stdcall -arch=i386 -ret64 _allmul(int64 int64) -@ stdcall -arch=i386 -norelay _alloca_probe() -@ stdcall -arch=i386 -ret64 _allrem(int64 int64) +@ cdecl -arch=i386 -ret64 _alldiv(int64 int64) +@ cdecl -arch=i386 -norelay _alldvrm(int64 int64) +@ cdecl -arch=i386 -ret64 _allmul(int64 int64) +@ cdecl -arch=i386 -norelay _alloca_probe() +@ cdecl -arch=i386 -ret64 _allrem(int64 int64) @ stdcall -arch=i386 -ret64 _allshl(int64 long) @ stdcall -arch=i386 -ret64 _allshr(int64 long) -@ stdcall -arch=i386 -ret64 _aulldiv(int64 int64) -@ stdcall -arch=i386 -norelay _aulldvrm(int64 int64) -@ stdcall -arch=i386 -ret64 _aullrem(int64 int64) +@ cdecl -arch=i386 -ret64 _aulldiv(int64 int64) +@ cdecl -arch=i386 -norelay _aulldvrm(int64 int64) +@ cdecl -arch=i386 -ret64 _aullrem(int64 int64) @ stdcall -arch=i386 -ret64 _aullshr(int64 long) @ cdecl -arch=i386 -norelay _chkstk() @ cdecl -arch=i386 _except_handler2(ptr ptr ptr ptr)
1
0
0
0
Jacek Caban : ntdll/tests: Add long long builtins tests.
by Alexandre Julliard
09 Jun '20
09 Jun '20
Module: wine Branch: master Commit: a8f02f0091d7b251a9902fdbd400e5bdce4ac674 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a8f02f0091d7b251a9902fdb…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jun 8 18:13:00 2020 +0200 ntdll/tests: Add long long builtins tests. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/large_int.c | 61 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/dlls/ntdll/tests/large_int.c b/dlls/ntdll/tests/large_int.c index c980aebe5d..00316fe65e 100644 --- a/dlls/ntdll/tests/large_int.c +++ b/dlls/ntdll/tests/large_int.c @@ -34,6 +34,11 @@ static NTSTATUS (WINAPI *pRtlInt64ToUnicodeString)(ULONGLONG, ULONG, UNICODE_STR static NTSTATUS (WINAPI *pRtlLargeIntegerToChar)(ULONGLONG *, ULONG, ULONG, PCHAR); static NTSTATUS (WINAPI *pRtlUnicodeStringToAnsiString)(STRING *, const UNICODE_STRING *, BOOLEAN); +static LONGLONG (WINAPI *p_alldiv)( LONGLONG a, LONGLONG b ); +static LONGLONG (WINAPI *p_allrem)( LONGLONG a, LONGLONG b ); +static LONGLONG (WINAPI *p_allmul)( LONGLONG a, LONGLONG b ); +static ULONGLONG (WINAPI *p_aulldiv)( ULONGLONG a, ULONGLONG b ); +static ULONGLONG (WINAPI *p_aullrem)( ULONGLONG a, ULONGLONG b ); static void InitFunctionPtrs(void) { @@ -45,6 +50,12 @@ static void InitFunctionPtrs(void) pRtlInt64ToUnicodeString = (void *)GetProcAddress(hntdll, "RtlInt64ToUnicodeString"); pRtlLargeIntegerToChar = (void *)GetProcAddress(hntdll, "RtlLargeIntegerToChar"); pRtlUnicodeStringToAnsiString = (void *)GetProcAddress(hntdll, "RtlUnicodeStringToAnsiString"); + + p_alldiv = (void *)GetProcAddress(hntdll, "_alldiv"); + p_allrem = (void *)GetProcAddress(hntdll, "_allrem"); + p_allmul = (void *)GetProcAddress(hntdll, "_allmul"); + p_aulldiv = (void *)GetProcAddress(hntdll, "_aulldiv"); + p_aullrem = (void *)GetProcAddress(hntdll, "_aullrem"); } /* if */ } @@ -432,6 +443,55 @@ static void test_RtlLargeIntegerToChar(void) largeint2str[0].base, largeint2str[0].MaximumLength, result, STATUS_ACCESS_VIOLATION); } +static void test_builtins(void) +{ +#ifdef __i386__ + ULONGLONG u; + LONGLONG l; + + l = p_alldiv(100, 7); + ok(l == 14, "_alldiv returned %s\n", wine_dbgstr_longlong(l)); + + l = p_alldiv(-100, 7); + ok(l == -14, "_alldiv returned %s\n", wine_dbgstr_longlong(l)); + + l = p_alldiv(0x2000000040ll, 0x100000007ll); + ok(l == 0x1f, "_alldiv returned %s\n", wine_dbgstr_longlong(l)); + + u = p_aulldiv(100, 7); + ok(u == 14, "_aulldiv returned %s\n", wine_dbgstr_longlong(u)); + + u = p_aulldiv(-100, 7); + ok(u == 0x2492492492492484ull, "_alldiv returned %s\n", wine_dbgstr_longlong(u)); + + u = p_aulldiv(0x2000000040ull, 0x100000007ull); + ok(u == 0x1f, "_aulldiv returned %s\n", wine_dbgstr_longlong(u)); + + l = p_allrem(100, 7); + ok(l == 2, "_allrem returned %s\n", wine_dbgstr_longlong(l)); + + l = p_allrem(-100, 7); + ok(l == -2, "_allrem returned %s\n", wine_dbgstr_longlong(l)); + + l = p_allrem(0x2000000040ll, 0x100000007ll); + ok(l == 0xffffff67, "_allrem returned %s\n", wine_dbgstr_longlong(l)); + + u = p_aullrem(100, 7); + ok(u == 2, "_aullrem returned %s\n", wine_dbgstr_longlong(u)); + + u = p_aullrem(-100, 7); + ok(u == 0, "_allrem returned %s\n", wine_dbgstr_longlong(u)); + + u = p_aullrem(0x2000000040ull, 0x100000007ull); + ok(u == 0xffffff67, "_aullrem returned %s\n", wine_dbgstr_longlong(u)); + + l = p_allmul(3, 4); + ok(l == 12, "_allmul = %s\n", wine_dbgstr_longlong(l)); + + l = p_allmul(0x300000001ll, 4); + ok(l == 0xc00000004, "_allmul = %s\n", wine_dbgstr_longlong(l)); +#endif /* __i386__ */ +} START_TEST(large_int) { @@ -443,4 +503,5 @@ START_TEST(large_int) test_RtlInt64ToUnicodeString(); if (pRtlLargeIntegerToChar) test_RtlLargeIntegerToChar(); + test_builtins(); }
1
0
0
0
Jacek Caban : ntdll: Reimplement _allmul using 32-bit arithmetic.
by Alexandre Julliard
09 Jun '20
09 Jun '20
Module: wine Branch: master Commit: 04117dc8d44dde789d64f717c5d293a81316ad3d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=04117dc8d44dde789d64f717…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jun 8 18:12:37 2020 +0200 ntdll: Reimplement _allmul using 32-bit arithmetic. Based on compiler-rt. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/large_int.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/large_int.c b/dlls/ntdll/large_int.c index 7114b8c2d9..cf8a3df093 100644 --- a/dlls/ntdll/large_int.c +++ b/dlls/ntdll/large_int.c @@ -759,7 +759,29 @@ LONGLONG WINAPI _alldiv( LONGLONG a, LONGLONG b ) */ LONGLONG WINAPI _allmul( LONGLONG a, LONGLONG b ) { - return a * b; + LARGE_INTEGER x = { .QuadPart = a }; + LARGE_INTEGER y = { .QuadPart = b }; + LARGE_INTEGER r; + unsigned int t; + + const int bits_in_word_2 = 16; + const unsigned int lower_mask = ~0u >> bits_in_word_2; + + r.u.LowPart = (x.u.LowPart & lower_mask) * (y.u.LowPart & lower_mask); + t = r.u.LowPart >> bits_in_word_2; + r.u.LowPart &= lower_mask; + t += (x.u.LowPart >> bits_in_word_2) * (y.u.LowPart & lower_mask); + r.u.LowPart += (t & lower_mask) << bits_in_word_2; + r.u.HighPart = t >> bits_in_word_2; + t = r.u.LowPart >> bits_in_word_2; + r.u.LowPart &= lower_mask; + t += (y.u.LowPart >> bits_in_word_2) * (x.u.LowPart & lower_mask); + r.u.LowPart += (t & lower_mask) << bits_in_word_2; + r.u.HighPart += t >> bits_in_word_2; + r.u.HighPart += (x.u.LowPart >> bits_in_word_2) * (y.u.LowPart >> bits_in_word_2); + + r.u.HighPart += x.u.HighPart * y.u.LowPart + x.u.LowPart * y.u.HighPart; + return r.QuadPart; }
1
0
0
0
Jacek Caban : ntdll: Reimplement _allrem using 32-bit arithmetic.
by Alexandre Julliard
09 Jun '20
09 Jun '20
Module: wine Branch: master Commit: 0547da64a3c431ffbc8a9304aaeb1dec3b448612 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0547da64a3c431ffbc8a9304…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jun 8 18:12:27 2020 +0200 ntdll: Reimplement _allrem using 32-bit arithmetic. Based on compiler-rt. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/large_int.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/large_int.c b/dlls/ntdll/large_int.c index 5f53a3f404..7114b8c2d9 100644 --- a/dlls/ntdll/large_int.c +++ b/dlls/ntdll/large_int.c @@ -777,7 +777,13 @@ LONGLONG WINAPI _allmul( LONGLONG a, LONGLONG b ) */ LONGLONG WINAPI _allrem( LONGLONG a, LONGLONG b ) { - return a % b; + LONGLONG s = b >> 63; /* s = b < 0 ? -1 : 0 */ + ULONGLONG r; + b = (b ^ s) - s; /* negate if s == -1 */ + s = a >> 63; /* s = a < 0 ? -1 : 0 */ + a = (a ^ s) - s; /* negate if s == -1 */ + udivmod(a, b, &r); + return ((LONGLONG)r ^ s) - s; /* negate if s == -1 */ }
1
0
0
0
Jacek Caban : ntdll: Reimplement _alldiv using 32-bit arithmetic.
by Alexandre Julliard
09 Jun '20
09 Jun '20
Module: wine Branch: master Commit: 8f144eb566c0bbbe925e5fb81b67873ed6b9e8bd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8f144eb566c0bbbe925e5fb8…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jun 8 18:12:21 2020 +0200 ntdll: Reimplement _alldiv using 32-bit arithmetic. Based on compiler-rt. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/large_int.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/large_int.c b/dlls/ntdll/large_int.c index e55d450e1e..5f53a3f404 100644 --- a/dlls/ntdll/large_int.c +++ b/dlls/ntdll/large_int.c @@ -736,7 +736,12 @@ static ULONGLONG udivmod(ULONGLONG a, ULONGLONG b, ULONGLONG *rem) */ LONGLONG WINAPI _alldiv( LONGLONG a, LONGLONG b ) { - return a / b; + LONGLONG s_a = a >> 63; /* s_a = a < 0 ? -1 : 0 */ + LONGLONG s_b = b >> 63; /* s_b = b < 0 ? -1 : 0 */ + a = (a ^ s_a) - s_a; /* negate if s_a == -1 */ + b = (b ^ s_b) - s_b; /* negate if s_b == -1 */ + s_a ^= s_b; /* sign of quotient */ + return (udivmod(a, b, NULL) ^ s_a) - s_a; /* negate if s_a == -1 */ }
1
0
0
0
Jacek Caban : ntdll: Reimplement _aullrem using 32-bit arithmetic.
by Alexandre Julliard
09 Jun '20
09 Jun '20
Module: wine Branch: master Commit: 744843ed013e5e74f3e59cb197a67d05a28654b5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=744843ed013e5e74f3e59cb1…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jun 8 18:12:13 2020 +0200 ntdll: Reimplement _aullrem using 32-bit arithmetic. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/large_int.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/large_int.c b/dlls/ntdll/large_int.c index 6b63fb87ee..e55d450e1e 100644 --- a/dlls/ntdll/large_int.c +++ b/dlls/ntdll/large_int.c @@ -878,7 +878,9 @@ __ASM_STDCALL_FUNC( _alldvrm, 16, */ ULONGLONG WINAPI _aullrem( ULONGLONG a, ULONGLONG b ) { - return a % b; + ULONGLONG r; + udivmod(a, b, &r); + return r; } /******************************************************************************
1
0
0
0
← Newer
1
...
56
57
58
59
60
61
62
...
95
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Results per page:
10
25
50
100
200