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@winehq.org Reporter: tayarani@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).
https://bugs.winehq.org/show_bug.cgi?id=52787
Zhiyi Zhang zzhang@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |zzhang@codeweavers.com Ever confirmed|0 |1
--- Comment #1 from Zhiyi Zhang zzhang@codeweavers.com --- Thanks for reporting this. I will send a patch.
https://bugs.winehq.org/show_bug.cgi?id=52787
--- Comment #2 from Zhiyi Zhang zzhang@codeweavers.com --- Patch sent. https://source.winehq.org/patches/data/232117
https://bugs.winehq.org/show_bug.cgi?id=52787
Zhiyi Zhang zzhang@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |be8acff719ef4f0698a1ca845b3 | |5c0d430f92fd1 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #3 from Zhiyi Zhang zzhang@codeweavers.com --- Fixed by be8acff719ef4f0698a1ca845b35c0d430f92fd1
https://bugs.winehq.org/show_bug.cgi?id=52787
--- Comment #4 from tayarani@google.com --- Thanks for the quick turn around.
https://bugs.winehq.org/show_bug.cgi?id=52787
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 7.7.
https://bugs.winehq.org/show_bug.cgi?id=52787
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |7.0.x
https://bugs.winehq.org/show_bug.cgi?id=52787
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|7.0.x |---
--- Comment #6 from Michael Stefaniuc mstefani@winehq.org --- Removing the 7.0.x milestone from bug fixes included in 7.0.1.