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
July
June
May
April
March
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
July 2023
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
865 discussions
Start a n
N
ew thread
Alex Henrie : webservices: Add missing const to url parameter of WsOpenListener.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: master Commit: 9928202d7c22e18fbdc0caa2ea64114e9930520f URL:
https://gitlab.winehq.org/wine/wine/-/commit/9928202d7c22e18fbdc0caa2ea6411…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Mon Jul 17 22:56:55 2023 -0600 webservices: Add missing const to url parameter of WsOpenListener. --- dlls/webservices/listener.c | 3 ++- include/webservices.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/webservices/listener.c b/dlls/webservices/listener.c index 6b9dca05486..3112d5d84fd 100644 --- a/dlls/webservices/listener.c +++ b/dlls/webservices/listener.c @@ -448,7 +448,8 @@ static HRESULT open_listener( struct listener *listener, const WS_STRING *url ) /************************************************************************** * WsOpenListener [webservices.@] */ -HRESULT WINAPI WsOpenListener( WS_LISTENER *handle, WS_STRING *url, const WS_ASYNC_CONTEXT *ctx, WS_ERROR *error ) +HRESULT WINAPI WsOpenListener( WS_LISTENER *handle, const WS_STRING *url, const WS_ASYNC_CONTEXT *ctx, + WS_ERROR *error ) { struct listener *listener = (struct listener *)handle; HRESULT hr; diff --git a/include/webservices.h b/include/webservices.h index bda09e06bc8..542670967c0 100644 --- a/include/webservices.h +++ b/include/webservices.h @@ -1726,7 +1726,7 @@ HRESULT WINAPI WsInitializeMessage(WS_MESSAGE*, WS_MESSAGE_INITIALIZATION, WS_ME HRESULT WINAPI WsMoveReader(WS_XML_READER*, WS_MOVE_TO, BOOL*, WS_ERROR*); HRESULT WINAPI WsMoveWriter(WS_XML_WRITER*, WS_MOVE_TO, BOOL*, WS_ERROR*); HRESULT WINAPI WsOpenChannel(WS_CHANNEL*, const WS_ENDPOINT_ADDRESS*, const WS_ASYNC_CONTEXT*, WS_ERROR*); -HRESULT WINAPI WsOpenListener(WS_LISTENER*, WS_STRING*, const WS_ASYNC_CONTEXT*, WS_ERROR*); +HRESULT WINAPI WsOpenListener(WS_LISTENER*, const WS_STRING*, const WS_ASYNC_CONTEXT*, WS_ERROR*); HRESULT WINAPI WsOpenServiceProxy(WS_SERVICE_PROXY*, const WS_ENDPOINT_ADDRESS*, const WS_ASYNC_CONTEXT*, WS_ERROR*); HRESULT WINAPI WsReadAttribute(WS_XML_READER*, const WS_ATTRIBUTE_DESCRIPTION*, WS_READ_OPTION,
1
0
0
0
Brendan Shanks : loader: In macOS preloader, add __program_vars section.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: master Commit: 4e6dbf3b9efc4974e4c5b8f2f5603655f7958cbd URL:
https://gitlab.winehq.org/wine/wine/-/commit/4e6dbf3b9efc4974e4c5b8f2f56036…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Thu Apr 6 12:08:49 2023 -0700 loader: In macOS preloader, add __program_vars section. This is needed to be a correct macOS 10.7 binary. --- loader/preloader_mac.c | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/loader/preloader_mac.c b/loader/preloader_mac.c index 11723cdaac9..e35444fd133 100644 --- a/loader/preloader_mac.c +++ b/loader/preloader_mac.c @@ -106,6 +106,39 @@ void *__stack_chk_guard = 0; void __stack_chk_fail_local(void) { return; } void __stack_chk_fail(void) { return; } +/* Binaries targeting 10.6 and 10.7 contain the __program_vars section, and + * dyld4 (starting in Monterey) does not like it to be missing: + * - running vmmap on a Wine process prints this warning: + * "Process exists but has not fully started -- dyld has initialized but libSystem has not" + * - because libSystem is not initialized, dlerror() always returns NULL (causing GStreamer + * to crash on init). + * - starting with macOS Sonoma, Wine crashes on launch if libSystem is not initialized. + * + * Adding __program_vars fixes those issues, and also allows more of the vars to + * be set correctly by the preloader for the loaded binary. + * + * See also: + * <
https://github.com/apple-oss-distributions/Csu/blob/Csu-88/crt.c#L42
> + * <
https://github.com/apple-oss-distributions/dyld/blob/dyld-1042.1/common/Mac…
> + */ +int NXArgc = 0; +const char** NXArgv = NULL; +const char** environ = NULL; +const char* __progname = NULL; + +extern void* __dso_handle; +struct ProgramVars +{ + void* mh; + int* NXArgcPtr; + const char*** NXArgvPtr; + const char*** environPtr; + const char** __prognamePtr; +}; +__attribute__((used)) static struct ProgramVars pvars +__attribute__ ((section ("__DATA,__program_vars"))) = { &__dso_handle, &NXArgc, &NXArgv, &environ, &__progname }; + + /* * When 'start' is called, stack frame looks like: * @@ -620,15 +653,16 @@ static void fixup_stack( void *stack ) static void set_program_vars( void *stack, void *mod ) { int *pargc; - char **argv, **env; + const char **argv, **env; int *wine_NXArgc = pdlsym( mod, "NXArgc" ); - char ***wine_NXArgv = pdlsym( mod, "NXArgv" ); - char ***wine_environ = pdlsym( mod, "environ" ); + const char ***wine_NXArgv = pdlsym( mod, "NXArgv" ); + const char ***wine_environ = pdlsym( mod, "environ" ); pargc = stack; - argv = (char **)pargc + 1; + argv = (const char **)pargc + 1; env = &argv[*pargc-1] + 2; + /* set vars in the loaded binary */ if (wine_NXArgc) *wine_NXArgc = *pargc; else @@ -643,6 +677,11 @@ static void set_program_vars( void *stack, void *mod ) *wine_environ = env; else wld_printf( "preloader: Warning: failed to set environ\n" ); + + /* set vars in the __program_vars section */ + NXArgc = *pargc; + NXArgv = argv; + environ = env; } void *wld_start( void *stack, int *is_unix_thread )
1
0
0
0
Brendan Shanks : loader: On 64-bit macOS, reserve the low 8GB using a zerofill section.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: master Commit: cfa0dd9dd91eea0e401347ba41141b9c0c23131d URL:
https://gitlab.winehq.org/wine/wine/-/commit/cfa0dd9dd91eea0e401347ba41141b…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Tue Jun 20 14:20:02 2023 -0700 loader: On 64-bit macOS, reserve the low 8GB using a zerofill section. A zerofill section is the only way to reserve address space and prevent system frameworks from using it, including preventing allocations before any preloader code runs: - starting with Ventura, dyld allocates private memory from 0x1000-0x81000. This breaks EXEs that have an image base of 0x10000. - Rosetta allocates memory starting at 0x100000000, which breaks EXEs based there. - starting with Monterey, for proper 10.7 binaries (which include a __program_vars section), libSystem initializes itself before the preloader runs. This fragments the <4GB address space which is needed for Wow64. This will need to be adjusted if any EXEs based at 0x200000000 or higher are found. --- configure | 5 +++-- configure.ac | 5 +++-- loader/preloader_mac.c | 26 +++++++++++++------------- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 7fb1685316b..4e021f19b5d 100755 --- a/configure +++ b/configure @@ -9487,7 +9487,7 @@ fi ;; if test "$wine_can_build_preloader" = "yes" then - WINEPRELOADER_LDFLAGS="-nostartfiles -nodefaultlibs -e _start -ldylib1.o -mmacosx-version-min=10.7 -Wl,-no_new_main,-image_base,0x7d400000,-segalign,0x1000,-pagezero_size,0x1000,-sectcreate,__TEXT,__info_plist,loader/wine_info.plist" + WINEPRELOADER_LDFLAGS="-nostartfiles -nodefaultlibs -e _start -ldylib1.o -mmacosx-version-min=10.7 -Wl,-no_new_main,-segalign,0x1000,-pagezero_size,0x1000,-sectcreate,__TEXT,__info_plist,loader/wine_info.plist" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,-no_pie" >&5 printf %s "checking whether the compiler supports -Wl,-no_pie... " >&6; } if test ${ac_cv_cflags__Wl__no_pie+y} @@ -9518,9 +9518,10 @@ then : fi case $host_cpu in *i[3456]86*) + WINEPRELOADER_LDFLAGS="-Wl,-image_base,0x7d400000 $WINEPRELOADER_LDFLAGS" ;; *x86_64*) - WINEPRELOADER_LDFLAGS="-Wl,-segalign,0x1000,-segaddr,WINE_4GB_RESERVE,0x100000000 $WINEPRELOADER_LDFLAGS" + WINEPRELOADER_LDFLAGS="-Wl,-image_base,0x200000000,-segalign,0x1000,-segaddr,WINE_RESERVE,0x1000 $WINEPRELOADER_LDFLAGS" ;; esac WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -mmacosx-version-min=10.7" diff --git a/configure.ac b/configure.ac index da31051d8de..71c9340b30d 100644 --- a/configure.ac +++ b/configure.ac @@ -685,14 +685,15 @@ case $host_os in if test "$wine_can_build_preloader" = "yes" then - WINEPRELOADER_LDFLAGS="-nostartfiles -nodefaultlibs -e _start -ldylib1.o -mmacosx-version-min=10.7 -Wl,-no_new_main,-image_base,0x7d400000,-segalign,0x1000,-pagezero_size,0x1000,-sectcreate,__TEXT,__info_plist,loader/wine_info.plist" + WINEPRELOADER_LDFLAGS="-nostartfiles -nodefaultlibs -e _start -ldylib1.o -mmacosx-version-min=10.7 -Wl,-no_new_main,-segalign,0x1000,-pagezero_size,0x1000,-sectcreate,__TEXT,__info_plist,loader/wine_info.plist" WINE_TRY_CFLAGS([-Wl,-no_pie], [WINEPRELOADER_LDFLAGS="-Wl,-no_pie $WINEPRELOADER_LDFLAGS"]) case $host_cpu in *i[[3456]]86*) + WINEPRELOADER_LDFLAGS="-Wl,-image_base,0x7d400000 $WINEPRELOADER_LDFLAGS" ;; *x86_64*) - WINEPRELOADER_LDFLAGS="-Wl,-segalign,0x1000,-segaddr,WINE_4GB_RESERVE,0x100000000 $WINEPRELOADER_LDFLAGS" + WINEPRELOADER_LDFLAGS="-Wl,-image_base,0x200000000,-segalign,0x1000,-segaddr,WINE_RESERVE,0x1000 $WINEPRELOADER_LDFLAGS" ;; esac dnl If preloader is used, the loader needs to be an LC_UNIXTHREAD binary to avoid AppKit/Core Animation problems. diff --git a/loader/preloader_mac.c b/loader/preloader_mac.c index 4e91128c575..11723cdaac9 100644 --- a/loader/preloader_mac.c +++ b/loader/preloader_mac.c @@ -49,18 +49,15 @@ #include "main.h" #if defined(__x86_64__) -/* Rosetta on Apple Silicon allocates memory starting at 0x100000000 (the 4GB line) - * before the preloader runs, which prevents any nonrelocatable EXEs with that - * base address from running. - * - * This empty linker section forces Rosetta's allocations (currently ~132 MB) - * to start at 0x114000000, and they should end below 0x120000000. +/* Reserve the low 8GB using a zero-fill section, this is the only way to + * prevent system frameworks from using any of it (including allocations + * before any preloader code runs) */ -__asm__(".zerofill WINE_4GB_RESERVE,WINE_4GB_RESERVE,___wine_4gb_reserve,0x14000000"); +__asm__(".zerofill WINE_RESERVE,WINE_RESERVE,___wine_reserve,0x1fffff000"); static const struct wine_preload_info zerofill_sections[] = { - { (void *)0x000100000000, 0x14000000 }, /* WINE_4GB_RESERVE section */ + { (void *)0x000000001000, 0x1fffff000 }, /* WINE_RESERVE section */ { 0, 0 } /* end of list */ }; #else @@ -92,10 +89,7 @@ static struct wine_preload_info preload_info[] = { (void *)0x00110000, 0x67ef0000 }, /* low memory area */ { (void *)0x7f000000, 0x03000000 }, /* top-down allocations + shared user data + virtual heap */ #else /* __i386__ */ - { (void *)0x000000010000, 0x00100000 }, /* DOS area */ - { (void *)0x000000110000, 0x67ef0000 }, /* low memory area */ - { (void *)0x00007f000000, 0x00ff0000 }, /* 32-bit top-down allocations + shared user data */ - { (void *)0x000100000000, 0x14000000 }, /* WINE_4GB_RESERVE section */ + { (void *)0x000000001000, 0x1fffff000 }, /* WINE_RESERVE section */ { (void *)0x7ff000000000, 0x01ff0000 }, /* top-down allocations + virtual heap */ #endif /* __i386__ */ { 0, 0 }, /* PE exe range set with WINEPRELOADRESERVE */ @@ -439,7 +433,7 @@ static int preloader_overlaps_range( const void *start, const void *end ) struct target_segment_command *seg = (struct target_segment_command*)cmd; const void *seg_start = (const void*)(seg->vmaddr + slide); const void *seg_end = (const char*)seg_start + seg->vmsize; - static const char reserved_segname[] = "WINE_4GB_RESERVE"; + static const char reserved_segname[] = "WINE_RESERVE"; if (!wld_strncmp( seg->segname, reserved_segname, sizeof(reserved_segname)-1 )) continue; @@ -653,7 +647,9 @@ static void set_program_vars( void *stack, void *mod ) void *wld_start( void *stack, int *is_unix_thread ) { +#ifdef __i386__ struct wine_preload_info builtin_dlls = { (void *)0x7a000000, 0x02000000 }; +#endif struct wine_preload_info **wine_main_preload_info; char **argv, **p, *reserve = NULL; struct target_mach_header *mh; @@ -692,15 +688,19 @@ void *wld_start( void *stack, int *is_unix_thread ) } } +#ifdef __i386__ if (!map_region( &builtin_dlls )) builtin_dlls.size = 0; +#endif /* load the main binary */ if (!(mod = pdlopen( argv[1], RTLD_NOW ))) fatal_error( "%s: could not load binary\n", argv[1] ); +#ifdef __i386__ if (builtin_dlls.size) wld_munmap( builtin_dlls.addr, builtin_dlls.size ); +#endif /* store pointer to the preload info into the appropriate main binary variable */ wine_main_preload_info = pdlsym( mod, "wine_main_preload_info" );
1
0
0
0
Brendan Shanks : configure: Only attempt to build macOS preloader on Intel, and remove unnecessary flag checks.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: master Commit: 0920543876a38c366cb1ce85d2d47382ba15bb8f URL:
https://gitlab.winehq.org/wine/wine/-/commit/0920543876a38c366cb1ce85d2d473…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Mon Jun 19 21:39:13 2023 -0700 configure: Only attempt to build macOS preloader on Intel, and remove unnecessary flag checks. --- configure | 104 ++++++++--------------------------------------------------- configure.ac | 23 +++++++------ 2 files changed, 26 insertions(+), 101 deletions(-) diff --git a/configure b/configure index 4d3108303b8..7fb1685316b 100755 --- a/configure +++ b/configure @@ -9480,99 +9480,14 @@ fi ;; WINELOADER_LDFLAGS="-Wl,-pie,-segalign,0x1000,-pagezero_size,0x1000,-sectcreate,__TEXT,__info_plist,loader/wine_info.plist" - wine_can_build_preloader=yes - WINEPRELOADER_LDFLAGS="-nostartfiles -nodefaultlibs -e _start -ldylib1.o -Wl,-image_base,0x7d400000,-segalign,0x1000,-pagezero_size,0x1000,-sectcreate,__TEXT,__info_plist,loader/wine_info.plist,-segaddr,WINE_4GB_RESERVE,0x100000000" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,-no_new_main -e _main" >&5 -printf %s "checking whether the compiler supports -Wl,-no_new_main -e _main... " >&6; } -if test ${ac_cv_cflags__Wl__no_new_main__e__main+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_wine_try_cflags_saved=$CFLAGS -CFLAGS="$CFLAGS -Wl,-no_new_main -e _main" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int main(int argc, char **argv) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_cflags__Wl__no_new_main__e__main=yes -else $as_nop - ac_cv_cflags__Wl__no_new_main__e__main=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -CFLAGS=$ac_wine_try_cflags_saved -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__Wl__no_new_main__e__main" >&5 -printf "%s\n" "$ac_cv_cflags__Wl__no_new_main__e__main" >&6; } -if test "x$ac_cv_cflags__Wl__no_new_main__e__main" = xyes -then : - WINEPRELOADER_LDFLAGS="-Wl,-no_new_main $WINEPRELOADER_LDFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,-no_new_main -e _main -mmacosx-version-min=10.7 -nostartfiles -nodefaultlibs" >&5 -printf %s "checking whether the compiler supports -Wl,-no_new_main -e _main -mmacosx-version-min=10.7 -nostartfiles -nodefaultlibs... " >&6; } -if test ${ac_cv_cflags__Wl__no_new_main__e__main__mmacosx_version_min_10_7__nostartfiles__nodefaultlibs+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_wine_try_cflags_saved=$CFLAGS -CFLAGS="$CFLAGS -Wl,-no_new_main -e _main -mmacosx-version-min=10.7 -nostartfiles -nodefaultlibs" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int main(int argc, char **argv) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_cflags__Wl__no_new_main__e__main__mmacosx_version_min_10_7__nostartfiles__nodefaultlibs=yes -else $as_nop - ac_cv_cflags__Wl__no_new_main__e__main__mmacosx_version_min_10_7__nostartfiles__nodefaultlibs=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -CFLAGS=$ac_wine_try_cflags_saved -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__Wl__no_new_main__e__main__mmacosx_version_min_10_7__nostartfiles__nodefaultlibs" >&5 -printf "%s\n" "$ac_cv_cflags__Wl__no_new_main__e__main__mmacosx_version_min_10_7__nostartfiles__nodefaultlibs" >&6; } -if test "x$ac_cv_cflags__Wl__no_new_main__e__main__mmacosx_version_min_10_7__nostartfiles__nodefaultlibs" = xyes -then : - WINEPRELOADER_LDFLAGS="-mmacosx-version-min=10.7 $WINEPRELOADER_LDFLAGS" -else $as_nop - wine_can_build_preloader=no -fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -mmacosx-version-min=10.7 -nostartfiles -nodefaultlibs" >&5 -printf %s "checking whether the compiler supports -mmacosx-version-min=10.7 -nostartfiles -nodefaultlibs... " >&6; } -if test ${ac_cv_cflags__mmacosx_version_min_10_7__nostartfiles__nodefaultlibs+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_wine_try_cflags_saved=$CFLAGS -CFLAGS="$CFLAGS -mmacosx-version-min=10.7 -nostartfiles -nodefaultlibs" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int main(int argc, char **argv) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_cflags__mmacosx_version_min_10_7__nostartfiles__nodefaultlibs=yes -else $as_nop - ac_cv_cflags__mmacosx_version_min_10_7__nostartfiles__nodefaultlibs=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -CFLAGS=$ac_wine_try_cflags_saved -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__mmacosx_version_min_10_7__nostartfiles__nodefaultlibs" >&5 -printf "%s\n" "$ac_cv_cflags__mmacosx_version_min_10_7__nostartfiles__nodefaultlibs" >&6; } -if test "x$ac_cv_cflags__mmacosx_version_min_10_7__nostartfiles__nodefaultlibs" = xyes -then : - WINEPRELOADER_LDFLAGS="-mmacosx-version-min=10.7 $WINEPRELOADER_LDFLAGS" -else $as_nop - wine_can_build_preloader=no -fi -fi + case $host_cpu in + *i[3456]86*|*x86_64*) wine_can_build_preloader=yes ;; + *) wine_can_build_preloader=no ;; + esac + if test "$wine_can_build_preloader" = "yes" then + WINEPRELOADER_LDFLAGS="-nostartfiles -nodefaultlibs -e _start -ldylib1.o -mmacosx-version-min=10.7 -Wl,-no_new_main,-image_base,0x7d400000,-segalign,0x1000,-pagezero_size,0x1000,-sectcreate,__TEXT,__info_plist,loader/wine_info.plist" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,-no_pie" >&5 printf %s "checking whether the compiler supports -Wl,-no_pie... " >&6; } if test ${ac_cv_cflags__Wl__no_pie+y} @@ -9601,6 +9516,13 @@ if test "x$ac_cv_cflags__Wl__no_pie" = xyes then : WINEPRELOADER_LDFLAGS="-Wl,-no_pie $WINEPRELOADER_LDFLAGS" fi + case $host_cpu in + *i[3456]86*) + ;; + *x86_64*) + WINEPRELOADER_LDFLAGS="-Wl,-segalign,0x1000,-segaddr,WINE_4GB_RESERVE,0x100000000 $WINEPRELOADER_LDFLAGS" + ;; + esac WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -mmacosx-version-min=10.7" else as_fn_append wine_warnings "|can't build Wine preloader; many programs won't work" diff --git a/configure.ac b/configure.ac index c9ed1c8c431..da31051d8de 100644 --- a/configure.ac +++ b/configure.ac @@ -678,20 +678,23 @@ case $host_os in WINELOADER_LDFLAGS="-Wl,-pie,-segalign,0x1000,-pagezero_size,0x1000,-sectcreate,__TEXT,__info_plist,loader/wine_info.plist" - wine_can_build_preloader=yes - WINEPRELOADER_LDFLAGS="-nostartfiles -nodefaultlibs -e _start -ldylib1.o -Wl,-image_base,0x7d400000,-segalign,0x1000,-pagezero_size,0x1000,-sectcreate,__TEXT,__info_plist,loader/wine_info.plist,-segaddr,WINE_4GB_RESERVE,0x100000000" - WINE_TRY_CFLAGS([-Wl,-no_new_main -e _main], - [WINEPRELOADER_LDFLAGS="-Wl,-no_new_main $WINEPRELOADER_LDFLAGS" - WINE_TRY_CFLAGS([-Wl,-no_new_main -e _main -mmacosx-version-min=10.7 -nostartfiles -nodefaultlibs], - [WINEPRELOADER_LDFLAGS="-mmacosx-version-min=10.7 $WINEPRELOADER_LDFLAGS"], - [wine_can_build_preloader=no])], - [WINE_TRY_CFLAGS([-mmacosx-version-min=10.7 -nostartfiles -nodefaultlibs], - [WINEPRELOADER_LDFLAGS="-mmacosx-version-min=10.7 $WINEPRELOADER_LDFLAGS"], - [wine_can_build_preloader=no])]) + case $host_cpu in + *i[[3456]]86*|*x86_64*) wine_can_build_preloader=yes ;; + *) wine_can_build_preloader=no ;; + esac + if test "$wine_can_build_preloader" = "yes" then + WINEPRELOADER_LDFLAGS="-nostartfiles -nodefaultlibs -e _start -ldylib1.o -mmacosx-version-min=10.7 -Wl,-no_new_main,-image_base,0x7d400000,-segalign,0x1000,-pagezero_size,0x1000,-sectcreate,__TEXT,__info_plist,loader/wine_info.plist" WINE_TRY_CFLAGS([-Wl,-no_pie], [WINEPRELOADER_LDFLAGS="-Wl,-no_pie $WINEPRELOADER_LDFLAGS"]) + case $host_cpu in + *i[[3456]]86*) + ;; + *x86_64*) + WINEPRELOADER_LDFLAGS="-Wl,-segalign,0x1000,-segaddr,WINE_4GB_RESERVE,0x100000000 $WINEPRELOADER_LDFLAGS" + ;; + esac dnl If preloader is used, the loader needs to be an LC_UNIXTHREAD binary to avoid AppKit/Core Animation problems. WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -mmacosx-version-min=10.7" else
1
0
0
0
Brendan Shanks : ntdll: Don't release address space on 64-bit macOS.
by Alexandre Julliard
19 Jul '23
19 Jul '23
Module: wine Branch: master Commit: c1958ddc7a497c8bdf5e61a3677bc595a77fd389 URL:
https://gitlab.winehq.org/wine/wine/-/commit/c1958ddc7a497c8bdf5e61a3677bc5…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Mon Jun 19 20:56:43 2023 -0700 ntdll: Don't release address space on 64-bit macOS. --- dlls/ntdll/unix/virtual.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index 392ac4d9966..62fc1c9dd1f 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -4128,6 +4128,13 @@ static void virtual_release_address_space(void) char *base = (char *)0x82000000; char *limit = get_wow_user_space_limit(); +#if defined(__APPLE__) && !defined(__i386__) + /* On 64-bit macOS, don't release any address space. + * It needs to be reserved for use by Wow64 + */ + return; +#endif + if (limit > (char *)0xfffff000) return; /* 64-bit limit, nothing to do */ if (limit > base)
1
0
0
0
Biswapriyo Nath : include: Add more CLSIDs in d2d1effects.idl.
by Alexandre Julliard
17 Jul '23
17 Jul '23
Module: wine Branch: master Commit: 900dfca3899d52f3085c713e26af06aa5aea37a4 URL:
https://gitlab.winehq.org/wine/wine/-/commit/900dfca3899d52f3085c713e26af06…
Author: Biswapriyo Nath <nathbappai(a)gmail.com> Date: Tue Jul 18 00:23:01 2023 +0530 include: Add more CLSIDs in d2d1effects.idl. --- include/d2d1effects.idl | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/include/d2d1effects.idl b/include/d2d1effects.idl index d448aec162a..00bf323ecba 100644 --- a/include/d2d1effects.idl +++ b/include/d2d1effects.idl @@ -18,9 +18,45 @@ cpp_quote("DEFINE_GUID(CLSID_D2D12DAffineTransform, 0x6aa97485,0x6354,0x4cfc,0x90,0x8c,0xe4,0xa7,0x4f,0x62,0xc9,0x6c);") cpp_quote("DEFINE_GUID(CLSID_D2D13DPerspectiveTransform, 0xc2844d0b,0x3d86,0x46e7,0x85,0xba,0x52,0x6c,0x92,0x40,0xf3,0xfb);") +cpp_quote("DEFINE_GUID(CLSID_D2D13DTransform, 0xe8467b04,0xec61,0x4b8a,0xb5,0xde,0xd4,0xd7,0x3d,0xeb,0xea,0x5a);") +cpp_quote("DEFINE_GUID(CLSID_D2D1ArithmeticComposite, 0xfc151437,0x049a,0x4784,0xa2,0x4a,0xf1,0xc4,0xda,0xf2,0x09,0x87);") +cpp_quote("DEFINE_GUID(CLSID_D2D1Atlas, 0x913e2be4,0xfdcf,0x4fe2,0xa5,0xf0,0x24,0x54,0xf1,0x4f,0xf4,0x08);") +cpp_quote("DEFINE_GUID(CLSID_D2D1BitmapSource, 0x5fb6c24d,0xc6dd,0x4231,0x94,0x04,0x50,0xf4,0xd5,0xc3,0x25,0x2d);") +cpp_quote("DEFINE_GUID(CLSID_D2D1Blend, 0x81c5b77b,0x13f8,0x4cdd,0xad,0x20,0xc8,0x90,0x54,0x7a,0xc6,0x5d);") +cpp_quote("DEFINE_GUID(CLSID_D2D1Border, 0x2a2d49c0,0x4acf,0x43c7,0x8c,0x6a,0x7c,0x4a,0x27,0x87,0x4d,0x27);") +cpp_quote("DEFINE_GUID(CLSID_D2D1Brightness, 0x8cea8d1e,0x77b0,0x4986,0xb3,0xb9,0x2f,0x0c,0x0e,0xae,0x78,0x87);") +cpp_quote("DEFINE_GUID(CLSID_D2D1ColorManagement, 0x1a28524c,0xfdd6,0x4aa4,0xae,0x8f,0x83,0x7e,0xb8,0x26,0x7b,0x37);") +cpp_quote("DEFINE_GUID(CLSID_D2D1ColorMatrix, 0x921f03d6,0x641c,0x47df,0x85,0x2d,0xb4,0xbb,0x61,0x53,0xae,0x11);") cpp_quote("DEFINE_GUID(CLSID_D2D1Composite, 0x48fc9f51,0xf6ac,0x48f1,0x8b,0x58,0x3b,0x28,0xac,0x46,0xf7,0x6d);") +cpp_quote("DEFINE_GUID(CLSID_D2D1ConvolveMatrix, 0x407f8c08,0x5533,0x4331,0xa3,0x41,0x23,0xcc,0x38,0x77,0x84,0x3e);") cpp_quote("DEFINE_GUID(CLSID_D2D1Crop, 0xe23f7110,0x0e9a,0x4324,0xaf,0x47,0x6a,0x2c,0x0c,0x46,0xf3,0x5b);") +cpp_quote("DEFINE_GUID(CLSID_D2D1DirectionalBlur, 0x174319a6,0x58e9,0x49b2,0xbb,0x63,0xca,0xf2,0xc8,0x11,0xa3,0xdb);") +cpp_quote("DEFINE_GUID(CLSID_D2D1DiscreteTransfer, 0x90866fcd,0x488e,0x454b,0xaf,0x06,0xe5,0x04,0x1b,0x66,0xc3,0x6c);") +cpp_quote("DEFINE_GUID(CLSID_D2D1DisplacementMap, 0xedc48364,0x0417,0x4111,0x94,0x50,0x43,0x84,0x5f,0xa9,0xf8,0x90);") +cpp_quote("DEFINE_GUID(CLSID_D2D1DistantDiffuse, 0x3e7efd62,0xa32d,0x46d4,0xa8,0x3c,0x52,0x78,0x88,0x9a,0xc9,0x54);") +cpp_quote("DEFINE_GUID(CLSID_D2D1DistantSpecular, 0x428c1ee5,0x77b8,0x4450,0x8a,0xb5,0x72,0x21,0x9c,0x21,0xab,0xda);") +cpp_quote("DEFINE_GUID(CLSID_D2D1DpiCompensation, 0x6c26c5c7,0x34e0,0x46fc,0x9c,0xfd,0xe5,0x82,0x37,0x6, 0xe2,0x28);") +cpp_quote("DEFINE_GUID(CLSID_D2D1Flood, 0x61c23c20,0xae69,0x4d8e,0x94,0xcf,0x50,0x07,0x8d,0xf6,0x38,0xf2);") +cpp_quote("DEFINE_GUID(CLSID_D2D1GammaTransfer, 0x409444c4,0xc419,0x41a0,0xb0,0xc1,0x8c,0xd0,0xc0,0xa1,0x8e,0x42);") +cpp_quote("DEFINE_GUID(CLSID_D2D1GaussianBlur, 0x1feb6d69,0x2fe6,0x4ac9,0x8c,0x58,0x1d,0x7f,0x93,0xe7,0xa6,0xa5);") +cpp_quote("DEFINE_GUID(CLSID_D2D1Scale, 0x9daf9369,0x3846,0x4d0e,0xa4,0x4e,0xc, 0x60,0x79,0x34,0xa5,0xd7);") +cpp_quote("DEFINE_GUID(CLSID_D2D1Histogram, 0x881db7d0,0xf7ee,0x4d4d,0xa6,0xd2,0x46,0x97,0xac,0xc6,0x6e,0xe8);") +cpp_quote("DEFINE_GUID(CLSID_D2D1HueRotation, 0x0f4458ec,0x4b32,0x491b,0x9e,0x85,0xbd,0x73,0xf4,0x4d,0x3e,0xb6);") +cpp_quote("DEFINE_GUID(CLSID_D2D1LinearTransfer, 0xad47c8fd,0x63ef,0x4acc,0x9b,0x51,0x67,0x97,0x9c,0x03,0x6c,0x06);") +cpp_quote("DEFINE_GUID(CLSID_D2D1LuminanceToAlpha, 0x41251ab7,0x0beb,0x46f8,0x9d,0xa7,0x59,0xe9,0x3f,0xcc,0xe5,0xde);") +cpp_quote("DEFINE_GUID(CLSID_D2D1Morphology, 0xeae6c40d,0x626a,0x4c2d,0xbf,0xcb,0x39,0x10,0x01,0xab,0xe2,0x02);") +cpp_quote("DEFINE_GUID(CLSID_D2D1OpacityMetadata, 0x6c53006a,0x4450,0x4199,0xaa,0x5b,0xad,0x16,0x56,0xfe,0xce,0x5e);") +cpp_quote("DEFINE_GUID(CLSID_D2D1PointDiffuse, 0xb9e303c3,0xc08c,0x4f91,0x8b,0x7b,0x38,0x65,0x6b,0xc4,0x8c,0x20);") +cpp_quote("DEFINE_GUID(CLSID_D2D1PointSpecular, 0x09c3ca26,0x3ae2,0x4f09,0x9e,0xbc,0xed,0x38,0x65,0xd5,0x3f,0x22);") +cpp_quote("DEFINE_GUID(CLSID_D2D1Premultiply, 0x06eab419,0xdeed,0x4018,0x80,0xd2,0x3e,0x1d,0x47,0x1a,0xde,0xb2);") +cpp_quote("DEFINE_GUID(CLSID_D2D1Saturation, 0x5cb2d9cf,0x327d,0x459f,0xa0,0xce,0x40,0xc0,0xb2,0x08,0x6b,0xf7);") cpp_quote("DEFINE_GUID(CLSID_D2D1Shadow, 0xc67ea361,0x1863,0x4e69,0x89,0xdb,0x69,0x5d,0x3e,0x9a,0x5b,0x6b);") +cpp_quote("DEFINE_GUID(CLSID_D2D1SpotDiffuse, 0x818a1105,0x7932,0x44f4,0xaa,0x86,0x08,0xae,0x7b,0x2f,0x2c,0x93);") +cpp_quote("DEFINE_GUID(CLSID_D2D1SpotSpecular, 0xedae421e,0x7654,0x4a37,0x9d,0xb8,0x71,0xac,0xc1,0xbe,0xb3,0xc1);") +cpp_quote("DEFINE_GUID(CLSID_D2D1TableTransfer, 0x5bf818c3,0x5e43,0x48cb,0xb6,0x31,0x86,0x83,0x96,0xd6,0xa1,0xd4);") +cpp_quote("DEFINE_GUID(CLSID_D2D1Tile, 0xb0784138,0x3b76,0x4bc5,0xb1,0x3b,0x0f,0xa2,0xad,0x02,0x65,0x9f);") +cpp_quote("DEFINE_GUID(CLSID_D2D1Turbulence, 0xcf2bb6ae,0x889a,0x4ad7,0xba,0x29,0xa2,0xfd,0x73,0x2c,0x9f,0xc9);") +cpp_quote("DEFINE_GUID(CLSID_D2D1UnPremultiply, 0xfb9ac489,0xad8d,0x41ed,0x99,0x99,0xbb,0x63,0x47,0xd1,0x10,0xf7);") typedef enum D2D1_BORDER_MODE {
1
0
0
0
Jeff Smith : gdiplus/tests: Fix mangled test output when dumping data in hex format.
by Alexandre Julliard
17 Jul '23
17 Jul '23
Module: wine Branch: master Commit: a55c89dba63c9965be4eb9d1d24f0d45c764f3b3 URL:
https://gitlab.winehq.org/wine/wine/-/commit/a55c89dba63c9965be4eb9d1d24f0d…
Author: Jeff Smith <whydoubt(a)gmail.com> Date: Wed Jul 12 09:19:39 2023 -0500 gdiplus/tests: Fix mangled test output when dumping data in hex format. --- dlls/gdiplus/tests/image.c | 105 +++++++++++++-------------------------------- 1 file changed, 29 insertions(+), 76 deletions(-) diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index e32b4c81240..41a5441a199 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -112,6 +112,24 @@ static BOOL get_encoder_clsid(LPCWSTR mime, GUID *format, CLSID *clsid) return ret; } +static const char * dbgstr_hexdata(const BYTE *data, UINT len) +{ + UINT i, offset = 0; + char buffer[770]; + const UINT max_len = 256; + const UINT output_len = (len <= max_len) ? len : max_len - 1; + + if (!len) return ""; + + for (i = 0; i < output_len; i++) + offset += sprintf(buffer + offset, " %02x", data[i]); + + if (len > output_len) + offset += sprintf(buffer + offset, " ..."); + + return __wine_dbg_strdup( buffer ); +} + static void test_bufferrawformat(void* buff, int size, REFGUID expected, int line, BOOL todo) { LPSTREAM stream; @@ -4043,14 +4061,7 @@ static void test_tiff_properties(void) int match = memcmp(td[i].value, prop_item->value, td[i].length) == 0; ok(match || broken(td[i].length <= 4 && !match), "%u: data mismatch\n", i); if (!match) - { - UINT j; - BYTE *data = prop_item->value; - trace("id %#lx:", prop_item->id); - for (j = 0; j < prop_item->length; j++) - trace(" %02x", data[j]); - trace("\n"); - } + trace("id %#lx:%s\n", prop_item->id, dbgstr_hexdata(prop_item->value, prop_item->length)); } HeapFree(GetProcessHeap(), 0, prop_item); } @@ -4149,14 +4160,7 @@ static void test_GdipGetAllPropertyItems(void) int match = memcmp(td[i].value, prop_item->value, td[i].length) == 0; ok(match, "%u: data mismatch\n", i); if (!match) - { - UINT j; - BYTE *data = prop_item->value; - trace("id %#lx:", prop_item->id); - for (j = 0; j < prop_item->length; j++) - trace(" %02x", data[j]); - trace("\n"); - } + trace("id %#lx:%s\n", prop_item->id, dbgstr_hexdata(prop_item->value, prop_item->length)); } HeapFree(GetProcessHeap(), 0, prop_item); } @@ -4211,14 +4215,7 @@ static void test_GdipGetAllPropertyItems(void) int match = memcmp(td[i].value, prop_item[i].value, td[i].length) == 0; ok(match, "%u: data mismatch\n", i); if (!match) - { - UINT j; - BYTE *data = prop_item[i].value; - trace("id %#lx:", prop_item[i].id); - for (j = 0; j < prop_item[i].length; j++) - trace(" %02x", data[j]); - trace("\n"); - } + trace("id %#lx:%s\n", prop_item[i].id, dbgstr_hexdata(prop_item[i].value, prop_item[i].length)); } item_data += prop_item[i].length; } @@ -4444,13 +4441,8 @@ static void test_bitmapbits(void) ok(match, "%u: data should match\n", i); if (!match) - { - BYTE *bits = data.Scan0; - trace("%u: data mismatch for format %#x:", i, td[i].format); - for (j = 0; j < td[i].size; j++) - trace(" %02x", bits[j]); - trace("\n"); - } + trace("%u: data mismatch for format %#x:%s\n", i, td[i].format, + dbgstr_hexdata(data.Scan0, td[i].size)); } else ok(!match, "%u: data shouldn't match\n", i); @@ -4474,14 +4466,7 @@ static void test_bitmapbits(void) int match = memcmp(data.Scan0, td[i].pixels_unlocked, 48) == 0; ok(match, "%u: data should match\n", i); if (!match) - { - UINT j; - BYTE *bits = data.Scan0; - trace("%u: data mismatch for format %#x:", i, td[i].format); - for (j = 0; j < 48; j++) - trace(" %02x", bits[j]); - trace("\n"); - } + trace("%u: data mismatch for format %#x:%s\n", i, td[i].format, dbgstr_hexdata(data.Scan0, 48)); } status = GdipBitmapUnlockBits(bitmap, &data); @@ -4528,13 +4513,7 @@ static void test_DrawImage(void) match = memcmp(white_2x2, black_2x2, sizeof(black_2x2)) == 0; ok(match, "data should match\n"); if (!match) - { - UINT i, size = sizeof(white_2x2); - BYTE *bits = white_2x2; - for (i = 0; i < size; i++) - trace(" %02x", bits[i]); - trace("\n"); - } + trace("%s\n", dbgstr_hexdata(white_2x2, sizeof(white_2x2))); status = GdipDeleteGraphics(graphics); expect(Ok, status); @@ -4624,13 +4603,7 @@ static void test_GdipDrawImagePointRect(void) match = memcmp(white_2x2, black_2x2, sizeof(black_2x2)) == 0; ok(match, "data should match\n"); if (!match) - { - UINT i, size = sizeof(white_2x2); - BYTE *bits = white_2x2; - for (i = 0; i < size; i++) - trace(" %02x", bits[i]); - trace("\n"); - } + trace("%s\n", dbgstr_hexdata(white_2x2, sizeof(white_2x2))); status = GdipDeleteGraphics(graphics); expect(Ok, status); @@ -4830,13 +4803,7 @@ static void test_DrawImage_scale(void) todo_wine_if (!match && td[i].todo) ok(match, "%d: data should match\n", i); if (!match) - { - UINT i, size = sizeof(dst_8x1); - const BYTE *bits = dst_8x1; - for (i = 0; i < size; i++) - trace(" %02x", bits[i]); - trace("\n"); - } + trace("%s\n", dbgstr_hexdata(dst_8x1, sizeof(dst_8x1))); } status = GdipDeleteGraphics(graphics); @@ -4957,14 +4924,7 @@ static void test_gif_properties(void) int match = memcmp(td[i].value, prop_item->value, td[i].length) == 0; ok(match, "%u: data mismatch\n", i); if (!match) - { - UINT j; - BYTE *data = prop_item->value; - trace("id %#lx:", prop_item->id); - for (j = 0; j < prop_item->length; j++) - trace(" %02x", data[j]); - trace("\n"); - } + trace("id %#lx:%s\n", prop_item->id, dbgstr_hexdata(prop_item->value, prop_item->length)); } HeapFree(GetProcessHeap(), 0, prop_item); } @@ -5019,14 +4979,7 @@ static void test_gif_properties(void) int match = memcmp(td[i].value, prop_item[i].value, td[i].length) == 0; ok(match, "%u: data mismatch\n", i); if (!match) - { - UINT j; - BYTE *data = prop_item[i].value; - trace("id %#lx:", prop_item[i].id); - for (j = 0; j < prop_item[i].length; j++) - trace(" %02x", data[j]); - trace("\n"); - } + trace("id %#lx:%s\n", prop_item[i].id, dbgstr_hexdata(prop_item[i].value, prop_item[i].length)); } item_data += prop_item[i].length; }
1
0
0
0
Jacek Caban : win32u: Pass module name before packed lparam in win_hook_params.
by Alexandre Julliard
17 Jul '23
17 Jul '23
Module: wine Branch: master Commit: 36384097c7e8c4420eaedfac271e10b23b90df4f URL:
https://gitlab.winehq.org/wine/wine/-/commit/36384097c7e8c4420eaedfac271e10…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jul 11 16:03:26 2023 +0200 win32u: Pass module name before packed lparam in win_hook_params. --- dlls/user32/hook.c | 15 ++++++++------- dlls/win32u/hook.c | 49 +++++++++++++++++++++++++------------------------ dlls/wow64win/user.c | 32 ++++++++++++++++++-------------- include/ntuser.h | 2 +- 4 files changed, 52 insertions(+), 46 deletions(-)
1
0
0
0
Jacek Caban : user32: Always use NtCallbackReturn to pass result from User32CallWindowsHook.
by Alexandre Julliard
17 Jul '23
17 Jul '23
Module: wine Branch: master Commit: 730d462b7f9c866efb2f6413a6ea74d97efc5c2e URL:
https://gitlab.winehq.org/wine/wine/-/commit/730d462b7f9c866efb2f6413a6ea74…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Jul 16 22:24:40 2023 +0200 user32: Always use NtCallbackReturn to pass result from User32CallWindowsHook. --- dlls/user32/hook.c | 16 +++++++--------- dlls/wow64win/user.c | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/dlls/user32/hook.c b/dlls/user32/hook.c index 9fea8a59e0e..6f202a0f5d9 100644 --- a/dlls/user32/hook.c +++ b/dlls/user32/hook.c @@ -457,9 +457,9 @@ BOOL WINAPI User32CallWindowsHook( struct win_hook_params *params, ULONG size ) HOOKPROC proc = params->proc; const WCHAR *module = NULL; HMODULE free_module = 0; - void *ret_lparam = NULL; + void *ret_ptr = NULL; CBT_CREATEWNDW cbtc; - UINT ret_lparam_size = 0; + UINT ret_size = 0; LRESULT ret; if (size > sizeof(*params) + params->lparam_size) @@ -467,9 +467,9 @@ BOOL WINAPI User32CallWindowsHook( struct win_hook_params *params, ULONG size ) if (params->lparam_size) { - ret_lparam = (void *)params->lparam; - ret_lparam_size = params->lparam_size; - params->lparam = (LPARAM)(params + 1); + ret_size = params->lparam_size; + ret_ptr = params + 1; + params->lparam = (LPARAM)ret_ptr; if (params->id == WH_CBT && params->code == HCBT_CREATEWND) { @@ -487,7 +487,7 @@ BOOL WINAPI User32CallWindowsHook( struct win_hook_params *params, ULONG size ) cbtc.hwndInsertAfter = HWND_TOP; cbtc.lpcs = cs; params->lparam = (LPARAM)&cbtc; - ret_lparam_size = sizeof(*cs); + ret_size = sizeof(*cs); } } if (module && !(proc = get_hook_proc( proc, module, &free_module ))) return FALSE; @@ -496,9 +496,7 @@ BOOL WINAPI User32CallWindowsHook( struct win_hook_params *params, ULONG size ) params->prev_unicode, params->next_unicode ); if (free_module) FreeLibrary( free_module ); - if (ret_lparam) memcpy( ret_lparam, params + 1, ret_lparam_size ); - else if (ret_lparam_size) NtCallbackReturn( params + 1, ret_lparam_size, ret ); - return ret; + return NtCallbackReturn( ret_ptr, ret_size, ret ); } /*********************************************************************** diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 37eeb0b7ed3..c60df5052dc 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -769,7 +769,7 @@ static NTSTATUS WINAPI wow64_NtUserCallWindowsHook( void *arg, ULONG size ) params32.id = params->id; params32.code = params->code; params32.wparam = params->wparam; - params32.lparam = lparam64_size ? 0 : params->lparam; + params32.lparam = params->lparam; params32.prev_unicode = params->prev_unicode; params32.next_unicode = params->next_unicode; params32.lparam_size = hook_lparam_64to32( params32.id, params32.code, params + 1,
1
0
0
0
Jacek Caban : wow64win: Convert parameters in place in wow64_NtUserCallWindowsHook.
by Alexandre Julliard
17 Jul '23
17 Jul '23
Module: wine Branch: master Commit: 8f168ea69bc3cd5da5fe72d2f57a5fac1369cefa URL:
https://gitlab.winehq.org/wine/wine/-/commit/8f168ea69bc3cd5da5fe72d2f57a5f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Jul 16 18:46:19 2023 +0200 wow64win: Convert parameters in place in wow64_NtUserCallWindowsHook. --- dlls/wow64win/user.c | 178 +++++++++++++++++++++++++++------------------------ 1 file changed, 95 insertions(+), 83 deletions(-)
1
0
0
0
← Newer
1
...
36
37
38
39
40
41
42
...
87
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
Results per page:
10
25
50
100
200