summaryrefslogtreecommitdiff
path: root/src/regex.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-05-24 18:33:30 +0000
committerRoland McGrath <roland@gnu.org>1996-05-24 18:33:30 +0000
commit0c085854ba5bd5816325f55031d22f7d14a8efdd (patch)
tree8b40beea4a53d783bf3205282452ee350641b11a /src/regex.c
parent0c9071cd60b6e1d5207d5c858b1737846e2de821 (diff)
downloademacs-0c085854ba5bd5816325f55031d22f7d14a8efdd.tar.gz
emacs-0c085854ba5bd5816325f55031d22f7d14a8efdd.tar.bz2
emacs-0c085854ba5bd5816325f55031d22f7d14a8efdd.zip
Tue May 21 19:18:05 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* regex.c [_LIBC] (re_comp, re_exec): Define these, but weakly.
Diffstat (limited to 'src/regex.c')
-rw-r--r--src/regex.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/regex.c b/src/regex.c
index c0a854a9eac..e4d4e13b425 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -3,7 +3,7 @@
(Implements POSIX draft P10003.2/D11.2, except for
internationalization features.)
- Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -5180,7 +5180,7 @@ re_compile_pattern (pattern, length, bufp)
/* Entry points compatible with 4.2 BSD regex library. We don't define
them unless specifically requested. */
-#ifdef _REGEX_RE_COMP
+#if defined (_REGEX_RE_COMP) || defined (_LIBC)
/* BSD has one and only one pattern buffer. */
static struct re_pattern_buffer re_comp_buf;
@@ -5234,6 +5234,15 @@ re_exec (s)
return
0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0);
}
+
+#ifdef _LIBC
+/* Make these definitions weak in libc, so POSIX programs can redefine
+ these names if they don't use our functions, and still use
+ regcomp/regexec below without link errors. */
+weak_symbol (re_comp)
+weak_symbol (re_exec)
+#endif
+
#endif /* _REGEX_RE_COMP */
/* POSIX.2 functions. Don't define these for Emacs. */