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
August 2021
----- 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
1051 discussions
Start a n
N
ew thread
Alexandre Julliard : ntdll: Make __wine_unix_call() WINAPI to follow syscall conventions.
by Alexandre Julliard
11 Aug '21
11 Aug '21
Module: wine Branch: master Commit: d7add3821898b6f002c3df969f1198b30fcfc8c4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d7add3821898b6f002c3df96…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Aug 11 20:07:15 2021 +0200 ntdll: Make __wine_unix_call() WINAPI to follow syscall conventions. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/ntdll.spec | 2 +- dlls/ntdll/unix/loader.c | 2 +- include/winternl.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 5ac5a16ed44..36d997d1762 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -1625,7 +1625,7 @@ @ cdecl -syscall wine_server_handle_to_fd(long long ptr ptr) # Unix interface -@ cdecl -syscall __wine_unix_call(int64 long ptr) +@ stdcall -syscall __wine_unix_call(int64 long ptr) @ cdecl __wine_set_unix_funcs(long ptr) @ cdecl __wine_init_unix_lib(long long ptr ptr) @ stdcall __wine_ctrl_routine(ptr) diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index f1a2b9f5a79..7d9635db535 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -1141,7 +1141,7 @@ static NTSTATUS CDECL init_unix_lib( void *module, DWORD reason, const void *ptr /*********************************************************************** * __wine_unix_call */ -NTSTATUS CDECL __wine_unix_call( unixlib_handle_t handle, unsigned int code, void *args ) +NTSTATUS WINAPI __wine_unix_call( unixlib_handle_t handle, unsigned int code, void *args ) { return ((unixlib_entry_t*)(UINT_PTR)handle)[code]( args ); } diff --git a/include/winternl.h b/include/winternl.h index 562a35a83a1..523e65007ed 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -4617,7 +4617,7 @@ typedef UINT64 unixlib_handle_t; /* Wine internal functions */ extern NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out ); -extern NTSTATUS CDECL __wine_unix_call( unixlib_handle_t handle, unsigned int code, void *args ); +extern NTSTATUS WINAPI __wine_unix_call( unixlib_handle_t handle, unsigned int code, void *args ); /* The thread information for 16-bit threads */ /* NtCurrentTeb()->SubSystemTib points to this */
1
0
0
0
Alexandre Julliard : winegcc: Don't build the .spec.o file for native Unix libraries.
by Alexandre Julliard
11 Aug '21
11 Aug '21
Module: wine Branch: master Commit: 6688367046fd0a7446baaf623b2a6b8329b27059 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6688367046fd0a7446baaf62…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Aug 11 11:59:26 2021 +0200 winegcc: Don't build the .spec.o file for native Unix libraries. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winegcc/winegcc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index b756c5a97f8..8e77648ac10 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -1220,7 +1220,7 @@ static void build(struct options* opts) strarray *lib_dirs, *files; strarray *link_args, *implib_args, *tool; char *output_file, *output_path; - const char *spec_o_name, *libgcc = NULL; + const char *spec_o_name = NULL, *libgcc = NULL; const char *output_name, *spec_file, *lang; int generate_app_loader = 1; const char *crt_lib = NULL, *entry_point = NULL; @@ -1382,7 +1382,8 @@ static void build(struct options* opts) else entry_point = opts->entry_point; /* run winebuild to generate the .spec.o file */ - spec_o_name = build_spec_obj( opts, spec_file, output_file, files, lib_dirs, entry_point ); + if (!(opts->unix_lib && opts->subsystem && !strcmp(opts->subsystem, "native"))) + spec_o_name = build_spec_obj( opts, spec_file, output_file, files, lib_dirs, entry_point ); if (fake_module) return; /* nothing else to do */ @@ -1414,7 +1415,7 @@ static void build(struct options* opts) entry_point)); } - strarray_add(link_args, spec_o_name); + if (spec_o_name) strarray_add(link_args, spec_o_name); if (is_pe) {
1
0
0
0
Alexandre Julliard : winegcc: Add a helper function to build the .spec.o file.
by Alexandre Julliard
11 Aug '21
11 Aug '21
Module: wine Branch: master Commit: c697ee728b60e259723730384ecf784f5f9375ec URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c697ee728b60e25972373038…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Aug 11 11:58:17 2021 +0200 winegcc: Add a helper function to build the .spec.o file. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winegcc/winegcc.c | 176 ++++++++++++++++++++++++++---------------------- 1 file changed, 97 insertions(+), 79 deletions(-) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index fd2d2c2a794..b756c5a97f8 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -1120,10 +1120,105 @@ static void add_library( struct options *opts, strarray *lib_dirs, strarray *fil free(fullname); } +/* run winebuild to generate the .spec.o file */ +static const char *build_spec_obj( struct options *opts, const char *spec_file, const char *output_file, + strarray *files, strarray *lib_dirs, const char *entry_point ) +{ + unsigned int i; + int is_pe = is_pe_target( opts ); + strarray *spec_args = get_winebuild_args( opts ); + strarray *tool; + const char *spec_o_name, *output_name; + int fake_module = strendswith(output_file, ".fake"); + + /* get the filename from the path */ + if ((output_name = strrchr(output_file, '/'))) output_name++; + else output_name = output_file; + + if ((tool = build_tool_name( opts, TOOL_CC ))) strarray_add( spec_args, strmake( "--cc-cmd=%s", strarray_tostring( tool, " " ))); + if (!is_pe && (tool = build_tool_name( opts, TOOL_LD ))) strarray_add( spec_args, strmake( "--ld-cmd=%s", strarray_tostring( tool, " " ))); + + spec_o_name = get_temp_file(output_name, ".spec.o"); + if (opts->force_pointer_size) + strarray_add(spec_args, strmake("-m%u", 8 * opts->force_pointer_size )); + if (opts->pic && !is_pe) strarray_add(spec_args, "-fPIC"); + strarray_add(spec_args, opts->shared ? "--dll" : "--exe"); + if (fake_module) + { + strarray_add(spec_args, "--fake-module"); + strarray_add(spec_args, "-o"); + strarray_add(spec_args, output_file); + } + else + { + strarray_add(spec_args, "-o"); + strarray_add(spec_args, spec_o_name); + } + if (spec_file) + { + strarray_add(spec_args, "-E"); + strarray_add(spec_args, spec_file); + } + + if (!opts->shared) + { + strarray_add(spec_args, "-F"); + strarray_add(spec_args, output_name); + strarray_add(spec_args, "--subsystem"); + strarray_add(spec_args, opts->gui_app ? "windows" : "console"); + if (opts->large_address_aware) strarray_add( spec_args, "--large-address-aware" ); + } + + if (opts->target_platform == PLATFORM_WINDOWS) strarray_add(spec_args, "--safeseh"); + + if (entry_point) + { + strarray_add(spec_args, "--entry"); + strarray_add(spec_args, entry_point); + } + + if (opts->subsystem) + { + strarray_add(spec_args, "--subsystem"); + strarray_add(spec_args, opts->subsystem); + } + + for (i = 0; i < lib_dirs->size; i++) + strarray_add(spec_args, strmake("-L%s", lib_dirs->base[i])); + + if (!is_pe) + { + for (i = 0; i < opts->delayimports->size; i++) + strarray_add(spec_args, strmake("-d%s", opts->delayimports->base[i])); + } + + /* add resource files */ + for (i = 0; i < files->size; i++) + if (files->base[i][1] == 'r') strarray_add(spec_args, files->base[i]); + + /* add other files */ + strarray_add(spec_args, "--"); + for (i = 0; i < files->size; i++) + { + switch(files->base[i][1]) + { + case 'd': + case 'a': + case 'o': + strarray_add(spec_args, files->base[i] + 2); + break; + } + } + + spawn(opts->prefix, spec_args, 0); + strarray_free (spec_args); + return spec_o_name; +} + static void build(struct options* opts) { strarray *lib_dirs, *files; - strarray *spec_args, *link_args, *implib_args, *tool; + strarray *link_args, *implib_args, *tool; char *output_file, *output_path; const char *spec_o_name, *libgcc = NULL; const char *output_name, *spec_file, *lang; @@ -1287,85 +1382,8 @@ static void build(struct options* opts) else entry_point = opts->entry_point; /* run winebuild to generate the .spec.o file */ - spec_args = get_winebuild_args( opts ); - if ((tool = build_tool_name( opts, TOOL_CC ))) strarray_add( spec_args, strmake( "--cc-cmd=%s", strarray_tostring( tool, " " ))); - if (!is_pe && (tool = build_tool_name( opts, TOOL_LD ))) strarray_add( spec_args, strmake( "--ld-cmd=%s", strarray_tostring( tool, " " ))); - - spec_o_name = get_temp_file(output_name, ".spec.o"); - if (opts->force_pointer_size) - strarray_add(spec_args, strmake("-m%u", 8 * opts->force_pointer_size )); - strarray_add(spec_args, "-D_REENTRANT"); - if (opts->pic && !is_pe) strarray_add(spec_args, "-fPIC"); - strarray_add(spec_args, opts->shared ? "--dll" : "--exe"); - if (fake_module) - { - strarray_add(spec_args, "--fake-module"); - strarray_add(spec_args, "-o"); - strarray_add(spec_args, output_file); - } - else - { - strarray_add(spec_args, "-o"); - strarray_add(spec_args, spec_o_name); - } - if (spec_file) - { - strarray_add(spec_args, "-E"); - strarray_add(spec_args, spec_file); - } - - if (!opts->shared) - { - strarray_add(spec_args, "-F"); - strarray_add(spec_args, output_name); - strarray_add(spec_args, "--subsystem"); - strarray_add(spec_args, opts->gui_app ? "windows" : "console"); - if (opts->large_address_aware) strarray_add( spec_args, "--large-address-aware" ); - } - - if (opts->target_platform == PLATFORM_WINDOWS) strarray_add(spec_args, "--safeseh"); + spec_o_name = build_spec_obj( opts, spec_file, output_file, files, lib_dirs, entry_point ); - if (entry_point) - { - strarray_add(spec_args, "--entry"); - strarray_add(spec_args, entry_point); - } - - if (opts->subsystem) - { - strarray_add(spec_args, "--subsystem"); - strarray_add(spec_args, opts->subsystem); - } - - for ( j = 0; j < lib_dirs->size; j++ ) - strarray_add(spec_args, strmake("-L%s", lib_dirs->base[j])); - - if (!is_pe) - { - for (j = 0; j < opts->delayimports->size; j++) - strarray_add(spec_args, strmake("-d%s", opts->delayimports->base[j])); - } - - /* add resource files */ - for ( j = 0; j < files->size; j++ ) - if (files->base[j][1] == 'r') strarray_add(spec_args, files->base[j]); - - /* add other files */ - strarray_add(spec_args, "--"); - for ( j = 0; j < files->size; j++ ) - { - switch(files->base[j][1]) - { - case 'd': - case 'a': - case 'o': - strarray_add(spec_args, files->base[j] + 2); - break; - } - } - - spawn(opts->prefix, spec_args, 0); - strarray_free (spec_args); if (fake_module) return; /* nothing else to do */ /* link everything together now */
1
0
0
0
Zebediah Figura : kernelbase: Return performance data when querying HKEY_PERFORMANCE_(NLS)TEXT as well.
by Alexandre Julliard
11 Aug '21
11 Aug '21
Module: wine Branch: master Commit: a3931375dd44567d79c9179174030e1c28d0c763 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a3931375dd44567d79c91791…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Aug 11 00:20:09 2021 -0500 kernelbase: Return performance data when querying HKEY_PERFORMANCE_(NLS)TEXT as well. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=33037
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/advapi32/tests/registry.c | 134 ++++++++++++----------------------------- dlls/kernelbase/registry.c | 11 +++- 2 files changed, 46 insertions(+), 99 deletions(-) diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index 4da2ce100ab..bccc5706131 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -3700,21 +3700,18 @@ static void test_performance_keys(void) size = 0; ret = RegQueryValueExA(keys[i], names[j], NULL, NULL, NULL, &size); - todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) - ok(ret == ERROR_MORE_DATA, "got %u\n", ret); + ok(ret == ERROR_MORE_DATA, "got %u\n", ret); ok(!size, "got size %u\n", size); size = 10; ret = RegQueryValueExA(keys[i], names[j], NULL, NULL, buffer, &size); - todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) - ok(ret == ERROR_MORE_DATA, "got %u\n", ret); - todo_wine_if (keys[i] == HKEY_PERFORMANCE_DATA) + ok(ret == ERROR_MORE_DATA, "got %u\n", ret); + todo_wine ok(size == 10, "got size %u\n", size); size = buffer_size; ret = RegQueryValueExA(keys[i], names[j], NULL, NULL, NULL, &size); - todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) - ok(ret == ERROR_MORE_DATA, "got %u\n", ret); + ok(ret == ERROR_MORE_DATA, "got %u\n", ret); QueryPerformanceCounter(&perftime1); NtQuerySystemTime(&systime1); @@ -3722,18 +3719,9 @@ static void test_performance_keys(void) size = buffer_size; type = 0xdeadbeef; ret = RegQueryValueExA(keys[i], names[j], NULL, &type, buffer, &size); - todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) - { - ok(!ret, "got %u\n", ret); - ok(type == REG_BINARY, "got type %u\n", type); - ok(size >= sizeof(PERF_DATA_BLOCK) && size < buffer_size, "got size %u\n", size); - } - - if (ret) - { - winetest_pop_context(); - continue; - } + ok(!ret, "got %u\n", ret); + ok(type == REG_BINARY, "got type %u\n", type); + ok(size >= sizeof(PERF_DATA_BLOCK) && size < buffer_size, "got size %u\n", size); QueryPerformanceCounter(&perftime2); NtQuerySystemTime(&systime2); @@ -3785,129 +3773,81 @@ static void test_performance_keys(void) size = 0xdeadbeef; ret = RegQueryValueExA(keys[i], "cOuNtEr", NULL, NULL, NULL, &size); - todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) - { - ok(!ret, "got %u\n", ret); - ok(size > 0 && size < 0xdeadbeef, "got size %u\n", size); - } + ok(!ret, "got %u\n", ret); + ok(size > 0 && size < 0xdeadbeef, "got size %u\n", size); type = 0xdeadbeef; size = 0; ret = RegQueryValueExA(keys[i], "cOuNtEr", NULL, &type, buffer, &size); - todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) - { - ok(ret == ERROR_MORE_DATA, "got %u\n", ret); - ok(size > 0, "got size %u\n", size); - } + ok(ret == ERROR_MORE_DATA, "got %u\n", ret); + ok(size > 0, "got size %u\n", size); type = 0xdeadbeef; size = buffer_size; ret = RegQueryValueExA(keys[i], "cOuNtEr", NULL, &type, buffer, &size); - todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) - { - ok(!ret, "got %u\n", ret); - ok(type == REG_MULTI_SZ, "got type %u\n", type); - } - if (type == REG_MULTI_SZ) - test_counter_values(buffer, keys[i]); + ok(!ret, "got %u\n", ret); + ok(type == REG_MULTI_SZ, "got type %u\n", type); + test_counter_values(buffer, keys[i]); type = 0xdeadbeef; size = buffer_size; ret = RegQueryValueExA(keys[i], "cOuNtErwine", NULL, &type, buffer, &size); - todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) - { - ok(!ret, "got %u\n", ret); - ok(type == REG_MULTI_SZ, "got type %u\n", type); - } - if (type == REG_MULTI_SZ) - test_counter_values(buffer, keys[i]); + ok(!ret, "got %u\n", ret); + ok(type == REG_MULTI_SZ, "got type %u\n", type); + test_counter_values(buffer, keys[i]); size = 0; ret = RegQueryValueExW(keys[i], L"cOuNtEr", NULL, NULL, NULL, &size); - todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) - { - ok(!ret, "got %u\n", ret); - ok(size > 0, "got size %u\n", size); - } + ok(!ret, "got %u\n", ret); + ok(size > 0, "got size %u\n", size); bufferW = malloc(size); type = 0xdeadbeef; ret = RegQueryValueExW(keys[i], L"cOuNtEr", NULL, &type, bufferW, &size); - todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) - { - ok(!ret, "got %u\n", ret); - ok(type == REG_MULTI_SZ, "got type %u\n", type); - } - if (type == REG_MULTI_SZ) - { - WideCharToMultiByte(CP_ACP, 0, bufferW, size / sizeof(WCHAR), buffer, buffer_size, NULL, NULL); - test_counter_values(buffer, keys[i]); - } + ok(!ret, "got %u\n", ret); + ok(type == REG_MULTI_SZ, "got type %u\n", type); + WideCharToMultiByte(CP_ACP, 0, bufferW, size / sizeof(WCHAR), buffer, buffer_size, NULL, NULL); + test_counter_values(buffer, keys[i]); /* test the "Help" value */ size = 0xdeadbeef; ret = RegQueryValueExA(keys[i], "hElP", NULL, NULL, NULL, &size); - todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) - { - ok(!ret, "got %u\n", ret); - ok(size > 0 && size < 0xdeadbeef, "got size %u\n", size); - } + ok(!ret, "got %u\n", ret); + ok(size > 0 && size < 0xdeadbeef, "got size %u\n", size); type = 0xdeadbeef; size = 0; ret = RegQueryValueExA(keys[i], "hElP", NULL, &type, buffer, &size); - todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) - { - ok(ret == ERROR_MORE_DATA, "got %u\n", ret); - ok(size > 0, "got size %u\n", size); - } + ok(ret == ERROR_MORE_DATA, "got %u\n", ret); + ok(size > 0, "got size %u\n", size); type = 0xdeadbeef; size = buffer_size; ret = RegQueryValueExA(keys[i], "hElP", NULL, &type, buffer, &size); - todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) - { - ok(!ret, "got %u\n", ret); - ok(type == REG_MULTI_SZ, "got type %u\n", type); - } - if (type == REG_MULTI_SZ) - test_help_values(buffer, keys[i]); + test_help_values(buffer, keys[i]); type = 0xdeadbeef; size = buffer_size; ret = RegQueryValueExA(keys[i], "hElPwine", NULL, &type, buffer, &size); - todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) - { - ok(!ret, "got %u\n", ret); - ok(type == REG_MULTI_SZ, "got type %u\n", type); - } - if (type == REG_MULTI_SZ) - test_help_values(buffer, keys[i]); + ok(!ret, "got %u\n", ret); + ok(type == REG_MULTI_SZ, "got type %u\n", type); + test_help_values(buffer, keys[i]); size = 0; ret = RegQueryValueExW(keys[i], L"hElP", NULL, NULL, NULL, &size); - todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) - { - ok(!ret, "got %u\n", ret); - ok(size > 0, "got size %u\n", size); - } + ok(!ret, "got %u\n", ret); + ok(size > 0, "got size %u\n", size); bufferW = malloc(size); type = 0xdeadbeef; ret = RegQueryValueExW(keys[i], L"hElP", NULL, &type, bufferW, &size); - todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) - { - ok(!ret, "got %u\n", ret); - ok(type == REG_MULTI_SZ, "got type %u\n", type); - } - if (type == REG_MULTI_SZ) - { - WideCharToMultiByte(CP_ACP, 0, bufferW, size / sizeof(WCHAR), buffer, buffer_size, NULL, NULL); - test_help_values(buffer, keys[i]); - } + ok(!ret, "got %u\n", ret); + ok(type == REG_MULTI_SZ, "got type %u\n", type); + WideCharToMultiByte(CP_ACP, 0, bufferW, size / sizeof(WCHAR), buffer, buffer_size, NULL, NULL); + test_help_values(buffer, keys[i]); /* test other registry APIs */ diff --git a/dlls/kernelbase/registry.c b/dlls/kernelbase/registry.c index c3d5cdbc6e0..a8f0643e8bf 100644 --- a/dlls/kernelbase/registry.c +++ b/dlls/kernelbase/registry.c @@ -354,6 +354,13 @@ static inline HKEY get_special_root_hkey( HKEY hkey, REGSAM access ) } } +static BOOL is_perf_key( HKEY key ) +{ + return HandleToUlong(key) == HandleToUlong(HKEY_PERFORMANCE_DATA) + || HandleToUlong(key) == HandleToUlong(HKEY_PERFORMANCE_TEXT) + || HandleToUlong(key) == HandleToUlong(HKEY_PERFORMANCE_NLSTEXT); +} + /****************************************************************************** * RemapPredefinedHandleInternal (kernelbase.@) @@ -1526,7 +1533,7 @@ LSTATUS WINAPI DECLSPEC_HOTPATCH RegQueryValueExW( HKEY hkey, LPCWSTR name, LPDW if ((data && !count) || reserved) return ERROR_INVALID_PARAMETER; - if (hkey == HKEY_PERFORMANCE_DATA) + if (is_perf_key( hkey )) return query_perf_data( name, type, data, count, TRUE ); if (!(hkey = get_special_root_hkey( hkey, 0 ))) return ERROR_INVALID_HANDLE; @@ -1632,7 +1639,7 @@ LSTATUS WINAPI DECLSPEC_HOTPATCH RegQueryValueExA( HKEY hkey, LPCSTR name, LPDWO if ((status = RtlAnsiStringToUnicodeString( &nameW, &nameA, TRUE ))) return RtlNtStatusToDosError(status); - if (hkey == HKEY_PERFORMANCE_DATA) + if (is_perf_key( hkey )) { DWORD ret = query_perf_data( nameW.Buffer, type, data, count, FALSE ); RtlFreeUnicodeString( &nameW );
1
0
0
0
Zebediah Figura : kernelbase: Implement reading performance counter help strings.
by Alexandre Julliard
11 Aug '21
11 Aug '21
Module: wine Branch: master Commit: aa99608dfac51239f62b971d40a813b5ae80e70b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aa99608dfac51239f62b971d…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Aug 11 00:20:08 2021 -0500 kernelbase: Implement reading performance counter help strings. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/advapi32/tests/registry.c | 18 ++++++++++++------ dlls/kernelbase/registry.c | 23 +++++++++++++++++++++++ 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index 811117beadc..4da2ce100ab 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -3849,7 +3849,7 @@ static void test_performance_keys(void) size = 0xdeadbeef; ret = RegQueryValueExA(keys[i], "hElP", NULL, NULL, NULL, &size); - todo_wine + todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) { ok(!ret, "got %u\n", ret); ok(size > 0 && size < 0xdeadbeef, "got size %u\n", size); @@ -3859,15 +3859,19 @@ static void test_performance_keys(void) size = 0; ret = RegQueryValueExA(keys[i], "hElP", NULL, &type, buffer, &size); todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) + { ok(ret == ERROR_MORE_DATA, "got %u\n", ret); - todo_wine ok(size > 0, "got size %u\n", size); + ok(size > 0, "got size %u\n", size); + } type = 0xdeadbeef; size = buffer_size; ret = RegQueryValueExA(keys[i], "hElP", NULL, &type, buffer, &size); todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) + { ok(!ret, "got %u\n", ret); - todo_wine ok(type == REG_MULTI_SZ, "got type %u\n", type); + ok(type == REG_MULTI_SZ, "got type %u\n", type); + } if (type == REG_MULTI_SZ) test_help_values(buffer, keys[i]); @@ -3875,14 +3879,16 @@ static void test_performance_keys(void) size = buffer_size; ret = RegQueryValueExA(keys[i], "hElPwine", NULL, &type, buffer, &size); todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) + { ok(!ret, "got %u\n", ret); - todo_wine ok(type == REG_MULTI_SZ, "got type %u\n", type); + ok(type == REG_MULTI_SZ, "got type %u\n", type); + } if (type == REG_MULTI_SZ) test_help_values(buffer, keys[i]); size = 0; ret = RegQueryValueExW(keys[i], L"hElP", NULL, NULL, NULL, &size); - todo_wine + todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) { ok(!ret, "got %u\n", ret); ok(size > 0, "got size %u\n", size); @@ -3892,7 +3898,7 @@ static void test_performance_keys(void) type = 0xdeadbeef; ret = RegQueryValueExW(keys[i], L"hElP", NULL, &type, bufferW, &size); - todo_wine + todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) { ok(!ret, "got %u\n", ret); ok(type == REG_MULTI_SZ, "got type %u\n", type); diff --git a/dlls/kernelbase/registry.c b/dlls/kernelbase/registry.c index 31698cb0948..c3d5cdbc6e0 100644 --- a/dlls/kernelbase/registry.c +++ b/dlls/kernelbase/registry.c @@ -1225,6 +1225,27 @@ static DWORD query_perf_names( DWORD *type, void *data, DWORD *ret_size, BOOL un return ERROR_SUCCESS; } +/* FIXME: we should read data from system32/perf009h.dat (or perf###h depending + * on locale) instead */ +static DWORD query_perf_help( DWORD *type, void *data, DWORD *ret_size, BOOL unicode ) +{ + static const WCHAR names[] = L"1847\0End Marker\0"; + DWORD size = *ret_size; + + if (type) *type = REG_MULTI_SZ; + *ret_size = sizeof(names); + if (!unicode) *ret_size /= sizeof(WCHAR); + + if (!data) return ERROR_SUCCESS; + if (size < *ret_size) return ERROR_MORE_DATA; + + if (unicode) + memcpy( data, names, sizeof(names) ); + else + RtlUnicodeToMultiByteN( data, size, NULL, names, sizeof(names) ); + return ERROR_SUCCESS; +} + struct perf_provider { HMODULE perflib; @@ -1370,6 +1391,8 @@ static DWORD query_perf_data( const WCHAR *query, DWORD *type, void *data, DWORD if (!wcsnicmp( query, L"counter", 7 )) return query_perf_names( type, data, ret_size, unicode ); + if (!wcsnicmp( query, L"help", 4 )) + return query_perf_help( type, data, ret_size, unicode ); data_size = *ret_size; *ret_size = 0;
1
0
0
0
Zebediah Figura : kernelbase: Implement reading performance counter name strings.
by Alexandre Julliard
11 Aug '21
11 Aug '21
Module: wine Branch: master Commit: aaf66e57de36749b77571759b7386a791e0789a0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aaf66e57de36749b77571759…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Aug 11 00:20:07 2021 -0500 kernelbase: Implement reading performance counter name strings. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/advapi32/tests/registry.c | 18 ++++++++++++------ dlls/kernelbase/registry.c | 30 +++++++++++++++++++++++++++--- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index 3f3d7a4ac7a..811117beadc 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -3785,7 +3785,7 @@ static void test_performance_keys(void) size = 0xdeadbeef; ret = RegQueryValueExA(keys[i], "cOuNtEr", NULL, NULL, NULL, &size); - todo_wine + todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) { ok(!ret, "got %u\n", ret); ok(size > 0 && size < 0xdeadbeef, "got size %u\n", size); @@ -3795,15 +3795,19 @@ static void test_performance_keys(void) size = 0; ret = RegQueryValueExA(keys[i], "cOuNtEr", NULL, &type, buffer, &size); todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) + { ok(ret == ERROR_MORE_DATA, "got %u\n", ret); - todo_wine ok(size > 0, "got size %u\n", size); + ok(size > 0, "got size %u\n", size); + } type = 0xdeadbeef; size = buffer_size; ret = RegQueryValueExA(keys[i], "cOuNtEr", NULL, &type, buffer, &size); todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) + { ok(!ret, "got %u\n", ret); - todo_wine ok(type == REG_MULTI_SZ, "got type %u\n", type); + ok(type == REG_MULTI_SZ, "got type %u\n", type); + } if (type == REG_MULTI_SZ) test_counter_values(buffer, keys[i]); @@ -3811,14 +3815,16 @@ static void test_performance_keys(void) size = buffer_size; ret = RegQueryValueExA(keys[i], "cOuNtErwine", NULL, &type, buffer, &size); todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) + { ok(!ret, "got %u\n", ret); - todo_wine ok(type == REG_MULTI_SZ, "got type %u\n", type); + ok(type == REG_MULTI_SZ, "got type %u\n", type); + } if (type == REG_MULTI_SZ) test_counter_values(buffer, keys[i]); size = 0; ret = RegQueryValueExW(keys[i], L"cOuNtEr", NULL, NULL, NULL, &size); - todo_wine + todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) { ok(!ret, "got %u\n", ret); ok(size > 0, "got size %u\n", size); @@ -3828,7 +3834,7 @@ static void test_performance_keys(void) type = 0xdeadbeef; ret = RegQueryValueExW(keys[i], L"cOuNtEr", NULL, &type, bufferW, &size); - todo_wine + todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) { ok(!ret, "got %u\n", ret); ok(type == REG_MULTI_SZ, "got type %u\n", type); diff --git a/dlls/kernelbase/registry.c b/dlls/kernelbase/registry.c index 3a551ecbec5..31698cb0948 100644 --- a/dlls/kernelbase/registry.c +++ b/dlls/kernelbase/registry.c @@ -1204,6 +1204,27 @@ LONG WINAPI RegSetKeyValueA( HKEY hkey, LPCSTR subkey, LPCSTR name, DWORD type, return ret; } +/* FIXME: we should read data from system32/perf009c.dat (or perf###c depending + * on locale) instead */ +static DWORD query_perf_names( DWORD *type, void *data, DWORD *ret_size, BOOL unicode ) +{ + static const WCHAR names[] = L"1\0" "1847\0" "1846\0End Marker\0"; + DWORD size = *ret_size; + + if (type) *type = REG_MULTI_SZ; + *ret_size = sizeof(names); + if (!unicode) *ret_size /= sizeof(WCHAR); + + if (!data) return ERROR_SUCCESS; + if (size < *ret_size) return ERROR_MORE_DATA; + + if (unicode) + memcpy( data, names, sizeof(names) ); + else + RtlUnicodeToMultiByteN( data, size, NULL, names, sizeof(names) ); + return ERROR_SUCCESS; +} + struct perf_provider { HMODULE perflib; @@ -1338,7 +1359,7 @@ static DWORD collect_data(struct perf_provider *provider, const WCHAR *query, vo #define MAX_SERVICE_NAME 260 -static DWORD query_perf_data(const WCHAR *query, DWORD *type, void *data, DWORD *ret_size) +static DWORD query_perf_data( const WCHAR *query, DWORD *type, void *data, DWORD *ret_size, BOOL unicode ) { DWORD err, i, data_size; HKEY root; @@ -1347,6 +1368,9 @@ static DWORD query_perf_data(const WCHAR *query, DWORD *type, void *data, DWORD if (!ret_size) return ERROR_INVALID_PARAMETER; + if (!wcsnicmp( query, L"counter", 7 )) + return query_perf_names( type, data, ret_size, unicode ); + data_size = *ret_size; *ret_size = 0; @@ -1480,7 +1504,7 @@ LSTATUS WINAPI DECLSPEC_HOTPATCH RegQueryValueExW( HKEY hkey, LPCWSTR name, LPDW if ((data && !count) || reserved) return ERROR_INVALID_PARAMETER; if (hkey == HKEY_PERFORMANCE_DATA) - return query_perf_data(name, type, data, count); + return query_perf_data( name, type, data, count, TRUE ); if (!(hkey = get_special_root_hkey( hkey, 0 ))) return ERROR_INVALID_HANDLE; @@ -1587,7 +1611,7 @@ LSTATUS WINAPI DECLSPEC_HOTPATCH RegQueryValueExA( HKEY hkey, LPCSTR name, LPDWO if (hkey == HKEY_PERFORMANCE_DATA) { - DWORD ret = query_perf_data( nameW.Buffer, type, data, count ); + DWORD ret = query_perf_data( nameW.Buffer, type, data, count, FALSE ); RtlFreeUnicodeString( &nameW ); return ret; }
1
0
0
0
Zebediah Figura : kernelbase: Do not map HKEY_PERFORMANCE_DATA to \Registry\PerfData.
by Alexandre Julliard
11 Aug '21
11 Aug '21
Module: wine Branch: master Commit: a8367f1d53c0f2b9b83cbbc3d207a2aa5ca63f67 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a8367f1d53c0f2b9b83cbbc3…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Aug 11 00:20:06 2021 -0500 kernelbase: Do not map HKEY_PERFORMANCE_DATA to \Registry\PerfData. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/advapi32/tests/registry.c | 23 +++++++++-------------- dlls/advapi32/tests/security.c | 2 +- dlls/kernelbase/registry.c | 31 +++++++++++++++++++------------ 3 files changed, 29 insertions(+), 27 deletions(-) diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index 7e1348bf33d..3f3d7a4ac7a 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -3903,26 +3903,21 @@ static void test_performance_keys(void) todo_wine ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); ret = RegOpenKeyA(keys[i], "Global", &key); - todo_wine_if (keys[i] == HKEY_PERFORMANCE_DATA) - ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); + ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); ret = RegOpenKeyExA(keys[i], "Global", 0, KEY_READ, &key); - todo_wine_if (keys[i] == HKEY_PERFORMANCE_DATA) - ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); + ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); size = 0; ret = RegQueryValueA(keys[i], "Global", NULL, (LONG *)&size); - todo_wine_if (keys[i] == HKEY_PERFORMANCE_DATA) - ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); + ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); ret = RegSetValueA(keys[i], "Global", REG_SZ, "dummy", 5); - todo_wine_if (keys[i] == HKEY_PERFORMANCE_DATA) - ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); + ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); ret = RegQueryInfoKeyA(keys[i], NULL, NULL, NULL, &key_count, NULL, NULL, &value_count, NULL, NULL, NULL, NULL); - todo_wine_if (keys[i] != HKEY_PERFORMANCE_DATA) - ok(!ret, "got %u\n", ret); + todo_wine ok(!ret, "got %u\n", ret); todo_wine ok(!key_count, "got %u subkeys\n", key_count); todo_wine ok(value_count == 2, "got %u values\n", value_count); @@ -3941,7 +3936,7 @@ static void test_performance_keys(void) } ret = RegSetValueExA(HKEY_PERFORMANCE_DATA, "Global", 0, REG_SZ, (const BYTE *)"dummy", 5); - todo_wine ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); + ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); ret = RegSetValueExA(HKEY_PERFORMANCE_TEXT, "Global", 0, REG_SZ, (const BYTE *)"dummy", 5); todo_wine ok(ret == ERROR_BADKEY, "got %u\n", ret); @@ -3952,7 +3947,7 @@ static void test_performance_keys(void) if (pRegSetKeyValueW) { ret = pRegSetKeyValueW(HKEY_PERFORMANCE_DATA, NULL, L"Global", REG_SZ, L"dummy", 10); - todo_wine ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); + ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); ret = pRegSetKeyValueW(HKEY_PERFORMANCE_TEXT, NULL, L"Global", REG_SZ, L"dummy", 10); todo_wine ok(ret == ERROR_BADKEY, "got %u\n", ret); @@ -3962,7 +3957,7 @@ static void test_performance_keys(void) } ret = RegEnumKeyA(HKEY_PERFORMANCE_DATA, 0, buffer, buffer_size); - todo_wine ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); + ok(ret == ERROR_INVALID_HANDLE, "got %u\n", ret); ret = RegEnumKeyA(HKEY_PERFORMANCE_TEXT, 0, buffer, buffer_size); todo_wine ok(ret == ERROR_NO_MORE_ITEMS, "got %u\n", ret); @@ -4101,7 +4096,7 @@ static void test_perflib_key(void) RtlInitUnicodeString(&string, L"\\Registry\\PerfData"); InitializeObjectAttributes(&attr, &string, OBJ_CASE_INSENSITIVE, NULL, NULL); ret = NtOpenKey((HANDLE *)&key, KEY_READ, &attr); - todo_wine ok(ret == STATUS_OBJECT_NAME_NOT_FOUND, "got %#x\n", ret); + ok(ret == STATUS_OBJECT_NAME_NOT_FOUND, "got %#x\n", ret); free(buffer); } diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index d32bf27bd83..c73e28a98e6 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -7948,7 +7948,7 @@ static void test_pseudo_handle_security(void) ret = GetSecurityInfo(keys[i], SE_REGISTRY_KEY, DACL_SECURITY_INFORMATION, NULL, NULL, NULL, NULL, &sd_ptr); if (keys[i] == HKEY_PERFORMANCE_DATA) - todo_wine ok(ret == ERROR_INVALID_HANDLE, "key %p: got error %u\n", keys[i], ret); + ok(ret == ERROR_INVALID_HANDLE, "key %p: got error %u\n", keys[i], ret); else if (keys[i] == HKEY_DYN_DATA) todo_wine ok(ret == ERROR_CALL_NOT_IMPLEMENTED || broken(ret == ERROR_INVALID_HANDLE) /* <7 */, "key %p: got error %u\n", keys[i], ret); diff --git a/dlls/kernelbase/registry.c b/dlls/kernelbase/registry.c index d9d62e81b31..3a551ecbec5 100644 --- a/dlls/kernelbase/registry.c +++ b/dlls/kernelbase/registry.c @@ -56,7 +56,7 @@ static const WCHAR * const root_key_names[] = NULL, /* HKEY_CURRENT_USER is determined dynamically */ L"\\Registry\\Machine", L"\\Registry\\User", - L"\\Registry\\PerfData", + NULL, /* HKEY_PERFORMANCE_DATA is not a real key */ L"\\Registry\\Machine\\System\\CurrentControlSet\\Hardware Profiles\\Current", L"\\Registry\\DynData" }; @@ -330,21 +330,28 @@ static HKEY create_special_root_hkey( HKEY hkey, DWORD access ) /* map the hkey from special root to normal key if necessary */ static inline HKEY get_special_root_hkey( HKEY hkey, REGSAM access ) { - HKEY ret = hkey; + unsigned int index = HandleToUlong(hkey) - HandleToUlong(HKEY_SPECIAL_ROOT_FIRST); + DWORD wow64_flags = access & (KEY_WOW64_32KEY | KEY_WOW64_64KEY); - if ((HandleToUlong(hkey) >= HandleToUlong(HKEY_SPECIAL_ROOT_FIRST)) - && (HandleToUlong(hkey) <= HandleToUlong(HKEY_SPECIAL_ROOT_LAST))) + switch (HandleToUlong(hkey)) { - REGSAM mask = 0; + case (LONG)(LONG_PTR)HKEY_CLASSES_ROOT: + if (wow64_flags) + return create_special_root_hkey( hkey, MAXIMUM_ALLOWED | wow64_flags ); + /* fall through */ - if (HandleToUlong(hkey) == HandleToUlong(HKEY_CLASSES_ROOT)) - mask = KEY_WOW64_32KEY | KEY_WOW64_64KEY; + case (LONG)(LONG_PTR)HKEY_CURRENT_USER: + case (LONG)(LONG_PTR)HKEY_LOCAL_MACHINE: + case (LONG)(LONG_PTR)HKEY_USERS: + case (LONG)(LONG_PTR)HKEY_CURRENT_CONFIG: + case (LONG)(LONG_PTR)HKEY_DYN_DATA: + if (special_root_keys[index]) + return special_root_keys[index]; + return create_special_root_hkey( hkey, MAXIMUM_ALLOWED ); - if ((access & mask) || - !(ret = special_root_keys[HandleToUlong(hkey) - HandleToUlong(HKEY_SPECIAL_ROOT_FIRST)])) - ret = create_special_root_hkey( hkey, MAXIMUM_ALLOWED | (access & mask) ); + default: + return hkey; } - return ret; } @@ -1565,7 +1572,7 @@ LSTATUS WINAPI DECLSPEC_HOTPATCH RegQueryValueExA( HKEY hkey, LPCSTR name, LPDWO hkey, debugstr_a(name), reserved, type, data, count, count ? *count : 0 ); if ((data && !count) || reserved) return ERROR_INVALID_PARAMETER; - if (hkey != HKEY_PERFORMANCE_DATA && !(hkey = get_special_root_hkey( hkey, 0 ))) + if (!(hkey = get_special_root_hkey( hkey, 0 ))) return ERROR_INVALID_HANDLE; if (count) datalen = *count;
1
0
0
0
Zebediah Figura : advapi32/tests: Expand tests for performance keys.
by Alexandre Julliard
11 Aug '21
11 Aug '21
Module: wine Branch: master Commit: 7817238a8760da5d43968cee02dd36b202d69c69 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7817238a8760da5d43968cee…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Aug 11 00:20:05 2021 -0500 advapi32/tests: Expand tests for performance keys. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/advapi32/tests/registry.c | 517 +++++++++++++++++++++++++++-------------- 1 file changed, 338 insertions(+), 179 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=7817238a8760da5d4396…
1
0
0
0
Zebediah Figura : vkd3d-shader: Lower SUB to NEG + ADD at parse time.
by Alexandre Julliard
11 Aug '21
11 Aug '21
Module: vkd3d Branch: master Commit: 6e3bdb17dcbc6e4973d698328170fe75ec6de922 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=6e3bdb17dcbc6e4973d6983…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Mon Aug 9 21:56:19 2021 -0500 vkd3d-shader: Lower SUB to NEG + ADD at parse time. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d-shader/hlsl.c | 1 - libs/vkd3d-shader/hlsl.h | 1 - libs/vkd3d-shader/hlsl.y | 20 ++++++++++++++++++-- libs/vkd3d-shader/hlsl_sm1.c | 4 ---- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c index d0be075..e407057 100644 --- a/libs/vkd3d-shader/hlsl.c +++ b/libs/vkd3d-shader/hlsl.c @@ -1062,7 +1062,6 @@ static const char *debug_expr_op(const struct hlsl_ir_expr *expr) "sat", "+", - "-", "*", "/", diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h index e566ac7..3b0e520 100644 --- a/libs/vkd3d-shader/hlsl.h +++ b/libs/vkd3d-shader/hlsl.h @@ -302,7 +302,6 @@ enum hlsl_ir_expr_op HLSL_IR_UNOP_SAT, HLSL_IR_BINOP_ADD, - HLSL_IR_BINOP_SUB, HLSL_IR_BINOP_MUL, HLSL_IR_BINOP_DIV, diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 34cdb54..2754514 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -1118,7 +1118,7 @@ static enum hlsl_ir_expr_op op_from_assignment(enum parse_assign_op op) { 0, HLSL_IR_BINOP_ADD, - HLSL_IR_BINOP_SUB, + 0, HLSL_IR_BINOP_MUL, HLSL_IR_BINOP_DIV, HLSL_IR_BINOP_MOD, @@ -1176,12 +1176,23 @@ static struct hlsl_ir_node *add_assignment(struct hlsl_ctx *ctx, struct list *in struct hlsl_ir_expr *copy; DWORD writemask = 0; + if (assign_op == ASSIGN_OP_SUB) + { + struct hlsl_ir_node *args[3] = {rhs}; + struct hlsl_ir_expr *expr; + + if (!(expr = add_expr(ctx, instrs, HLSL_IR_UNOP_NEG, args, &rhs->loc))) + return NULL; + rhs = &expr->node; + assign_op = ASSIGN_OP_ADD; + } if (assign_op != ASSIGN_OP_ASSIGN) { enum hlsl_ir_expr_op op = op_from_assignment(assign_op); struct hlsl_ir_node *args[3] = {lhs, rhs}; struct hlsl_ir_expr *expr; + assert(op); if (!(expr = add_expr(ctx, instrs, op, args, &rhs->loc))) return NULL; rhs = &expr->node; @@ -2909,7 +2920,12 @@ add_expr: } | add_expr '-' mul_expr { - $$ = add_binary_expr(ctx, $1, $3, HLSL_IR_BINOP_SUB, @2); + struct hlsl_ir_node *neg; + + if (!(neg = hlsl_new_unary_expr(ctx, HLSL_IR_UNOP_NEG, node_from_list($3), @2))) + YYABORT; + list_add_tail($3, &neg->entry); + $$ = add_binary_expr(ctx, $1, $3, HLSL_IR_BINOP_ADD, @2); } shift_expr: diff --git a/libs/vkd3d-shader/hlsl_sm1.c b/libs/vkd3d-shader/hlsl_sm1.c index ca02f01..8ea663d 100644 --- a/libs/vkd3d-shader/hlsl_sm1.c +++ b/libs/vkd3d-shader/hlsl_sm1.c @@ -620,10 +620,6 @@ static void write_sm1_expr(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *b write_sm1_binary_op(ctx, buffer, D3DSIO_MUL, &instr->reg, &arg1->reg, &arg2->reg); break; - case HLSL_IR_BINOP_SUB: - write_sm1_binary_op(ctx, buffer, D3DSIO_SUB, &instr->reg, &arg1->reg, &arg2->reg); - break; - case HLSL_IR_UNOP_NEG: write_sm1_unary_op(ctx, buffer, D3DSIO_MOV, &instr->reg, &arg1->reg, D3DSPSM_NEG); break;
1
0
0
0
Zebediah Figura : vkd3d-shader: Introduce vkd3d_make_u{16, 32}() helpers.
by Alexandre Julliard
11 Aug '21
11 Aug '21
Module: vkd3d Branch: master Commit: ed7cdb3940455fa8d59ac4097173c6562e753f69 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=ed7cdb3940455fa8d59ac40…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Mon Aug 9 21:56:18 2021 -0500 vkd3d-shader: Introduce vkd3d_make_u{16, 32}() helpers. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/private/vkd3d_common.h | 11 +++++++++++ libs/vkd3d-shader/checksum.c | 3 +-- libs/vkd3d-shader/hlsl_sm1.c | 10 +++++----- libs/vkd3d-shader/spirv.c | 2 +- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/include/private/vkd3d_common.h b/include/private/vkd3d_common.h index 0e76aea..49f2b4d 100644 --- a/include/private/vkd3d_common.h +++ b/include/private/vkd3d_common.h @@ -26,6 +26,7 @@ #include <ctype.h> #include <limits.h> #include <stdbool.h> +#include <stdint.h> #ifdef _MSC_VER #include <intrin.h> @@ -145,6 +146,16 @@ static inline bool vkd3d_bound_range(size_t start, size_t count, size_t limit) #endif } +static inline uint16_t vkd3d_make_u16(uint8_t low, uint8_t high) +{ + return low | ((uint16_t)high << 8); +} + +static inline uint32_t vkd3d_make_u32(uint16_t low, uint16_t high) +{ + return low | ((uint32_t)high << 16); +} + static inline int ascii_isupper(int c) { return 'A' <= c && c <= 'Z'; diff --git a/libs/vkd3d-shader/checksum.c b/libs/vkd3d-shader/checksum.c index b9a7140..0910729 100644 --- a/libs/vkd3d-shader/checksum.c +++ b/libs/vkd3d-shader/checksum.c @@ -156,8 +156,7 @@ static void byte_reverse(unsigned char *buf, unsigned longs) do { - t = ((unsigned)buf[3] << 8 | buf[2]) << 16 | - ((unsigned)buf[1] << 8 | buf[0]); + t = vkd3d_make_u32(vkd3d_make_u16(buf[0], buf[1]), vkd3d_make_u16(buf[2], buf[3])); *(unsigned int *)buf = t; buf += 4; } while (--longs); diff --git a/libs/vkd3d-shader/hlsl_sm1.c b/libs/vkd3d-shader/hlsl_sm1.c index 6f9df65..ca02f01 100644 --- a/libs/vkd3d-shader/hlsl_sm1.c +++ b/libs/vkd3d-shader/hlsl_sm1.c @@ -268,9 +268,9 @@ static void write_sm1_type(struct vkd3d_bytecode_buffer *buffer, struct hlsl_typ } } - type->bytecode_offset = put_u32(buffer, sm1_class(type) | (sm1_base_type(type) << 16)); - put_u32(buffer, type->dimy | (type->dimx << 16)); - put_u32(buffer, array_size | (field_count << 16)); + type->bytecode_offset = put_u32(buffer, vkd3d_make_u32(sm1_class(type), sm1_base_type(type))); + put_u32(buffer, vkd3d_make_u32(type->dimy, type->dimx)); + put_u32(buffer, vkd3d_make_u32(array_size, field_count)); put_u32(buffer, fields_offset); } @@ -352,7 +352,7 @@ static void write_sm1_uniforms(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffe if (!var->semantic.name && var->reg.allocated) { put_u32(buffer, 0); /* name */ - put_u32(buffer, D3DXRS_FLOAT4 | (var->reg.id << 16)); + put_u32(buffer, vkd3d_make_u32(D3DXRS_FLOAT4, var->reg.id)); put_u32(buffer, var->data_type->reg_size / 4); put_u32(buffer, 0); /* type */ put_u32(buffer, 0); /* FIXME: default value */ @@ -381,7 +381,7 @@ static void write_sm1_uniforms(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffe set_u32(buffer, creator_offset, offset - ctab_start); ctab_end = bytecode_get_size(buffer); - set_u32(buffer, size_offset, D3DSIO_COMMENT | (((ctab_end - ctab_offset) / sizeof(uint32_t)) << 16)); + set_u32(buffer, size_offset, vkd3d_make_u32(D3DSIO_COMMENT, (ctab_end - ctab_offset) / sizeof(uint32_t))); } static uint32_t sm1_encode_register_type(D3DSHADER_PARAM_REGISTER_TYPE type) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 5729ea1..4e67af4 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -215,7 +215,7 @@ static enum vkd3d_shader_input_sysval_semantic vkd3d_siv_from_sysval(enum vkd3d_ #define VKD3D_SPIRV_VERSION 0x00010000 #define VKD3D_SPIRV_GENERATOR_ID 18 #define VKD3D_SPIRV_GENERATOR_VERSION 2 -#define VKD3D_SPIRV_GENERATOR_MAGIC ((VKD3D_SPIRV_GENERATOR_ID << 16) | VKD3D_SPIRV_GENERATOR_VERSION) +#define VKD3D_SPIRV_GENERATOR_MAGIC vkd3d_make_u32(VKD3D_SPIRV_GENERATOR_VERSION, VKD3D_SPIRV_GENERATOR_ID) struct vkd3d_spirv_stream {
1
0
0
0
← Newer
1
...
68
69
70
71
72
73
74
...
106
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
Results per page:
10
25
50
100
200