Skip to content

Commit

Permalink
unix: fix grep syntax to work on non-GNU greps
Browse files Browse the repository at this point in the history
  • Loading branch information
jtroy committed Sep 9, 2024
1 parent d58f986 commit e116604
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unix/mkerrors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ errors=$(
signals=$(
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' |
grep -E -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |
sort
)

Expand All @@ -666,7 +666,7 @@ echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
sort >_error.grep
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' |
grep -E -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |
sort >_signal.grep

echo '// mkerrors.sh' "$@"
Expand Down

0 comments on commit e116604

Please sign in to comment.