From d2db615982db186e0291f05da9dbe758d36b20d3 Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Fri, 12 May 2017 08:25:05 -0400 Subject: WT-3158 Fix structure layout on Windows. (#3417) Use awk instead of wc to get a count of lines, awk never includes whitespace in the output. --- dist/s_style | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dist/s_style b/dist/s_style index 54a88bbeb4c..69cf1f667fa 100755 --- a/dist/s_style +++ b/dist/s_style @@ -102,9 +102,10 @@ else fi # If we don't have matching pack-begin and pack-end calls, we don't get - # an error, we just get a Windows performance regression. + # an error, we just get a Windows performance regression. Using awk and + # not wc to ensure there's no whitespace in the assignment. egrep WT_PACKED_STRUCT $f > $t - cnt=`wc -l < $t` + cnt=`awk 'BEGIN { line = 0 } { ++line } END { print line }' < $t` test `expr "$cnt" % 2` -ne 0 && { echo "$f: mismatched WT_PACKED_STRUCT_BEGIN/END lines" cat $t -- cgit v1.2.1