summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/lib/regex.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-12-02 03:13:37 +0000
committerpeter <peter@FreeBSD.org>2002-12-02 03:13:37 +0000
commit3dc96f7243ece1d1f7f87b03334f840415e0db63 (patch)
tree15f00bd8ebd718713d8c0a8707ebebfced99c550 /contrib/cvs/lib/regex.h
parentcf46dfb750863d760d19b9858b0a336b158275da (diff)
downloadFreeBSD-src-3dc96f7243ece1d1f7f87b03334f840415e0db63.zip
FreeBSD-src-3dc96f7243ece1d1f7f87b03334f840415e0db63.tar.gz
Import cvs-1.11.2.1 as of 2002/12/01 onto vendor branch. This fixes all
of the bugs that I know of. We've been running a slightly older version of this on freefall/repoman, where it was afflicted by a silly merge error on my part (fixed). Approved by: re
Diffstat (limited to 'contrib/cvs/lib/regex.h')
-rw-r--r--contrib/cvs/lib/regex.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/contrib/cvs/lib/regex.h b/contrib/cvs/lib/regex.h
index 411e7d2..6c0c850 100644
--- a/contrib/cvs/lib/regex.h
+++ b/contrib/cvs/lib/regex.h
@@ -490,6 +490,29 @@ extern int re_exec _RE_ARGS (());
#endif
/* POSIX compatibility. */
+/* CVS - DRP
+ *
+ * If the OS defines this, just redefine the names to avoid namespace
+ * clashes. In theory, we should be testing the built in functions to
+ * see if they do what we want and use them if possible, but this is
+ * easier...
+ *
+ * Namely, this was occurring under Mac OS X. This is a Mac OS X (or
+ * OS X related) bug.
+ */
+#ifdef HAVE_REGCOMP
+# define regcomp cvs_regcomp
+#endif /* HAVE_REGCOMP */
+#ifdef HAVE_REGERROR
+# define regerror cvs_regerror
+#endif /* HAVE_REGERROR */
+#ifdef HAVE_REGEXEC
+# define regexec cvs_regexec
+#endif /* HAVE_REGEXEC */
+#ifdef HAVE_REGFREE
+# define regfree cvs_regfree
+#endif /* HAVE_REGFREE */
+
extern int regcomp _RE_ARGS ((regex_t *preg, const char *pattern, int cflags));
extern int regexec
_RE_ARGS ((const regex_t *preg, const char *string, size_t nmatch,
OpenPOWER on IntegriCloud