along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Specification. */
#include "strstr.h"
+#include <stddef.h> /* for NULL */
+
#if HAVE_MBRTOWC
# include "mbuiter.h"
#endif
{
if (!mbui_avail (rneedle))
/* Found a match. */
- return (char *) haystack;
+ return (char *) mbui_cur_ptr (iter_haystack);
if (!mbui_avail (rhaystack))
/* No match. */
return NULL;