diff options
author | jraynard <jraynard@FreeBSD.org> | 1997-10-19 13:39:55 +0000 |
---|---|---|
committer | jraynard <jraynard@FreeBSD.org> | 1997-10-19 13:39:55 +0000 |
commit | 00f77bac6a3a0adaaa4a6521db407d947796fd99 (patch) | |
tree | 3391cc4d8654aac5c64b3cab71b8e2621bc45d3e /gnu/lib | |
parent | e87443b5aaa8929612039511ac4270b8d2a17bee (diff) | |
download | FreeBSD-src-00f77bac6a3a0adaaa4a6521db407d947796fd99.zip FreeBSD-src-00f77bac6a3a0adaaa4a6521db407d947796fd99.tar.gz |
<gnuregex.h> is rather old and breaks AWK's regex matching. Use a newer
version instead.
Diffstat (limited to 'gnu/lib')
-rw-r--r-- | gnu/lib/libregex/regex.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gnu/lib/libregex/regex.h b/gnu/lib/libregex/regex.h index 462d883..e42c810 100644 --- a/gnu/lib/libregex/regex.h +++ b/gnu/lib/libregex/regex.h @@ -20,6 +20,11 @@ #ifndef __REGEXP_LIBRARY_H__ #define __REGEXP_LIBRARY_H__ +/* Allow the use in C++ code. */ +#ifdef __cplusplus +extern "C" { +#endif + /* POSIX says that <sys/types.h> must be included (by the caller) before <regex.h>. */ @@ -157,13 +162,16 @@ extern reg_syntax_t re_syntax_options; (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ | RE_NO_BK_PARENS | RE_NO_BK_REFS \ | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ + | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \ | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS) #define RE_SYNTAX_GNU_AWK \ - (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS) + ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS) \ + & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS)) #define RE_SYNTAX_POSIX_AWK \ - (RE_SYNTAX_GNU_AWK | RE_NO_GNU_OPS) + (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ + | RE_INTERVALS | RE_NO_GNU_OPS) #define RE_SYNTAX_GREP \ (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ @@ -494,6 +502,10 @@ extern size_t regerror size_t errbuf_size)); extern void regfree _RE_ARGS ((regex_t *preg)); +#ifdef __cplusplus +} +#endif /* C++ */ + #endif /* not __REGEXP_LIBRARY_H__ */ /* |