From 523e4ab050b13404a6929cc56ef873de8023e25c Mon Sep 17 00:00:00 2001
From: Greg Hudson <ghudson@mit.edu>
Date: Sat, 5 May 2018 13:40:37 -0400
Subject: [PATCH] Escape curly braces in def-check.pl regexes

Recent versions of Perl issue a warning or error when an unescaped
open curly brace is used in a position where it might introduce a
quantifier in a regular expression.  Escape all regexp literal curly
braces in def-check.pl.

ticket: 8677 (new)
tags: pullup
target_version: 1.16-next
target_version: 1.15-next
---
 src/util/def-check.pl | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/util/def-check.pl b/src/util/def-check.pl
index a807e6e45b..ccdf8ef16b 100644
--- a/src/util/def-check.pl
+++ b/src/util/def-check.pl
@@ -62,7 +62,7 @@ sub open_always
         next LINE;
     }
     s/#.*$//;
-    if (/^} *$/) {
+    if (/^\} *$/) {
         next LINE;
     }
     # strip comments
@@ -86,18 +86,18 @@ sub open_always
     if (/^[ \t]*$/) {
         next LINE;
     }
-    if (/^ *extern "C" {/) {
+    if (/^ *extern "C" \{/) {
         next LINE;
     }
     s/KRB5_ATTR_DEPRECATED//;
     # elide struct definitions
   Struct1:
-    if (/{[^}]*}/) {
-	s/{[^}]*}/ /g;
+    if (/\{[^}]*\}/) {
+	s/\{[^}]*\}/ /g;
 	goto Struct1;
     }
     # multi-line defs
-    if (/{/) {
+    if (/\{/) {
 	$_ .= "\n";
 	$len1 = length;
 	$_ .= $h->getline();
