From: Ian Lance Taylor Date: Tue, 30 Jul 2024 16:25:03 +0000 (-0700) Subject: libbacktrace: fix syntax of Windows registration functions X-Git-Tag: basepoints/gcc-16~7138 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=37aa98f79a7fbad620c0318a48552b5442a49456;p=thirdparty%2Fgcc.git libbacktrace: fix syntax of Windows registration functions Adjust the syntax to keep MSVC happy. Fixes https://github.com/ianlancetaylor/libbacktrace/issues/131 * pecoff.c (LDR_DLL_NOTIFICATION): Put function modifier inside parentheses. (LDR_REGISTER_FUNCTION): Likewise. --- diff --git a/libbacktrace/pecoff.c b/libbacktrace/pecoff.c index 636e1b11296..ccd5ccbce2c 100644 --- a/libbacktrace/pecoff.c +++ b/libbacktrace/pecoff.c @@ -83,10 +83,10 @@ struct dll_notification_data #define LDR_DLL_NOTIFICATION_REASON_LOADED 1 typedef LONG NTSTATUS; -typedef VOID CALLBACK (*LDR_DLL_NOTIFICATION)(ULONG, +typedef VOID (CALLBACK *LDR_DLL_NOTIFICATION)(ULONG, struct dll_notification_data*, PVOID); -typedef NTSTATUS NTAPI (*LDR_REGISTER_FUNCTION)(ULONG, +typedef NTSTATUS (NTAPI *LDR_REGISTER_FUNCTION)(ULONG, LDR_DLL_NOTIFICATION, PVOID, PVOID*); #endif