changeset 2988:917f240a07a3

Update from GNU libc.
author Jim Meyering <jim@meyering.net>
date Fri, 17 Nov 2000 08:19:01 +0000
parents c9edf250f3e7
children a8b23ca249d7
files lib/strstr.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lib/strstr.c	Thu Nov 16 12:20:35 2000 +0000
+++ b/lib/strstr.c	Fri Nov 17 08:19:01 2000 +0000
@@ -28,11 +28,15 @@
 # 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 @@
 	      }
 	    while (*rhaystack == a);
 
-	  needle = rneedle;		   /* took the register-poor aproach */
+	  needle = rneedle;		   /* took the register-poor approach */
 
 	  if (a == '\0')
 	    break;