Skip to content

Commit

Permalink
Use gawk's gettimeofday if available #57 : fix for mawk
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Sep 27, 2021
1 parent 2ac3f1e commit 5fe2df1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makesurefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ function trim(s) { sub(/^[ \t\r\n]+/, "", s); sub(/[ \t\r\n]+$/, "", s); return
/^BEGIN/ { in_begin=1 }
in_begin && /^}/ { in_begin=0 }
in_begin && $1 ~ /^split/ { next }
/^function gettimeofday/ { next }
{ gsub("\\s*#.+$", ""); gsub(Q, Q "\\" Q Q); if (trim($0)) print}' makesure.awk
echo \''"$X" Makesurefile "$@"'
} > makesure_stable
Expand Down
1 change: 1 addition & 0 deletions makesure.awk
Original file line number Diff line number Diff line change
Expand Up @@ -708,3 +708,4 @@ function isDir(path) { return ok("test -d " quoteArg(path)) }
function rm(f) { system("rm " quoteArg(f)) }
function quoteArg(a) { gsub("'", "'\\''", a); return "'" a "'" }
function trim(s) { sub(/^[ \t\r\n]+/, "", s); sub(/[ \t\r\n]+$/, "", s); return s }
function gettimeofday(){} # hack for mawk

0 comments on commit 5fe2df1

Please sign in to comment.