diff options
| -rw-r--r-- | src/regex.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/regex.c b/src/regex.c index 2ccabc12e94..e6d614524c9 100644 --- a/src/regex.c +++ b/src/regex.c | |||
| @@ -62,8 +62,19 @@ char *malloc (); | |||
| 62 | char *realloc (); | 62 | char *realloc (); |
| 63 | #endif | 63 | #endif |
| 64 | 64 | ||
| 65 | /* We used to test for `BSTRING' here, but only GCC and Emacs define | 65 | /* When used in Emacs's lib-src, we need to get bzero and bcopy somehow. |
| 66 | `BSTRING', as far as I know, and neither of them use this code. */ | 66 | If nothing else has been done, use the method below. */ |
| 67 | #ifdef INHIBIT_STRING_HEADER | ||
| 68 | #if !(defined (HAVE_BZERO) && defined (HAVE_BCOPY)) | ||
| 69 | #if !defined (bzero) && !defined (bcopy) | ||
| 70 | #undef INHIBIT_STRING_HEADER | ||
| 71 | #endif | ||
| 72 | #endif | ||
| 73 | #endif | ||
| 74 | |||
| 75 | /* This is the normal way of making sure we have a bcopy and a bzero. | ||
| 76 | This is used in most programs--a few other programs avoid this | ||
| 77 | by defining INHIBIT_STRING_HEADER. */ | ||
| 67 | #ifndef INHIBIT_STRING_HEADER | 78 | #ifndef INHIBIT_STRING_HEADER |
| 68 | #if HAVE_STRING_H || STDC_HEADERS || defined (_LIBC) | 79 | #if HAVE_STRING_H || STDC_HEADERS || defined (_LIBC) |
| 69 | #include <string.h> | 80 | #include <string.h> |