diff options
| author | Roland McGrath | 1996-05-24 18:33:30 +0000 |
|---|---|---|
| committer | Roland McGrath | 1996-05-24 18:33:30 +0000 |
| commit | 0c085854ba5bd5816325f55031d22f7d14a8efdd (patch) | |
| tree | 8b40beea4a53d783bf3205282452ee350641b11a /src | |
| parent | 0c9071cd60b6e1d5207d5c858b1737846e2de821 (diff) | |
| download | emacs-0c085854ba5bd5816325f55031d22f7d14a8efdd.tar.gz 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')
| -rw-r--r-- | src/regex.c | 13 |
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 @@ | |||
| 3 | (Implements POSIX draft P10003.2/D11.2, except for | 3 | (Implements POSIX draft P10003.2/D11.2, except for |
| 4 | internationalization features.) | 4 | internationalization features.) |
| 5 | 5 | ||
| 6 | Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. | 6 | Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc. |
| 7 | 7 | ||
| 8 | This program is free software; you can redistribute it and/or modify | 8 | This program is free software; you can redistribute it and/or modify |
| 9 | it under the terms of the GNU General Public License as published by | 9 | it under the terms of the GNU General Public License as published by |
| @@ -5180,7 +5180,7 @@ re_compile_pattern (pattern, length, bufp) | |||
| 5180 | /* Entry points compatible with 4.2 BSD regex library. We don't define | 5180 | /* Entry points compatible with 4.2 BSD regex library. We don't define |
| 5181 | them unless specifically requested. */ | 5181 | them unless specifically requested. */ |
| 5182 | 5182 | ||
| 5183 | #ifdef _REGEX_RE_COMP | 5183 | #if defined (_REGEX_RE_COMP) || defined (_LIBC) |
| 5184 | 5184 | ||
| 5185 | /* BSD has one and only one pattern buffer. */ | 5185 | /* BSD has one and only one pattern buffer. */ |
| 5186 | static struct re_pattern_buffer re_comp_buf; | 5186 | static struct re_pattern_buffer re_comp_buf; |
| @@ -5234,6 +5234,15 @@ re_exec (s) | |||
| 5234 | return | 5234 | return |
| 5235 | 0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0); | 5235 | 0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0); |
| 5236 | } | 5236 | } |
| 5237 | |||
| 5238 | #ifdef _LIBC | ||
| 5239 | /* Make these definitions weak in libc, so POSIX programs can redefine | ||
| 5240 | these names if they don't use our functions, and still use | ||
| 5241 | regcomp/regexec below without link errors. */ | ||
| 5242 | weak_symbol (re_comp) | ||
| 5243 | weak_symbol (re_exec) | ||
| 5244 | #endif | ||
| 5245 | |||
| 5237 | #endif /* _REGEX_RE_COMP */ | 5246 | #endif /* _REGEX_RE_COMP */ |
| 5238 | 5247 | ||
| 5239 | /* POSIX.2 functions. Don't define these for Emacs. */ | 5248 | /* POSIX.2 functions. Don't define these for Emacs. */ |