-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1999, 2002-2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
*
* Stephen R. van den Berg, berg@pool.informatik.rwth-aachen.de */
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <string.h>
-#include <sys/types.h>
typedef unsigned chartype;
+#undef strstr
+
char *
-strstr (phaystack, pneedle)
- const char *phaystack;
- const char *pneedle;
+strstr (const char *phaystack, const char *pneedle)
{
register const unsigned char *haystack, *needle;
register chartype b, c;
a = *++haystack;
if (a == '\0')
goto ret0;
-shloop: }
+shloop:; }
while (a != b);
jin: a = *++haystack;
}
while (*rhaystack == a);
- needle = rneedle; /* took the register-poor aproach */
+ needle = rneedle; /* took the register-poor approach */
if (a == '\0')
break;