-#define PMdf_USED 0x01 /* pm has been used once already */
-#define PMdf_TAINTED 0x02 /* pm compiled from tainted pattern */
-#define PMdf_UTF8 0x04 /* pm compiled from utf8 data */
-#define PMdf_DYN_UTF8 0x08
-
-#define PMdf_CMP_UTF8 (PMdf_UTF8|PMdf_DYN_UTF8)
-
-#define PMf_RETAINT 0x0001 /* taint $1 etc. if target tainted */
-#define PMf_ONCE 0x0002 /* use pattern only once per reset */
-#define PMf_UNUSED 0x0004 /* free for use */
-#define PMf_MAYBE_CONST 0x0008 /* replacement contains variables */
-#define PMf_SKIPWHITE 0x0010 /* skip leading whitespace for split */
-#define PMf_WHITE 0x0020 /* pattern is \s+ */
-#define PMf_CONST 0x0040 /* subst replacement is constant */
-#define PMf_KEEP 0x0080 /* keep 1st runtime pattern forever */
-#define PMf_GLOBAL 0x0100 /* pattern had a g modifier */
-#define PMf_CONTINUE 0x0200 /* don't reset pos() if //g fails */
-#define PMf_EVAL 0x0400 /* evaluating replacement as expr */
-#define PMf_LOCALE 0x0800 /* use locale for character types */
-#define PMf_MULTILINE 0x1000 /* assume multiple lines */
-#define PMf_SINGLELINE 0x2000 /* assume single line */
-#define PMf_FOLD 0x4000 /* case insensitivity */
-#define PMf_EXTENDED 0x8000 /* chuck embedded whitespace */
-
-/* mask of bits stored in regexp->extflags
- these all are also called RXf_PMf_xyz
+
+#define PMf_RETAINT 0x00000040 /* taint $1 etc. if target tainted */
+#define PMf_ONCE 0x00000080 /* match successfully only once per
+ reset, with related flag RXf_USED
+ in re->extflags holding state.
+ This is used only for ?? matches,
+ and only on OP_MATCH and OP_QR */
+
+#define PMf_UNUSED 0x00000100 /* free for use */
+#define PMf_MAYBE_CONST 0x00000200 /* replacement contains variables */
+
+#define PMf_USED 0x00000400 /* PMf_ONCE has matched successfully.
+ Not used under threading. */
+
+#define PMf_CONST 0x00000800 /* subst replacement is constant */
+#define PMf_KEEP 0x00001000 /* keep 1st runtime pattern forever */
+#define PMf_GLOBAL 0x00002000 /* pattern had a g modifier */
+#define PMf_CONTINUE 0x00004000 /* don't reset pos() if //g fails */
+#define PMf_EVAL 0x00008000 /* evaluating replacement as expr */
+
+/* The following flags have exact equivalents in regcomp.h with the prefix RXf_
+ * which are stored in the regexp->extflags member. If you change them here,
+ * you have to change them there, and vice versa.