aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/regex.c6
-rw-r--r--src/regex.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/regex.c b/src/regex.c
index c7674a1e9c3..33c7ea242cd 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -4934,9 +4934,9 @@ re_compile_pattern (pattern, length, bufp)
4934} 4934}
4935 4935
4936/* Entry points compatible with 4.2 BSD regex library. We don't define 4936/* Entry points compatible with 4.2 BSD regex library. We don't define
4937 them if this is an Emacs or POSIX compilation. */ 4937 them unless specifically requested. */
4938 4938
4939#if !defined (emacs) && !defined (_POSIX_SOURCE) 4939#ifdef _REGEX_RE_COMP
4940 4940
4941/* BSD has one and only one pattern buffer. */ 4941/* BSD has one and only one pattern buffer. */
4942static struct re_pattern_buffer re_comp_buf; 4942static struct re_pattern_buffer re_comp_buf;
@@ -4987,7 +4987,7 @@ re_exec (s)
4987 return 4987 return
4988 0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0); 4988 0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0);
4989} 4989}
4990#endif /* not emacs and not _POSIX_SOURCE */ 4990#endif /* _REGEX_RE_COMP */
4991 4991
4992/* POSIX.2 functions. Don't define these for Emacs. */ 4992/* POSIX.2 functions. Don't define these for Emacs. */
4993 4993
diff --git a/src/regex.h b/src/regex.h
index 40f684cb8e5..55927f627c9 100644
--- a/src/regex.h
+++ b/src/regex.h
@@ -460,9 +460,11 @@ extern void re_set_registers
460 _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs, 460 _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs,
461 unsigned num_regs, regoff_t *starts, regoff_t *ends)); 461 unsigned num_regs, regoff_t *starts, regoff_t *ends));
462 462
463#ifdef _REGEX_RE_COMP
463/* 4.2 bsd compatibility. */ 464/* 4.2 bsd compatibility. */
464extern char *re_comp _RE_ARGS ((const char *)); 465extern char *re_comp _RE_ARGS ((const char *));
465extern int re_exec _RE_ARGS ((const char *)); 466extern int re_exec _RE_ARGS ((const char *));
467#endif
466 468
467/* POSIX compatibility. */ 469/* POSIX compatibility. */
468extern int regcomp _RE_ARGS ((regex_t *preg, const char *pattern, int cflags)); 470extern int regcomp _RE_ARGS ((regex_t *preg, const char *pattern, int cflags));