summaryrefslogtreecommitdiffstats
path: root/usr.bin/awk/awk.h
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2020-06-13 01:19:55 +0000
committermillert <millert@openbsd.org>2020-06-13 01:19:55 +0000
commitef7896159fc0611a0b45253ea37cc7c8f65d4bf5 (patch)
tree39e2e85dd108ec4abcdbbe6b1fdd72e47d50de14 /usr.bin/awk/awk.h
parentTeach powerpc64 ddb to x, w, break, step, trace. (diff)
downloadwireguard-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.h3
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 */