summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-11-17 08:19:01 +0000
committerJim Meyering <jim@meyering.net>2000-11-17 08:19:01 +0000
commit00fba41266828b351d4185a6a6bcd289096567cf (patch)
treec66e26806f388b154bb7902c860caf8f5eb55291 /lib
parent7822d5fe7f680206efdddd8420dd6a453e789c74 (diff)
downloadcoreutils-00fba41266828b351d4185a6a6bcd289096567cf.tar.xz
Update from GNU libc.
Diffstat (limited to 'lib')
-rw-r--r--lib/strstr.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/strstr.c b/lib/strstr.c
index 7709d8464..c41e90349 100644
--- a/lib/strstr.c
+++ b/lib/strstr.c
@@ -28,11 +28,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# include <config.h>
#endif
-#include <string.h>
+#if defined _LIBC || defined HAVE_STRING_H
+# include <string.h>
+#endif
#include <sys/types.h>
typedef unsigned chartype;
+#undef strstr
+
char *
strstr (const char *phaystack, const char *pneedle)
{
@@ -105,7 +109,7 @@ jin: a = *++haystack;
}
while (*rhaystack == a);
- needle = rneedle; /* took the register-poor aproach */
+ needle = rneedle; /* took the register-poor approach */
if (a == '\0')
break;