+#ifdef _REGEX_SOURCE
+
+/* Define the POSIX-compatible member names in terms of the
+ incompatible (and deprecated) names established by _REG_RE_NAME.
+ New programs should use the re_* names. */
+
+# define re_allocated allocated
+# define re_buffer buffer
+# define re_can_be_null can_be_null
+# define re_fastmap fastmap
+# define re_fastmap_accurate fastmap_accurate
+# define re_newline_anchor newline_anchor
+# define re_no_sub no_sub
+# define re_not_bol not_bol
+# define re_not_eol not_eol
+# define re_regs_allocated regs_allocated
+# define re_syntax syntax
+# define re_translate translate
+# define re_used used
+
+/* Similarly for _REG_RM_NAME. */
+
+# define rm_end end
+# define rm_num_regs num_regs
+# define rm_start start
+
+/* Undef RE_DUP_MAX first, in case the user has already included a
+ <limits.h> with an incompatible definition.
+
+ On GNU systems, the most common spelling for RE_DUP_MAX's value in
+ <limits.h> is (0x7ffff), so define RE_DUP_MAX to that, not to
+ REG_DUP_MAX. This avoid some duplicate-macro-definition warnings
+ with programs that include <limits.h> after this file.
+
+ New programs should not assume that regex.h defines RE_DUP_MAX; to
+ get the value of RE_DUP_MAX, they should instead include <limits.h>
+ and possibly invoke the sysconf function. */
+
+# undef RE_DUP_MAX
+# define RE_DUP_MAX (0x7fff)
+
+/* Define the following symbols for backward source compatibility.
+ These symbols violate the POSIX name space rules, and new programs
+ should avoid them. */
+
+# define REGS_FIXED REG_FIXED
+# define REGS_REALLOCATE REG_REALLOCATE
+# define REGS_UNALLOCATED REG_UNALLOCATED
+# define RE_BACKSLASH_ESCAPE_IN_LISTS REG_BACKSLASH_ESCAPE_IN_LISTS
+# define RE_BK_PLUS_QM REG_BK_PLUS_QM
+# define RE_CARET_ANCHORS_HERE REG_CARET_ANCHORS_HERE
+# define RE_CHAR_CLASSES REG_CHAR_CLASSES
+# define RE_CONTEXT_INDEP_ANCHORS REG_CONTEXT_INDEP_ANCHORS
+# define RE_CONTEXT_INDEP_OPS REG_CONTEXT_INDEP_OPS
+# define RE_CONTEXT_INVALID_DUP REG_CONTEXT_INVALID_DUP
+# define RE_CONTEXT_INVALID_OPS REG_CONTEXT_INVALID_OPS
+# define RE_DEBUG REG_DEBUG
+# define RE_DOT_NEWLINE REG_DOT_NEWLINE
+# define RE_DOT_NOT_NULL REG_DOT_NOT_NULL
+# define RE_HAT_LISTS_NOT_NEWLINE REG_HAT_LISTS_NOT_NEWLINE
+# define RE_ICASE REG_IGNORE_CASE /* avoid collision with REG_ICASE */
+# define RE_INTERVALS REG_INTERVALS
+# define RE_INVALID_INTERVAL_ORD REG_INVALID_INTERVAL_ORD
+# define RE_LIMITED_OPS REG_LIMITED_OPS
+# define RE_NEWLINE_ALT REG_NEWLINE_ALT
+# define RE_NO_BK_BRACES REG_NO_BK_BRACES
+# define RE_NO_BK_PARENS REG_NO_BK_PARENS
+# define RE_NO_BK_REFS REG_NO_BK_REFS
+# define RE_NO_BK_VBAR REG_NO_BK_VBAR
+# define RE_NO_EMPTY_RANGES REG_NO_EMPTY_RANGES
+# define RE_NO_GNU_OPS REG_NO_GNU_OPS
+# define RE_NO_POSIX_BACKTRACKING REG_NO_POSIX_BACKTRACKING
+# define RE_NO_SUB REG_NO_SUB
+# define RE_NREGS REG_NREGS
+# define RE_SYNTAX_AWK REG_SYNTAX_AWK
+# define RE_SYNTAX_ED REG_SYNTAX_ED
+# define RE_SYNTAX_EGREP REG_SYNTAX_EGREP
+# define RE_SYNTAX_EMACS REG_SYNTAX_EMACS
+# define RE_SYNTAX_GNU_AWK REG_SYNTAX_GNU_AWK
+# define RE_SYNTAX_GREP REG_SYNTAX_GREP
+# define RE_SYNTAX_POSIX_AWK REG_SYNTAX_POSIX_AWK
+# define RE_SYNTAX_POSIX_BASIC REG_SYNTAX_POSIX_BASIC
+# define RE_SYNTAX_POSIX_EGREP REG_SYNTAX_POSIX_EGREP
+# define RE_SYNTAX_POSIX_EXTENDED REG_SYNTAX_POSIX_EXTENDED
+# define RE_SYNTAX_POSIX_MINIMAL_BASIC REG_SYNTAX_POSIX_MINIMAL_BASIC
+# define RE_SYNTAX_POSIX_MINIMAL_EXTENDED REG_SYNTAX_POSIX_MINIMAL_EXTENDED
+# define RE_SYNTAX_SED REG_SYNTAX_SED
+# define RE_UNMATCHED_RIGHT_PAREN_ORD REG_UNMATCHED_RIGHT_PAREN_ORD
+# ifndef RE_TRANSLATE_TYPE
+# define RE_TRANSLATE_TYPE REG_TRANSLATE_TYPE
+# endif
+
+#endif /* defined _REGEX_SOURCE */
+