diff options
author | Keith Bostic <keith.bostic@mongodb.com> | 2017-05-12 08:25:05 -0400 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2017-06-19 17:28:30 +0000 |
commit | 18b90ccb376181bc2a04143335fbeed40a66adff (patch) | |
tree | 24cb79c1b780bd2add298ca0291ad2609c068dc8 | |
parent | f8ecea1883dce17924599673c330356b676465c8 (diff) | |
download | mongo-18b90ccb376181bc2a04143335fbeed40a66adff.tar.gz |
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.
-rwxr-xr-x | dist/s_style | 5 |
1 files 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 |