diff options
author | James Raynard <jraynard@FreeBSD.org> | 1997-10-19 13:39:55 +0000 |
---|---|---|
committer | James Raynard <jraynard@FreeBSD.org> | 1997-10-19 13:39:55 +0000 |
commit | 70ebe6afcb27376cdfbbe0ed0651a76f547c6140 (patch) | |
tree | c847122d384838ad0d45d3dc3e37b780c0ce6a01 /gnu/lib/libregex | |
parent | 82b195500a0d63cfb4453fdd96d9a174d7825d53 (diff) | |
download | src-70ebe6afcb27376cdfbbe0ed0651a76f547c6140.tar.gz src-70ebe6afcb27376cdfbbe0ed0651a76f547c6140.zip |
<gnuregex.h> is rather old and breaks AWK's regex matching. Use a newer
version instead.
Notes
Notes:
svn path=/head/; revision=30578
Diffstat (limited to 'gnu/lib/libregex')
-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 462d883b3f58..e42c810f9f97 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__ */ /* |