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
February 2024
----- 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
716 discussions
Start a n
N
ew thread
Alexandre Julliard : winebuild: Add .seh annotations on ARM.
by Alexandre Julliard
05 Feb '24
05 Feb '24
Module: wine Branch: master Commit: 7c7544aba1bdeeae5e62ff934d64331d92fd00d2 URL:
https://gitlab.winehq.org/wine/wine/-/commit/7c7544aba1bdeeae5e62ff934d6433…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Feb 5 21:08:28 2024 +0100 winebuild: Add .seh annotations on ARM. --- tools/winebuild/import.c | 25 ++++++++++++++++--------- tools/winebuild/spec32.c | 25 ++++++++++++++++--------- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index b020d938522..bc43c24ac13 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -1256,6 +1256,8 @@ void output_stubs( DLLSPEC *spec ) output_seh( ".seh_endproc" ); break; case CPU_ARM: + output( "\t.seh_proc %s\n", asm_name(name) ); + output( "\t.seh_endprologue\n" ); output( "\tmovw r0,:lower16:.L__wine_spec_file_name\n"); output( "\tmovt r0,:upper16:.L__wine_spec_file_name\n"); if (exp_name) @@ -1264,12 +1266,13 @@ void output_stubs( DLLSPEC *spec ) output( "\tmovt r1,:upper16:.L%s_string\n", name ); } else output( "\tmov r1,#%u\n", odp->ordinal ); - output( "\tbl %s\n", asm_name("__wine_spec_unimplemented_stub") ); + output( "\tb %s\n", asm_name("__wine_spec_unimplemented_stub") ); + output( "\t.seh_endproc\n" ); break; case CPU_ARM64: case CPU_ARM64EC: - output_seh( ".seh_proc %s", arm64_name(name) ); - output_seh( ".seh_endprologue" ); + output( "\t.seh_proc %s\n", arm64_name(name) ); + output( "\t.seh_endprologue\n" ); output( "\tadrp x0, %s\n", arm64_page(".L__wine_spec_file_name") ); output( "\tadd x0, x0, #%s\n", arm64_pageoff(".L__wine_spec_file_name") ); if (exp_name) @@ -1282,7 +1285,7 @@ void output_stubs( DLLSPEC *spec ) else output( "\tmov x1, %u\n", odp->ordinal ); output( "\tb %s\n", arm64_name("__wine_spec_unimplemented_stub") ); - output_seh( ".seh_endproc" ); + output( "\t.seh_endproc\n" ); break; } output_function_size( name ); @@ -1501,7 +1504,10 @@ static void build_windows_import_lib( const char *lib_name, DLLSPEC *spec, struc output_seh( ".seh_endproc" ); break; case CPU_ARM: + output( "\t.seh_proc %s\n", asm_name( delay_load ) ); output( "\tpush {r0-r3, FP, LR}\n" ); + output( "\t.seh_save_regs {r0-r3,fp,lr}\n" ); + output( "\t.seh_endprologue\n" ); output( "\tmov r1, IP\n" ); output( "\tldr r0, 1f\n" ); output( "\tldr r0, [r0]\n" ); @@ -1510,14 +1516,15 @@ static void build_windows_import_lib( const char *lib_name, DLLSPEC *spec, struc output( "\tpop {r0-r3, FP, LR}\n" ); output( "\tbx IP\n" ); output( "1:\t.long %s\n", asm_name( import_desc ) ); + output( "\t.seh_endproc\n" ); break; case CPU_ARM64: - output_seh( ".seh_proc %s", asm_name( delay_load ) ); + output( "\t.seh_proc %s\n", asm_name( delay_load ) ); output( "\tstp x29, x30, [sp, #-80]!\n" ); - output_seh( ".seh_save_fplr_x 80" ); + output( "\t.seh_save_fplr_x 80\n" ); output( "\tmov x29, sp\n" ); - output_seh( ".seh_set_fp" ); - output_seh( ".seh_endprologue" ); + output( "\t.seh_set_fp\n" ); + output( "\t.seh_endprologue\n" ); output( "\tstp x0, x1, [sp, #16]\n" ); output( "\tstp x2, x3, [sp, #32]\n" ); output( "\tstp x4, x5, [sp, #48]\n" ); @@ -1533,7 +1540,7 @@ static void build_windows_import_lib( const char *lib_name, DLLSPEC *spec, struc output( "\tldp x6, x7, [sp, #64]\n" ); output( "\tldp x29, x30, [sp], #80\n" ); output( "\tbr x16\n" ); - output_seh( ".seh_endproc" ); + output( "\t.seh_endproc\n" ); break; case CPU_ARM64EC: assert( 0 ); diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index 63292cf0989..f60afc82ec8 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -300,11 +300,17 @@ static void output_relay_debug( DLLSPEC *spec ) output( "\t.balign 4\n" ); output( "__wine_spec_relay_entry_point_%d:\n", i ); + output( "\t.seh_proc __wine_spec_relay_entry_point_%d\n", i ); output( "\tpush {r0-r3}\n" ); - output( "\tmov r2, SP\n"); - if (has_float) output( "\tvpush {s0-s15}\n" ); - output( "\tpush {LR}\n" ); - output( "\tsub SP, #4\n"); + output( "\t.seh_save_regs {r0-r3}\n" ); + if (has_float) + { + output( "\tvpush {d0-d7}\n" ); + output( "\t.seh_save_fregs {d0-d7}\n" ); + } + output( "\tpush {r4,lr}\n" ); + output( "\t.seh_save_regs {r4,lr}\n" ); + output( "\t.seh_endprologue\n" ); output( "\tmovw r1,#%u\n", i - spec->base ); output( "\tmovt r1,#%u\n", odp->u.func.args_str_offset ); output( "\tmovw r0, :lower16:.L__wine_spec_relay_descr\n" ); @@ -314,6 +320,7 @@ static void output_relay_debug( DLLSPEC *spec ) output( "\tldr IP, [SP, #4]\n" ); output( "\tadd SP, #%u\n", 24 + (has_float ? 64 : 0) ); output( "\tbx IP\n"); + output( "\t.seh_endproc\n" ); break; } @@ -323,12 +330,12 @@ static void output_relay_debug( DLLSPEC *spec ) output( "\t.balign 4\n" ); output( "__wine_spec_relay_entry_point_%d:\n", i ); - output_seh( ".seh_proc __wine_spec_relay_entry_point_%d", i ); + output( "\t.seh_proc __wine_spec_relay_entry_point_%d\n", i ); output( "\tstp x29, x30, [sp, #-%u]!\n", stack_size + 16 ); - output_seh( ".seh_save_fplr_x %u", stack_size + 16 ); + output( "\t.seh_save_fplr_x %u\n", stack_size + 16 ); output( "\tmov x29, sp\n" ); - output_seh( ".seh_set_fp" ); - output_seh( ".seh_endprologue" ); + output( "\t.seh_set_fp\n" ); + output( "\t.seh_endprologue\n" ); switch (stack_size) { case 64: output( "\tstp x6, x7, [sp, #64]\n" ); @@ -352,7 +359,7 @@ static void output_relay_debug( DLLSPEC *spec ) output( "\tmov sp, x29\n" ); output( "\tldp x29, x30, [sp], #%u\n", stack_size + 16 ); output( "\tret\n"); - output_seh( ".seh_endproc" ); + output( "\t.seh_endproc\n" ); break; }
1
0
0
0
Alexandre Julliard : winebuild: Remove some no longer used code for ARM platforms.
by Alexandre Julliard
05 Feb '24
05 Feb '24
Module: wine Branch: master Commit: e25b1ab7e9d495de58423d24b3d3e4eaa8bb4f0b URL:
https://gitlab.winehq.org/wine/wine/-/commit/e25b1ab7e9d495de58423d24b3d3e4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Feb 5 20:44:04 2024 +0100 winebuild: Remove some no longer used code for ARM platforms. --- tools/winebuild/import.c | 96 +++++------------------------------------------- tools/winebuild/spec32.c | 19 ++-------- tools/winebuild/utils.c | 20 +--------- 3 files changed, 15 insertions(+), 120 deletions(-) diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index 9325837b749..b020d938522 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -778,19 +778,9 @@ static void output_import_thunk( const char *name, const char *table, int pos ) output( "\tjmpq *%s+%d(%%rip)\n", table, pos ); break; case CPU_ARM: - if (UsePIC) - { - output( "\tldr ip, 2f\n"); - output( "1:\tadd ip, pc\n" ); - output( "\tldr pc, [ip]\n"); - output( "2:\t.long %s+%u-1b-%u\n", table, pos, thumb_mode ? 4 : 8 ); - } - else - { - output( "\tldr ip, 1f\n"); - output( "\tldr pc, [ip]\n"); - output( "1:\t.long %s+%u\n", table, pos ); - } + output( "\tldr ip, 1f\n"); + output( "\tldr pc, [ip]\n"); + output( "1:\t.long %s+%u\n", table, pos ); break; case CPU_ARM64: output( "\tadrp x16, %s\n", arm64_page( table ) ); @@ -1088,39 +1078,7 @@ static void output_delayed_import_thunks( const DLLSPEC *spec ) output( "\tjmp *%%rax\n" ); break; case CPU_ARM: - output( "\tpush {r0-r3,FP,LR}\n" ); - output( "\tmov r1,IP\n" ); - output( "\tldr r0, 1f\n"); - if (UsePIC) output( "2:\tadd r0, pc\n" ); - output( "\tbl %s\n", asm_name("__delayLoadHelper2") ); - output( "\tmov IP,r0\n"); - output( "\tpop {r0-r3,FP,LR}\n" ); - output( "\tbx IP\n"); - if (UsePIC) - output( "1:\t.long .L__wine_spec_delay_imports+%u-2b-%u\n", pos, thumb_mode ? 4 : 8 ); - else - output( "1:\t.long .L__wine_spec_delay_imports+%u\n", pos ); - break; case CPU_ARM64: - output( "\tstp x29, x30, [sp,#-80]!\n" ); - output( "\tmov x29, sp\n" ); - output( "\tstp x0, x1, [sp,#16]\n" ); - output( "\tstp x2, x3, [sp,#32]\n" ); - output( "\tstp x4, x5, [sp,#48]\n" ); - output( "\tstp x6, x7, [sp,#64]\n" ); - output( "\tmov x1, x16\n" ); - output( "\tadrp x0, %s\n", arm64_page(".L__wine_spec_delay_imports") ); - output( "\tadd x0, x0, #%s\n", arm64_pageoff(".L__wine_spec_delay_imports") ); - if (pos) output( "\tadd x0, x0, #%u\n", pos ); - output( "\tbl %s\n", asm_name("__delayLoadHelper2") ); - output( "\tmov x16, x0\n" ); - output( "\tldp x0, x1, [sp,#16]\n" ); - output( "\tldp x2, x3, [sp,#32]\n" ); - output( "\tldp x4, x5, [sp,#48]\n" ); - output( "\tldp x6, x7, [sp,#64]\n" ); - output( "\tldp x29, x30, [sp],#80\n" ); - output( "\tbr x16\n" ); - break; case CPU_ARM64EC: assert( 0 ); break; @@ -1134,7 +1092,6 @@ static void output_delayed_import_thunks( const DLLSPEC *spec ) struct import_func *func = &import->imports[j]; const char *name = func->name ? func->name : func->export_name; - if (thumb_mode) output( "\t.thumb_func\n" ); output( "__wine_delay_imp_%s_%s:\n", import->c_name, name ); switch (target.cpu) { @@ -1153,26 +1110,7 @@ static void output_delayed_import_thunks( const DLLSPEC *spec ) output( "\tjmp %s\n", asm_name(module_func) ); break; case CPU_ARM: - if (UsePIC) - { - output( "\tldr ip, 2f\n"); - output( "1:\tadd ip, pc\n" ); - output( "\tb %s\n", asm_name(module_func) ); - output( "2:\t.long .L__wine_delay_IAT+%u-1b-%u\n", iat_pos, thumb_mode ? 4 : 8 ); - } - else - { - output( "\tldr ip, 1f\n"); - output( "\tb %s\n", asm_name(module_func) ); - output( "1:\t.long .L__wine_delay_IAT+%u\n", iat_pos ); - } - break; case CPU_ARM64: - output( "\tadrp x16, %s\n", arm64_page(".L__wine_delay_IAT") ); - output( "\tadd x16, x16, #%s\n", arm64_pageoff(".L__wine_delay_IAT") ); - if (iat_pos) output( "\tadd x16, x16, #%u\n", iat_pos ); - output( "\tb %s\n", asm_name(module_func) ); - break; case CPU_ARM64EC: assert( 0 ); break; @@ -1318,29 +1256,15 @@ void output_stubs( DLLSPEC *spec ) output_seh( ".seh_endproc" ); break; case CPU_ARM: - if (UsePIC) - { - output( "\tldr r0,3f\n"); - output( "1:\tadd r0,PC\n"); - output( "\tldr r1,3f+4\n"); - if (exp_name) output( "2:\tadd r1,PC\n"); - output( "\tbl %s\n", asm_name("__wine_spec_unimplemented_stub") ); - output( "3:\t.long .L__wine_spec_file_name-1b-%u\n", thumb_mode ? 4 : 8 ); - if (exp_name) output( "\t.long .L%s_string-2b-%u\n", name, thumb_mode ? 4 : 8 ); - else output( "\t.long %u\n", odp->ordinal ); - } - else + output( "\tmovw r0,:lower16:.L__wine_spec_file_name\n"); + output( "\tmovt r0,:upper16:.L__wine_spec_file_name\n"); + if (exp_name) { - output( "\tmovw r0,:lower16:.L__wine_spec_file_name\n"); - output( "\tmovt r0,:upper16:.L__wine_spec_file_name\n"); - if (exp_name) - { - output( "\tmovw r1,:lower16:.L%s_string\n", name ); - output( "\tmovt r1,:upper16:.L%s_string\n", name ); - } - else output( "\tmov r1,#%u\n", odp->ordinal ); - output( "\tbl %s\n", asm_name("__wine_spec_unimplemented_stub") ); + output( "\tmovw r1,:lower16:.L%s_string\n", name ); + output( "\tmovt r1,:upper16:.L%s_string\n", name ); } + else output( "\tmov r1,#%u\n", odp->ordinal ); + output( "\tbl %s\n", asm_name("__wine_spec_unimplemented_stub") ); break; case CPU_ARM64: case CPU_ARM64EC: diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index 6e3a0941310..63292cf0989 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -245,7 +245,6 @@ static void output_relay_debug( DLLSPEC *spec ) /* then the relay thunks */ output( "\t.text\n" ); - if (thumb_mode) output( "\t.thumb_func\n" ); output( "__wine_spec_relay_entry_points:\n" ); output( "\tnop\n" ); /* to avoid 0 offset */ @@ -296,9 +295,8 @@ static void output_relay_debug( DLLSPEC *spec ) { int j, has_float = 0; - if (strcmp( float_abi_option, "soft" )) - for (j = 0; j < odp->u.func.nb_args && !has_float; j++) - has_float = is_float_arg( odp, j ); + for (j = 0; j < odp->u.func.nb_args && !has_float; j++) + has_float = is_float_arg( odp, j ); output( "\t.balign 4\n" ); output( "__wine_spec_relay_entry_point_%d:\n", i ); @@ -309,22 +307,13 @@ static void output_relay_debug( DLLSPEC *spec ) output( "\tsub SP, #4\n"); output( "\tmovw r1,#%u\n", i - spec->base ); output( "\tmovt r1,#%u\n", odp->u.func.args_str_offset ); - if (UsePIC) - { - output( "\tldr r0, 2f\n"); - output( "1:\tadd r0, PC\n"); - } - else - { - output( "\tmovw r0, :lower16:.L__wine_spec_relay_descr\n" ); - output( "\tmovt r0, :upper16:.L__wine_spec_relay_descr\n" ); - } + output( "\tmovw r0, :lower16:.L__wine_spec_relay_descr\n" ); + output( "\tmovt r0, :upper16:.L__wine_spec_relay_descr\n" ); output( "\tldr IP, [r0, #4]\n"); output( "\tblx IP\n"); output( "\tldr IP, [SP, #4]\n" ); output( "\tadd SP, #%u\n", 24 + (has_float ? 64 : 0) ); output( "\tbx IP\n"); - if (UsePIC) output( "2:\t.long .L__wine_spec_relay_descr-1b-%u\n", thumb_mode ? 4 : 8 ); break; } diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c index 6048b99f267..2334611fa0d 100644 --- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c @@ -466,11 +466,6 @@ void output_standard_file_header(void) output( "\t.globl @feat.00\n" ); output( ".set @feat.00, 1\n" ); } - if (thumb_mode) - { - output( "\t.syntax unified\n" ); - output( "\t.thumb\n" ); - } } /* dump a byte stream into the assembly code */ @@ -849,22 +844,9 @@ void output_function_header( const char *func, int global ) if (target.cpu == CPU_ARM64EC) output( ".section .text,\"xr\",discard,%s\n\t", name ); output( "\t.def %s\n\t.scl 2\n\t.type 32\n\t.endef\n", name ); if (global) output( "\t.globl %s\n", name ); - if (thumb_mode) output( "\t.thumb_func\n" ); break; default: - switch (target.cpu) - { - case CPU_ARM: - output( "\t.type %s,%%function\n", name ); - if (thumb_mode) output( "\t.thumb_func\n" ); - break; - case CPU_ARM64: - output( "\t.type %s,%%function\n", name ); - break; - default: - output( "\t.type %s,@function\n", name ); - break; - } + output( "\t.type %s,@function\n", name ); if (global) output( "\t.globl %s\n\t.hidden %s\n", name, name ); break; }
1
0
0
0
Fabian Maurer : msi: Don't write past end of string when selecting parent directory.
by Alexandre Julliard
05 Feb '24
05 Feb '24
Module: wine Branch: master Commit: bbce5d014db7f023b133d6d09e6846e027586f7d URL:
https://gitlab.winehq.org/wine/wine/-/commit/bbce5d014db7f023b133d6d09e6846…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Sat Feb 3 08:59:32 2024 +0100 msi: Don't write past end of string when selecting parent directory. --- dlls/msi/dialog.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index ba8ca526266..f70b127a7a5 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -2862,8 +2862,11 @@ static UINT dialog_directorylist_up( msi_dialog *dialog ) /* strip off the last directory */ ptr = PathFindFileNameW( path ); - if (ptr != path) *(ptr - 1) = '\0'; - PathAddBackslashW( path ); + if (ptr != path) + { + *(ptr - 1) = '\0'; + PathAddBackslashW( path ); + } dialog_set_property( dialog->package, prop, path );
1
0
0
0
Zhiyi Zhang : user32/tests: Fix test_recursive_messages() test failures on win7.
by Alexandre Julliard
05 Feb '24
05 Feb '24
Module: wine Branch: master Commit: d6dc917232b170cca2c0e4d9285a1b2bcb447214 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d6dc917232b170cca2c0e4d9285a1b…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Sun Feb 4 11:19:47 2024 +0800 user32/tests: Fix test_recursive_messages() test failures on win7. Windows 7 has a lower maximum depth for recursive hooks. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=56293
--- dlls/user32/tests/msg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index f58b95546ec..3414dda6e5a 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -12645,7 +12645,7 @@ static LRESULT WINAPI recursive_messages_proc(HWND hwnd, UINT message, WPARAM wp static int msg_depth; MSG msg; - if (message == WM_SETCURSOR && max_msg_depth < 25) + if (message == WM_SETCURSOR && max_msg_depth < 15) { msg_depth++; max_msg_depth = max(max_msg_depth, msg_depth); @@ -12678,7 +12678,7 @@ static void test_recursive_messages(void) flush_events(); /* Expect recursive_messages_proc() gets called recursively for WM_SETCURSOR */ - ok(max_msg_depth == 25, "Got expected %d.\n", max_msg_depth); + ok(max_msg_depth == 15, "Got expected %d.\n", max_msg_depth); DestroyWindow(hwnd); UnregisterClassA(cls.lpszClassName, cls.hInstance);
1
0
0
0
Louis Lenders : wbemprox: Add property 'Caption' to Win32_PnPEntity.
by Alexandre Julliard
05 Feb '24
05 Feb '24
Module: wine Branch: master Commit: 2b01a64ff2562f7a4eed6bea03b5b9d68bc5bdf3 URL:
https://gitlab.winehq.org/wine/wine/-/commit/2b01a64ff2562f7a4eed6bea03b5b9…
Author: Louis Lenders <xerox.xerox2000x(a)gmail.com> Date: Sat Feb 3 14:05:03 2024 +0100 wbemprox: Add property 'Caption' to Win32_PnPEntity. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=56291
--- dlls/wbemprox/builtin.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 31df1f5c920..38e6893792b 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -300,6 +300,7 @@ static const struct column col_physicalmemory[] = }; static const struct column col_pnpentity[] = { + { L"Caption", CIM_STRING }, { L"DeviceId", CIM_STRING|COL_FLAG_DYNAMIC }, { L"Manufacturer", CIM_STRING }, { L"Name", CIM_STRING }, @@ -753,6 +754,7 @@ struct record_physicalmemory }; struct record_pnpentity { + const WCHAR *caption; const WCHAR *device_id; const WCHAR *manufacturer; const WCHAR *name; @@ -3178,6 +3180,7 @@ static enum fill_status fill_pnpentity( struct table *table, const struct expr * if (SetupDiGetDeviceInstanceIdW( device_info_set, &devinfo, device_id, ARRAY_SIZE(device_id), NULL )) { + rec->caption = L"Wine PnP Device"; rec->device_id = wcsdup( device_id ); rec->manufacturer = L"The Wine Project"; rec->name = L"Wine PnP Device";
1
0
0
0
Esme Povirk : user32/tests: Accept EM_GETPASSWORDCHAR when edit is focused.
by Alexandre Julliard
05 Feb '24
05 Feb '24
Module: wine Branch: master Commit: afacbe53baaf4c68acfbaa970d79eb30ad66fd15 URL:
https://gitlab.winehq.org/wine/wine/-/commit/afacbe53baaf4c68acfbaa970d79eb…
Author: Esme Povirk <esme(a)codeweavers.com> Date: Sat Feb 3 18:56:24 2024 +0000 user32/tests: Accept EM_GETPASSWORDCHAR when edit is focused. --- dlls/user32/tests/msg.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 2dba792a2a7..f58b95546ec 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -7832,6 +7832,7 @@ static const struct message SetFocusComboBoxSeq[] = { WM_CTLCOLORBTN, sent|parent }, { WM_SETFOCUS, sent }, { WM_KILLFOCUS, sent|defwinproc }, + { EM_GETPASSWORDCHAR, sent|optional }, /* Sent on some Win10 machines */ { WM_SETFOCUS, sent }, { WM_COMMAND, sent|defwinproc|wparam, MAKEWPARAM(1001, EN_SETFOCUS) }, { EM_SETSEL, sent|defwinproc|wparam|lparam, 0, INT_MAX }, @@ -13129,6 +13130,7 @@ static const struct message sl_edit_setfocus[] = { HCBT_SETFOCUS, hook }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, + { EM_GETPASSWORDCHAR, sent|optional }, /* Sent on some Win10 machines */ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam, 0 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 10 }, @@ -13147,6 +13149,7 @@ static const struct message sl_edit_invisible[] = { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, /* Sent for IME. */ { WM_KILLFOCUS, sent|parent }, + { EM_GETPASSWORDCHAR, sent|optional }, /* Sent on some Win10 machines */ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CARET, 0 }, @@ -13159,6 +13162,7 @@ static const struct message ml_edit_setfocus[] = { HCBT_SETFOCUS, hook }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, + { EM_GETPASSWORDCHAR, sent|optional }, /* Sent on some Win10 machines */ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam, 0 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 10 }, @@ -13193,6 +13197,7 @@ static const struct message sl_edit_lbutton_down[] = { HCBT_SETFOCUS, hook }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, + { EM_GETPASSWORDCHAR, sent|optional }, /* Sent on some Win10 machines */ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 10 }, @@ -13217,6 +13222,7 @@ static const struct message ml_edit_lbutton_down[] = { HCBT_SETFOCUS, hook }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, + { EM_GETPASSWORDCHAR, sent|optional }, /* Sent on some Win10 machines */ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 10 }, @@ -15619,6 +15625,7 @@ static const struct message WmDefDlgSetFocus_1[] = { { HCBT_SETFOCUS, hook }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, + { EM_GETPASSWORDCHAR, sent|optional }, /* Sent on some Win10 machines */ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam, 0 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 10 }, @@ -15722,6 +15729,7 @@ static const struct message WmCreateDialogParamSeq_3[] = { { WM_ACTIVATEAPP, sent|parent|wparam, 1 }, { WM_NCACTIVATE, sent|parent }, { WM_ACTIVATE, sent|parent|wparam, 1 }, + { EM_GETPASSWORDCHAR, sent|optional }, /* Sent on some Win10 machines */ { WM_SETFOCUS, sent }, { WM_COMMAND, sent|parent|wparam, MAKELONG(200, EN_SETFOCUS) }, { WM_GETDLGCODE, sent|wparam|lparam, 0, 0 }, @@ -15760,6 +15768,7 @@ static const struct message WmCreateDialogParamSeq_4[] = { { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|parent }, { WM_KILLFOCUS, sent|parent }, + { EM_GETPASSWORDCHAR, sent|optional }, /* Sent on some Win10 machines */ { WM_SETFOCUS, sent }, { WM_COMMAND, sent|parent|wparam, MAKELONG(200, EN_SETFOCUS) }, { WM_GETDLGCODE, sent|wparam|lparam, 0, 0 },
1
0
0
0
Piotr Caban : winhttp: Add support for WINHTTP_AUTOPROXY_HOST_LOWERCASE flag in WinHttpGetProxyForUrl.
by Alexandre Julliard
05 Feb '24
05 Feb '24
Module: wine Branch: master Commit: 7ab46f03b1d213dda1324c171397e0dbdc9293a9 URL:
https://gitlab.winehq.org/wine/wine/-/commit/7ab46f03b1d213dda1324c171397e0…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Feb 2 15:15:03 2024 +0100 winhttp: Add support for WINHTTP_AUTOPROXY_HOST_LOWERCASE flag in WinHttpGetProxyForUrl. --- dlls/winhttp/session.c | 69 +++++++++++++++++++++++++++++------------- dlls/winhttp/tests/winhttp.c | 3 -- dlls/winhttp/winhttp_private.h | 15 --------- 3 files changed, 48 insertions(+), 39 deletions(-) diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c index 978bf28bc37..b009639297d 100644 --- a/dlls/winhttp/session.c +++ b/dlls/winhttp/session.c @@ -2031,42 +2031,69 @@ BOOL WINAPI InternetDeInitializeAutoProxyDll(LPSTR, DWORD); BOOL WINAPI InternetGetProxyInfo(LPCSTR, DWORD, LPSTR, DWORD, LPSTR *, LPDWORD); BOOL WINAPI InternetInitializeAutoProxyDll(DWORD, LPSTR, LPSTR, void *, struct AUTO_PROXY_SCRIPT_BUFFER *); -static BOOL run_script( char *script, DWORD size, const WCHAR *url, WINHTTP_PROXY_INFO *info ) +#define MAX_SCHEME_LENGTH 32 +static BOOL run_script( char *script, DWORD size, const WCHAR *url, WINHTTP_PROXY_INFO *info, DWORD flags ) { + WCHAR scheme[MAX_SCHEME_LENGTH + 1], buf[MAX_HOST_NAME_LENGTH + 1], *hostname; BOOL ret; - char *result, *urlA; - DWORD len_result; + char *result, *urlA, *hostnameA; + DWORD len, len_scheme, len_hostname; struct AUTO_PROXY_SCRIPT_BUFFER buffer; URL_COMPONENTSW uc; + memset( &uc, 0, sizeof(uc) ); + uc.dwStructSize = sizeof(uc); + uc.dwSchemeLength = -1; + uc.dwHostNameLength = -1; + + if (!WinHttpCrackUrl( url, 0, 0, &uc )) + return FALSE; + + memcpy( scheme, uc.lpszScheme, uc.dwSchemeLength * sizeof(WCHAR) ); + scheme[uc.dwSchemeLength] = 0; + wcslwr( scheme ); + len_scheme = WideCharToMultiByte( CP_ACP, 0, scheme, uc.dwSchemeLength, NULL, 0, NULL, NULL ); + + if (flags & WINHTTP_AUTOPROXY_HOST_LOWERCASE && !(flags & WINHTTP_AUTOPROXY_HOST_KEEPCASE)) + { + memcpy( buf, uc.lpszHostName, uc.dwHostNameLength * sizeof(WCHAR) ); + buf[uc.dwHostNameLength] = 0; + wcslwr( buf ); + hostname = buf; + } + else + { + hostname = uc.lpszHostName; + } + len_hostname = WideCharToMultiByte( CP_ACP, 0, hostname, uc.dwHostNameLength, NULL, 0, NULL, NULL ); + + len = WideCharToMultiByte( CP_ACP, 0, uc.lpszHostName + uc.dwHostNameLength, -1, NULL, 0, NULL, NULL ); + if (!(urlA = malloc( len + len_scheme + len_hostname + 3 ))) return FALSE; + WideCharToMultiByte( CP_ACP, 0, scheme, uc.dwSchemeLength, urlA, len_scheme, NULL, NULL ); + urlA[len_scheme++] = ':'; + urlA[len_scheme++] = '/'; + urlA[len_scheme++] = '/'; + WideCharToMultiByte( CP_ACP, 0, hostname, uc.dwHostNameLength, urlA + len_scheme, len_hostname, NULL, NULL ); + hostnameA = urlA + len_scheme; + WideCharToMultiByte( CP_ACP, 0, uc.lpszHostName + uc.dwHostNameLength, -1, + urlA + len_scheme + len_hostname, len, NULL, NULL ); + buffer.dwStructSize = sizeof(buffer); buffer.lpszScriptBuffer = script; buffer.dwScriptBufferSize = size; - if (!(urlA = strdupWA( url ))) return FALSE; - if (!(ret = InternetInitializeAutoProxyDll( 0, NULL, NULL, NULL, &buffer ))) + if (!InternetInitializeAutoProxyDll( 0, NULL, NULL, NULL, &buffer )) { free( urlA ); return FALSE; } - memset( &uc, 0, sizeof(uc) ); - uc.dwStructSize = sizeof(uc); - uc.dwHostNameLength = -1; - - if ((ret = WinHttpCrackUrl( url, 0, 0, &uc ))) + if ((ret = InternetGetProxyInfo( urlA, strlen(urlA), hostnameA, len_hostname, &result, &len ))) { - char *hostnameA = strdupWA_sized( uc.lpszHostName, uc.dwHostNameLength ); - - if ((ret = InternetGetProxyInfo( urlA, strlen(urlA), - hostnameA, strlen(hostnameA), &result, &len_result ))) - { - ret = parse_script_result( result, info ); - free( result ); - } - - free( hostnameA ); + ret = parse_script_result( result, info ); + free( result ); } + free( urlA ); InternetDeInitializeAutoProxyDll( NULL, 0 ); return ret; @@ -2118,7 +2145,7 @@ BOOL WINAPI WinHttpGetProxyForUrl( HINTERNET hsession, LPCWSTR url, WINHTTP_AUTO if ((script = download_script( pac_url, &size ))) { - ret = run_script( script, size, url, info ); + ret = run_script( script, size, url, info, options->dwFlags ); free( script ); } diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index 9d845b509ea..1724612202a 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -5406,7 +5406,6 @@ static void test_WinHttpGetProxyForUrl(int port) ok(ret, "expected success\n" ); ok(info.dwAccessType == WINHTTP_ACCESS_TYPE_NAMED_PROXY, "info.dwAccessType = %lu\n", info.dwAccessType); - todo_wine ok(!wcscmp(info.lpszProxy, L"http___WINEHQ.ORG_Test.html_WINEHQ.ORG:8080") || broken(old_winhttp && !wcscmp(info.lpszProxy, L"HTTP___WINEHQ.ORG_Test.html_WINEHQ.ORG:8080")), "info.Proxy = %s\n", wine_dbgstr_w(info.lpszProxy)); @@ -5420,7 +5419,6 @@ static void test_WinHttpGetProxyForUrl(int port) ok(ret, "expected success\n" ); ok(info.dwAccessType == WINHTTP_ACCESS_TYPE_NAMED_PROXY, "info.dwAccessType = %lu\n", info.dwAccessType); - todo_wine ok(!wcscmp(info.lpszProxy, L"http___winehq.org_Test.html_winehq.org:8080") || broken(old_winhttp && !wcscmp(info.lpszProxy, L"HTTP___winehq.org_Test.html_winehq.org:8080")), "info.Proxy = %s\n", wine_dbgstr_w(info.lpszProxy)); @@ -5436,7 +5434,6 @@ static void test_WinHttpGetProxyForUrl(int port) ok(ret, "expected success\n" ); ok(info.dwAccessType == WINHTTP_ACCESS_TYPE_NAMED_PROXY, "info.dwAccessType = %lu\n", info.dwAccessType); - todo_wine ok(!wcscmp(info.lpszProxy, L"http___WINEHQ.ORG_Test.html_WINEHQ.ORG:8080"), "info.Proxy = %s\n", wine_dbgstr_w(info.lpszProxy)); ok(!info.lpszProxyBypass, "info.ProxyBypass = %s\n", diff --git a/dlls/winhttp/winhttp_private.h b/dlls/winhttp/winhttp_private.h index 80ce2614ca1..a71447dbe1c 100644 --- a/dlls/winhttp/winhttp_private.h +++ b/dlls/winhttp/winhttp_private.h @@ -455,21 +455,6 @@ static inline char *strdupWA( const WCHAR *src ) return dst; } -static inline char *strdupWA_sized( const WCHAR *src, DWORD size ) -{ - char *dst = NULL; - if (src) - { - int len = WideCharToMultiByte( CP_ACP, 0, src, size, NULL, 0, NULL, NULL ) + 1; - if ((dst = malloc( len ))) - { - WideCharToMultiByte( CP_ACP, 0, src, size, dst, len, NULL, NULL ); - dst[len - 1] = 0; - } - } - return dst; -} - extern HINSTANCE winhttp_instance; #define MIN_WEBSOCKET_SEND_BUFFER_SIZE 16
1
0
0
0
Piotr Caban : winhttp/tests: Add more WinHttpGetProxyForUrl tests.
by Alexandre Julliard
05 Feb '24
05 Feb '24
Module: wine Branch: master Commit: 9eb644fa13bd005d1881e3089587a6361981c75d URL:
https://gitlab.winehq.org/wine/wine/-/commit/9eb644fa13bd005d1881e3089587a6…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Feb 1 15:07:54 2024 +0100 winhttp/tests: Add more WinHttpGetProxyForUrl tests. --- dlls/winhttp/tests/winhttp.c | 71 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 3 deletions(-) diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index 09abc4c5854..9d845b509ea 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -2281,6 +2281,12 @@ static const char redirectmsg[] = "Location: /temporary\r\n" "Connection: close\r\n\r\n"; +static const char proxy_pac[] = +"function FindProxyForURL(url, host) {\r\n" +" url = url.replace(/[:/]/g, '_');\r\n" +" return 'PROXY ' + url + '_' + host + ':8080';\r\n" +"}\r\n\r\n"; + static const char unauthorized[] = "Unauthorized"; static const char hello_world[] = "Hello World"; static const char auth_unseen[] = "Auth Unseen"; @@ -2541,6 +2547,11 @@ static DWORD CALLBACK server_thread(LPVOID param) ok(!!strstr(buffer, "Cookie: 111\r\n"), "Header missing from request %s.\n", debugstr_a(buffer)); send(c, okmsg, sizeof(okmsg) - 1, 0); } + if (strstr(buffer, "GET /proxy.pac")) + { + send(c, okmsg, sizeof(okmsg) - 1, 0); + send(c, proxy_pac, sizeof(proxy_pac) - 1, 0); + } if (strstr(buffer, "PUT /test") || strstr(buffer, "POST /test")) { @@ -5268,9 +5279,10 @@ static void test_WinHttpGetIEProxyConfigForCurrentUser(void) GlobalFree( cfg.lpszProxyBypass ); } -static void test_WinHttpGetProxyForUrl(void) +static void test_WinHttpGetProxyForUrl(int port) { - BOOL ret; + WCHAR pac_url[64]; + BOOL ret, old_winhttp = FALSE; DWORD error; HINTERNET session; WINHTTP_AUTOPROXY_OPTIONS options; @@ -5379,6 +5391,59 @@ static void test_WinHttpGetProxyForUrl(void) ret = WinHttpGetProxyForUrl( session, L"http:", &options, &info ); ok( !ret, "expected failure\n" ); + swprintf(pac_url, ARRAY_SIZE(pac_url), L"
http://localhost:%d/proxy.pac?ver=1
", port); + options.dwFlags = WINHTTP_AUTOPROXY_CONFIG_URL | WINHTTP_AUTOPROXY_NO_CACHE_SVC; + options.dwAutoDetectFlags = 0; + options.lpszAutoConfigUrl = pac_url; + + ret = WinHttpGetProxyForUrl( session, L"
HTTP://WINEHQ.ORG/Test.html
", &options, &info); + if (!ret) + { + old_winhttp = TRUE; + options.dwFlags &= ~WINHTTP_AUTOPROXY_NO_CACHE_SVC; + ret = WinHttpGetProxyForUrl( session, L"
HTTP://WINEHQ.ORG/Test.html
", &options, &info); + } + ok(ret, "expected success\n" ); + ok(info.dwAccessType == WINHTTP_ACCESS_TYPE_NAMED_PROXY, + "info.dwAccessType = %lu\n", info.dwAccessType); + todo_wine + ok(!wcscmp(info.lpszProxy, L"http___WINEHQ.ORG_Test.html_WINEHQ.ORG:8080") || + broken(old_winhttp && !wcscmp(info.lpszProxy, L"HTTP___WINEHQ.ORG_Test.html_WINEHQ.ORG:8080")), + "info.Proxy = %s\n", wine_dbgstr_w(info.lpszProxy)); + ok(!info.lpszProxyBypass, "info.ProxyBypass = %s\n", + wine_dbgstr_w(info.lpszProxyBypass)); + GlobalFree( info.lpszProxy ); + + options.dwFlags |= WINHTTP_AUTOPROXY_HOST_LOWERCASE; + + ret = WinHttpGetProxyForUrl( session, L"
HTTP://WINEHQ.ORG/Test.html
", &options, &info); + ok(ret, "expected success\n" ); + ok(info.dwAccessType == WINHTTP_ACCESS_TYPE_NAMED_PROXY, + "info.dwAccessType = %lu\n", info.dwAccessType); + todo_wine + ok(!wcscmp(info.lpszProxy, L"http___winehq.org_Test.html_winehq.org:8080") || + broken(old_winhttp && !wcscmp(info.lpszProxy, L"HTTP___winehq.org_Test.html_winehq.org:8080")), + "info.Proxy = %s\n", wine_dbgstr_w(info.lpszProxy)); + ok(!info.lpszProxyBypass, "info.ProxyBypass = %s\n", + wine_dbgstr_w(info.lpszProxyBypass)); + GlobalFree( info.lpszProxy ); + + if (!old_winhttp) + { + options.dwFlags |= WINHTTP_AUTOPROXY_HOST_KEEPCASE; + + ret = WinHttpGetProxyForUrl( session, L"
HTTP://WINEHQ.ORG/Test.html
", &options, &info); + ok(ret, "expected success\n" ); + ok(info.dwAccessType == WINHTTP_ACCESS_TYPE_NAMED_PROXY, + "info.dwAccessType = %lu\n", info.dwAccessType); + todo_wine + ok(!wcscmp(info.lpszProxy, L"http___WINEHQ.ORG_Test.html_WINEHQ.ORG:8080"), + "info.Proxy = %s\n", wine_dbgstr_w(info.lpszProxy)); + ok(!info.lpszProxyBypass, "info.ProxyBypass = %s\n", + wine_dbgstr_w(info.lpszProxyBypass)); + GlobalFree( info.lpszProxy ); + } + WinHttpCloseHandle( session ); } @@ -5854,7 +5919,6 @@ START_TEST (winhttp) test_IWinHttpRequest_Invoke(); test_WinHttpDetectAutoProxyConfigUrl(); test_WinHttpGetIEProxyConfigForCurrentUser(); - test_WinHttpGetProxyForUrl(); test_chunked_read(); test_max_http_automatic_redirects(); si.event = CreateEventW(NULL, 0, 0, NULL); @@ -5889,6 +5953,7 @@ START_TEST (winhttp) test_passport_auth(si.port); test_websocket(si.port); test_redirect(si.port); + test_WinHttpGetProxyForUrl(si.port); /* send the basic request again to shutdown the server thread */ test_basic_request(si.port, NULL, L"/quit");
1
0
0
0
Rémi Bernon : winegstreamer: Allow wg_transform size changes with an explicit attribute.
by Alexandre Julliard
05 Feb '24
05 Feb '24
Module: wine Branch: master Commit: 6979a9f059d7390e64f7de50d424e8d4363575c8 URL:
https://gitlab.winehq.org/wine/wine/-/commit/6979a9f059d7390e64f7de50d424e8…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Jan 30 20:21:45 2024 +0100 winegstreamer: Allow wg_transform size changes with an explicit attribute. --- dlls/winegstreamer/h264_decoder.c | 13 +------------ dlls/winegstreamer/unixlib.h | 1 + dlls/winegstreamer/wg_transform.c | 4 ++++ 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/dlls/winegstreamer/h264_decoder.c b/dlls/winegstreamer/h264_decoder.c index ec1dd593b18..bf691a2e25c 100644 --- a/dlls/winegstreamer/h264_decoder.c +++ b/dlls/winegstreamer/h264_decoder.c @@ -89,6 +89,7 @@ static HRESULT try_create_wg_transform(struct h264_decoder *decoder) { .output_plane_align = 15, .input_queue_length = 15, + .allow_size_change = TRUE, }; struct wg_format input_format; struct wg_format output_format; @@ -106,12 +107,6 @@ static HRESULT try_create_wg_transform(struct h264_decoder *decoder) if (output_format.major_type == WG_MAJOR_TYPE_UNKNOWN) return MF_E_INVALIDMEDIATYPE; - /* Don't force any specific size, H264 streams already have the metadata for it - * and will generate a MF_E_TRANSFORM_STREAM_CHANGE result later. - */ - output_format.u.video.width = 0; - output_format.u.video.height = 0; - if (SUCCEEDED(IMFAttributes_GetUINT32(decoder->attributes, &MF_LOW_LATENCY, &low_latency))) attrs.low_latency = !!low_latency; @@ -545,12 +540,6 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF struct wg_format output_format; mf_media_type_to_wg_format(decoder->output_type, &output_format); - /* Don't force any specific size, H264 streams already have the metadata for it - * and will generate a MF_E_TRANSFORM_STREAM_CHANGE result later. - */ - output_format.u.video.width = 0; - output_format.u.video.height = 0; - if (output_format.major_type == WG_MAJOR_TYPE_UNKNOWN || !wg_transform_set_output_format(decoder->wg_transform, &output_format)) { diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h index 516fc19b4e3..4ec9fce515e 100644 --- a/dlls/winegstreamer/unixlib.h +++ b/dlls/winegstreamer/unixlib.h @@ -336,6 +336,7 @@ struct wg_transform_attrs { UINT32 output_plane_align; UINT32 input_queue_length; + BOOL allow_size_change; BOOL low_latency; }; diff --git a/dlls/winegstreamer/wg_transform.c b/dlls/winegstreamer/wg_transform.c index 320ee76438e..516b28e82e2 100644 --- a/dlls/winegstreamer/wg_transform.c +++ b/dlls/winegstreamer/wg_transform.c @@ -193,7 +193,11 @@ static GstCaps *transform_format_to_caps(struct wg_transform *transform, const s struct wg_format copy = *format; if (format->major_type == WG_MAJOR_TYPE_VIDEO) + { + if (transform->attrs.allow_size_change) + copy.u.video.width = copy.u.video.height = 0; copy.u.video.fps_n = copy.u.video.fps_d = 0; + } return wg_format_to_caps(©); }
1
0
0
0
Rémi Bernon : winegstreamer: Ignore wg_transform input / output video format fps.
by Alexandre Julliard
05 Feb '24
05 Feb '24
Module: wine Branch: master Commit: 98b8ab9b88b77e2f8f0c51adb681094191a0be1b URL:
https://gitlab.winehq.org/wine/wine/-/commit/98b8ab9b88b77e2f8f0c51adb68109…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Jan 30 19:25:03 2024 +0100 winegstreamer: Ignore wg_transform input / output video format fps. Decoders might output some fps information and encoders might input fps, but otherwise is unnecessary and may prevent compatible caps matching. --- dlls/winegstreamer/h264_decoder.c | 4 ---- dlls/winegstreamer/video_decoder.c | 6 ------ dlls/winegstreamer/wg_transform.c | 39 ++++++++++++++++++++++++++++++++------ dlls/winegstreamer/wmv_decoder.c | 4 ---- 4 files changed, 33 insertions(+), 20 deletions(-) diff --git a/dlls/winegstreamer/h264_decoder.c b/dlls/winegstreamer/h264_decoder.c index a187c744549..ec1dd593b18 100644 --- a/dlls/winegstreamer/h264_decoder.c +++ b/dlls/winegstreamer/h264_decoder.c @@ -111,8 +111,6 @@ static HRESULT try_create_wg_transform(struct h264_decoder *decoder) */ output_format.u.video.width = 0; output_format.u.video.height = 0; - output_format.u.video.fps_d = 0; - output_format.u.video.fps_n = 0; if (SUCCEEDED(IMFAttributes_GetUINT32(decoder->attributes, &MF_LOW_LATENCY, &low_latency))) attrs.low_latency = !!low_latency; @@ -552,8 +550,6 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF */ output_format.u.video.width = 0; output_format.u.video.height = 0; - output_format.u.video.fps_d = 0; - output_format.u.video.fps_n = 0; if (output_format.major_type == WG_MAJOR_TYPE_UNKNOWN || !wg_transform_set_output_format(decoder->wg_transform, &output_format)) diff --git a/dlls/winegstreamer/video_decoder.c b/dlls/winegstreamer/video_decoder.c index 2faab78faf2..f24c25e03f2 100644 --- a/dlls/winegstreamer/video_decoder.c +++ b/dlls/winegstreamer/video_decoder.c @@ -84,9 +84,6 @@ static HRESULT try_create_wg_transform(struct video_decoder *decoder) if (output_format.major_type == WG_MAJOR_TYPE_UNKNOWN) return MF_E_INVALIDMEDIATYPE; - output_format.u.video.fps_d = 0; - output_format.u.video.fps_n = 0; - if (!(decoder->wg_transform = wg_transform_create(&input_format, &output_format, &attrs))) { ERR("Failed to create transform with input major_type %u.\n", input_format.major_type); @@ -311,9 +308,6 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF { mf_media_type_to_wg_format(decoder->output_type, &output_format); - output_format.u.video.fps_d = 0; - output_format.u.video.fps_n = 0; - if (output_format.major_type == WG_MAJOR_TYPE_UNKNOWN || !wg_transform_set_output_format(decoder->wg_transform, &output_format)) { diff --git a/dlls/winegstreamer/wg_transform.c b/dlls/winegstreamer/wg_transform.c index 56523c7606a..320ee76438e 100644 --- a/dlls/winegstreamer/wg_transform.c +++ b/dlls/winegstreamer/wg_transform.c @@ -188,6 +188,16 @@ static gboolean transform_sink_query_allocation(struct wg_transform *transform, return true; } +static GstCaps *transform_format_to_caps(struct wg_transform *transform, const struct wg_format *format) +{ + struct wg_format copy = *format; + + if (format->major_type == WG_MAJOR_TYPE_VIDEO) + copy.u.video.fps_n = copy.u.video.fps_d = 0; + + return wg_format_to_caps(©); +} + static gboolean transform_sink_query_caps(struct wg_transform *transform, GstQuery *query) { GstCaps *caps, *filter, *temp; @@ -195,7 +205,7 @@ static gboolean transform_sink_query_caps(struct wg_transform *transform, GstQue GST_LOG("transform %p, %"GST_PTR_FORMAT, transform, query); gst_query_parse_caps(query, &filter); - if (!(caps = wg_format_to_caps(&transform->output_format))) + if (!(caps = transform_format_to_caps(transform, &transform->output_format))) return false; if (filter) @@ -234,6 +244,23 @@ static gboolean transform_sink_query_cb(GstPad *pad, GstObject *parent, GstQuery return gst_pad_query_default(pad, parent, query); } +static gboolean transform_output_caps_is_compatible(struct wg_transform *transform, GstCaps *caps) +{ + GstCaps *copy = gst_caps_copy(caps); + gboolean ret; + gsize i; + + for (i = 0; i < gst_caps_get_size(copy); ++i) + { + GstStructure *structure = gst_caps_get_structure(copy, i); + gst_structure_remove_fields(structure, "framerate", NULL); + } + + ret = gst_caps_is_always_compatible(transform->output_caps, copy); + gst_caps_unref(copy); + return ret; +} + static void transform_sink_event_caps(struct wg_transform *transform, GstEvent *event) { GstCaps *caps; @@ -243,7 +270,7 @@ static void transform_sink_event_caps(struct wg_transform *transform, GstEvent * gst_event_parse_caps(event, &caps); transform->output_caps_changed = transform->output_caps_changed - || !gst_caps_is_always_compatible(transform->output_caps, caps); + || !transform_output_caps_is_compatible(transform, caps); gst_caps_unref(transform->output_caps); transform->output_caps = gst_caps_ref(caps); @@ -329,7 +356,7 @@ NTSTATUS wg_transform_create(void *args) transform->attrs = *params->attrs; transform->output_format = output_format; - if (!(src_caps = wg_format_to_caps(&input_format))) + if (!(src_caps = transform_format_to_caps(transform, &input_format))) goto out; if (!(template = gst_pad_template_new("src", GST_PAD_SRC, GST_PAD_ALWAYS, src_caps))) goto out; @@ -343,7 +370,7 @@ NTSTATUS wg_transform_create(void *args) gst_pad_set_element_private(transform->my_src, transform); gst_pad_set_query_function(transform->my_src, transform_src_query_cb); - if (!(transform->output_caps = wg_format_to_caps(&output_format))) + if (!(transform->output_caps = transform_format_to_caps(transform, &output_format))) goto out; if (!(template = gst_pad_template_new("sink", GST_PAD_SINK, GST_PAD_ALWAYS, transform->output_caps))) goto out; @@ -516,7 +543,7 @@ NTSTATUS wg_transform_set_output_format(void *args) GstSample *sample; GstCaps *caps; - if (!(caps = wg_format_to_caps(format))) + if (!(caps = transform_format_to_caps(transform, format))) { GST_ERROR("Failed to convert format %p to caps.", format); return STATUS_UNSUCCESSFUL; @@ -525,7 +552,7 @@ NTSTATUS wg_transform_set_output_format(void *args) GST_INFO("transform %p output caps %"GST_PTR_FORMAT, transform, caps); - if (gst_caps_is_always_compatible(transform->output_caps, caps)) + if (transform_output_caps_is_compatible(transform, caps)) { gst_caps_unref(caps); return STATUS_SUCCESS; diff --git a/dlls/winegstreamer/wmv_decoder.c b/dlls/winegstreamer/wmv_decoder.c index 89da25074c6..d13b5a065ed 100644 --- a/dlls/winegstreamer/wmv_decoder.c +++ b/dlls/winegstreamer/wmv_decoder.c @@ -520,8 +520,6 @@ static HRESULT WINAPI media_object_SetInputType(IMediaObject *iface, DWORD index if (!amt_to_wg_format((const AM_MEDIA_TYPE *)type, &wg_format)) return DMO_E_TYPE_NOT_ACCEPTED; assert(wg_format.major_type == WG_MAJOR_TYPE_VIDEO_WMV); - wg_format.u.video_wmv.fps_n = 0; - wg_format.u.video_wmv.fps_d = 0; if (flags & DMO_SET_TYPEF_TEST_ONLY) return S_OK; @@ -579,8 +577,6 @@ static HRESULT WINAPI media_object_SetOutputType(IMediaObject *iface, DWORD inde if (!amt_to_wg_format((const AM_MEDIA_TYPE *)type, &wg_format)) return DMO_E_TYPE_NOT_ACCEPTED; assert(wg_format.major_type == WG_MAJOR_TYPE_VIDEO); - wg_format.u.video.fps_n = 0; - wg_format.u.video.fps_d = 0; if (flags & DMO_SET_TYPEF_TEST_ONLY) return S_OK;
1
0
0
0
← Newer
1
...
62
63
64
65
66
67
68
...
72
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
Results per page:
10
25
50
100
200