diff options
author | Keith Bostic <keith.bostic@mongodb.com> | 2017-05-12 08:25:05 -0400 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2017-05-16 04:31:28 +1000 |
commit | 78109ca3fea602885a62fc2872fc553450168149 (patch) | |
tree | 2d3a08b84c76c9a9bb4c3816fb61a33999f22921 | |
parent | 9b60343ed70a47233bcb90cc7ff2aa256dd272ab (diff) | |
download | mongo-78109ca3fea602885a62fc2872fc553450168149.tar.gz |
WT-3158 Fix structure layout on Windows. (#3417)mongodb-3.5.8
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 |