diff options
| author | Roland McGrath | 1996-07-09 09:10:39 +0000 |
|---|---|---|
| committer | Roland McGrath | 1996-07-09 09:10:39 +0000 |
| commit | 48afdd4400462846bc808e1513c66f1db5ea2be9 (patch) | |
| tree | 5a61799f8c3b7e9d34bc32ecbfe3efbf8205d738 /src | |
| parent | 6d0dbbaf3ef29fa4a08532bfc44e0472234a27bb (diff) | |
| download | emacs-48afdd4400462846bc808e1513c66f1db5ea2be9.tar.gz emacs-48afdd4400462846bc808e1513c66f1db5ea2be9.zip | |
[_LIBC] (re_comp, re_exec): Use `weak_function' keyword in defn instead of
weak_symbol macro after.
Diffstat (limited to 'src')
| -rw-r--r-- | src/regex.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/regex.c b/src/regex.c index c41aa1f2b48..5fe307f0983 100644 --- a/src/regex.c +++ b/src/regex.c | |||
| @@ -5188,6 +5188,12 @@ re_compile_pattern (pattern, length, bufp) | |||
| 5188 | static struct re_pattern_buffer re_comp_buf; | 5188 | static struct re_pattern_buffer re_comp_buf; |
| 5189 | 5189 | ||
| 5190 | char * | 5190 | char * |
| 5191 | #ifdef _LIBC | ||
| 5192 | /* Make these definitions weak in libc, so POSIX programs can redefine | ||
| 5193 | these names if they don't use our functions, and still use | ||
| 5194 | regcomp/regexec below without link errors. */ | ||
| 5195 | weak_function | ||
| 5196 | #endif | ||
| 5191 | re_comp (s) | 5197 | re_comp (s) |
| 5192 | const char *s; | 5198 | const char *s; |
| 5193 | { | 5199 | { |
| @@ -5229,6 +5235,9 @@ re_comp (s) | |||
| 5229 | 5235 | ||
| 5230 | 5236 | ||
| 5231 | int | 5237 | int |
| 5238 | #ifdef _LIBC | ||
| 5239 | weak_function | ||
| 5240 | #endif | ||
| 5232 | re_exec (s) | 5241 | re_exec (s) |
| 5233 | const char *s; | 5242 | const char *s; |
| 5234 | { | 5243 | { |
| @@ -5236,15 +5245,6 @@ re_exec (s) | |||
| 5236 | return | 5245 | return |
| 5237 | 0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0); | 5246 | 0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0); |
| 5238 | } | 5247 | } |
| 5239 | |||
| 5240 | #ifdef _LIBC | ||
| 5241 | /* Make these definitions weak in libc, so POSIX programs can redefine | ||
| 5242 | these names if they don't use our functions, and still use | ||
| 5243 | regcomp/regexec below without link errors. */ | ||
| 5244 | weak_symbol (re_comp) | ||
| 5245 | weak_symbol (re_exec) | ||
| 5246 | #endif | ||
| 5247 | |||
| 5248 | #endif /* _REGEX_RE_COMP */ | 5248 | #endif /* _REGEX_RE_COMP */ |
| 5249 | 5249 | ||
| 5250 | /* POSIX.2 functions. Don't define these for Emacs. */ | 5250 | /* POSIX.2 functions. Don't define these for Emacs. */ |