From 0d8407a6c76170e9a72b4a4d105c0ce83f9ecfc3 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 15 Jun 1995 16:42:47 +0000 Subject: [PATCH] GNU text utilities --- lib/long-options.c | 2 +- lib/regex.c | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/long-options.c b/lib/long-options.c index c1071bfaf..dd7a8ca14 100644 --- a/lib/long-options.c +++ b/lib/long-options.c @@ -64,7 +64,7 @@ parse_long_options (argc, argv, command_name, version_string, usage) case 'v': printf ("%s - %s\n", command_name, version_string); exit (0); - + default: /* Don't process any other long-named options. */ break; diff --git a/lib/regex.c b/lib/regex.c index 2ccabc12e..e6d614524 100644 --- a/lib/regex.c +++ b/lib/regex.c @@ -62,8 +62,19 @@ char *malloc (); char *realloc (); #endif -/* We used to test for `BSTRING' here, but only GCC and Emacs define - `BSTRING', as far as I know, and neither of them use this code. */ +/* When used in Emacs's lib-src, we need to get bzero and bcopy somehow. + If nothing else has been done, use the method below. */ +#ifdef INHIBIT_STRING_HEADER +#if !(defined (HAVE_BZERO) && defined (HAVE_BCOPY)) +#if !defined (bzero) && !defined (bcopy) +#undef INHIBIT_STRING_HEADER +#endif +#endif +#endif + +/* This is the normal way of making sure we have a bcopy and a bzero. + This is used in most programs--a few other programs avoid this + by defining INHIBIT_STRING_HEADER. */ #ifndef INHIBIT_STRING_HEADER #if HAVE_STRING_H || STDC_HEADERS || defined (_LIBC) #include -- 2.11.0