[Bug 52787] New: Invalid function prototype for "RegisterUserApiHook" when compiling for C++
https://bugs.winehq.org/show_bug.cgi?id=52787 Bug ID: 52787 Summary: Invalid function prototype for "RegisterUserApiHook" when compiling for C++ Product: Wine Version: 7.5 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: tayarani(a)google.com Distribution: --- This change added a function prototype which does not compile in C++: https://source.winehq.org/git/wine.git/blobdiff/e02a7e579cc48079d70f2ef00957... This is invalid C++ syntax as "new" is a reserved keyword: WINUSERAPI BOOL WINAPI RegisterUserApiHook(const struct user_api_hook *new, struct user_api_hook *old); This is what the compiler generates: "error: invalid parameter name: 'new' is a keyword" This means any C++ code trying to include "windows.h" will fail with that error. The fix is fairly simple. That line should be changed to this to fix it: WINUSERAPI BOOL WINAPI RegisterUserApiHook(const struct user_api_hook *new_hook, struct user_api_hook *old_hook); (i.e., rename the variable). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52787 Zhiyi Zhang <zzhang(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |zzhang(a)codeweavers.com Ever confirmed|0 |1 --- Comment #1 from Zhiyi Zhang <zzhang(a)codeweavers.com> --- Thanks for reporting this. I will send a patch. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52787 --- Comment #2 from Zhiyi Zhang <zzhang(a)codeweavers.com> --- Patch sent. https://source.winehq.org/patches/data/232117 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52787 Zhiyi Zhang <zzhang(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |be8acff719ef4f0698a1ca845b3 | |5c0d430f92fd1 Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Zhiyi Zhang <zzhang(a)codeweavers.com> --- Fixed by be8acff719ef4f0698a1ca845b35c0d430f92fd1 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52787 --- Comment #4 from tayarani(a)google.com --- Thanks for the quick turn around. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52787 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #5 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 7.7. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52787 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |7.0.x -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52787 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|7.0.x |--- --- Comment #6 from Michael Stefaniuc <mstefani(a)winehq.org> --- Removing the 7.0.x milestone from bug fixes included in 7.0.1. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla