[Bug 52787] New: Invalid function prototype for "RegisterUserApiHook" when compiling for C++
WineHQ Bugzilla
wine-bugs at winehq.org
Fri Apr 8 13:52:36 CDT 2022
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 at winehq.org
Reporter: tayarani at google.com
Distribution: ---
This change added a function prototype which does not compile in C++:
https://source.winehq.org/git/wine.git/blobdiff/e02a7e579cc48079d70f2ef00957255d28d119d6..d9063802f2d74f4474f548d3f68d213b0caa6d9d:/include/winuser.h
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.
More information about the wine-bugs
mailing list