diff options
author | 2020-06-13 01:19:55 +0000 | |
---|---|---|
committer | 2020-06-13 01:19:55 +0000 | |
commit | ef7896159fc0611a0b45253ea37cc7c8f65d4bf5 (patch) | |
tree | 39e2e85dd108ec4abcdbbe6b1fdd72e47d50de14 /usr.bin/awk/awk.h | |
parent | Teach powerpc64 ddb to x, w, break, step, trace. (diff) | |
download | wireguard-openbsd-ef7896159fc0611a0b45253ea37cc7c8f65d4bf5.tar.xz wireguard-openbsd-ef7896159fc0611a0b45253ea37cc7c8f65d4bf5.zip |
POSIX doesn't permit an unescaped '/' in an extended regular expression.
Unlike upstream awk, ours has historically allowed unescaped '/'
inside a bracket expression for compatibility with other awk
implementations but the check was too simple-minded. This improves
the matching to allow things like /[]/]/, /[^]// and '/[abc[:digit:]/@#]/'
To enable strict POSIX compliance, set POSIXLY_CORRECT.
Diffstat (limited to 'usr.bin/awk/awk.h')
-rw-r--r-- | usr.bin/awk/awk.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/awk/awk.h b/usr.bin/awk/awk.h index e55af318b9a..080bf94cc22 100644 --- a/usr.bin/awk/awk.h +++ b/usr.bin/awk/awk.h @@ -1,4 +1,4 @@ -/* $OpenBSD: awk.h,v 1.23 2020/06/10 21:06:09 millert Exp $ */ +/* $OpenBSD: awk.h,v 1.24 2020/06/13 01:19:55 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved @@ -62,6 +62,7 @@ extern enum compile_states { } compile_time; extern bool safe; /* false => unsafe, true => safe */ +extern bool do_posix; /* true if POSIXLY_CORRECT set */ #define RECSIZE (8 * 1024) /* sets limit on records, fields, etc., etc. */ extern int recsize; /* size of current record, orig RECSIZE */ |