From dc5ce51983713dfbb8f3d0c8b198dee32b563ac6 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sun, 10 Nov 2019 13:03:15 +0100 Subject: [PATCH] util/perl/OpenSSL/ParseC.pm: Fix 'extern "C" DEPRECATEDIN_x_y(...)' The parser expected an 'extern "C"' followed by a single declaration to always end with a semicolon. Then came along something like this: extern "C" DEPRECATEDIN_3_0(int ERR_load_KDF_strings(void)) This change adjusts the detector of 'extern "C"' to also take in accound a declaration that ends with a parenthesis. Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/10368) --- util/perl/OpenSSL/ParseC.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/perl/OpenSSL/ParseC.pm b/util/perl/OpenSSL/ParseC.pm index 2db43e2a61..392e61faf2 100644 --- a/util/perl/OpenSSL/ParseC.pm +++ b/util/perl/OpenSSL/ParseC.pm @@ -561,7 +561,7 @@ my @chandlers = ( # Note that the main parse function has a special hack for 'extern "C" {' # which can't be done in handlers # We simply ignore it. - { regexp => qr/extern "C" (.*;)/, + { regexp => qr/^extern "C" (.*(?:;|>>>))/, massager => sub { return ($1); }, }, # any other extern is just ignored -- 2.25.1