]> granicus.if.org Git - check/commitdiff
checkmk: use double slash in regular expression
authorbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Wed, 23 Dec 2015 16:59:04 +0000 (16:59 +0000)
committerbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Wed, 23 Dec 2015 16:59:04 +0000 (16:59 +0000)
For many awk implementations using both a single and double slash
escapes in regex expressions in strings works correctly. However,
it was observed on Solaris that a single slash results in the
literal value being added to the string (e.g. \n was a newline)
and only the double slash works as expected.

As there should be no harm, updating the regex expressions to use
double slashes.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1229 64e312b2-a51f-0410-8e61-82d0ca0eb02a

AUTHORS
checkmk/checkmk.in

diff --git a/AUTHORS b/AUTHORS
index 27789876420222c4e05c40ae2eb0233636f847f0..8d7628b05dac2b9062fca6c0b0c9daaad5fbb339 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -56,6 +56,7 @@ Contributors:
     Matt Clarkson         (Fix CMake checks using time.h for MinGW and MSVC)
     Mario Sanchez Prada   (configure.ac cleanup)
     Tobias Frost          (strip timestamps from examples to enable reproducible builds)
+    James Morris          (checkmk regex update for Solaris support)
 
 Anybody who has contributed code to Check or Check's build system is
 considered an author.  Send patches to this file to 
index 4173de703afa166339458d16c573414bd0614b58..21002749a5ac607b142e2c1b1fea24559a02779b 100644 (file)
@@ -24,11 +24,11 @@ BEGIN {
     outfname="/dev/stdout";
 
     # Tokens
-    pp_ws            = "[ \t\f\v\r\n]+";
-    pp_ws_op         = "[ \t\f\v\r\n]*";
+    pp_ws            = "[ \\t\\f\\v\\r\\n]+";
+    pp_ws_op         = "[ \\t\\f\\v\\r\\n]*";
     pp_digit         = "[0-9]+"
     pp_prefix        = pp_ws_op "#" pp_ws_op;
-    pp_sep           = "[ \t\f\v\r\n]+";
+    pp_sep           = "[ \\t\\f\\v\\r\\n]+";
     pp_name          = ".+";
     pp_hex_quad      = "[A-F0-9a-f][A-F0-9a-f][A-F0-9a-f][A-F0-9a-f]"
     pp_ucn           = "\\\\(u" pp_hex_quad "|U" pp_hex_quad pp_hex_quad ")";