diff --git a/ChangeLog b/ChangeLog index a603e0238..2cd33a4aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-08-28 Ryan Lortie + + [REVERT] Bug 548612 – g_strstr_len() should use memmem when available + + * configure.in: + * glib/gstrfuncs.c (g_strstr_len): revert use of memmem (see bug) + 2008-08-28 Matthias Clasen * configure.in: Change libselinux detection to not link libglib diff --git a/configure.in b/configure.in index 822d89d65..ebba7065c 100644 --- a/configure.in +++ b/configure.in @@ -559,7 +559,6 @@ AC_CHECK_FUNCS(mmap) AC_CHECK_FUNCS(posix_memalign) AC_CHECK_FUNCS(memalign) AC_CHECK_FUNCS(valloc) -AC_CHECK_FUNCS(memmem) AC_CHECK_FUNCS(atexit on_exit) diff --git a/glib/gstrfuncs.c b/glib/gstrfuncs.c index b315fb381..85aec6906 100644 --- a/glib/gstrfuncs.c +++ b/glib/gstrfuncs.c @@ -2602,12 +2602,6 @@ g_strstr_len (const gchar *haystack, return strstr (haystack, needle); else { -#ifdef HAVE_MEMMEM - size_t len; - - len = MIN(haystack_len, strlen (haystack)); - return memmem (haystack, len, needle, strlen (needle)); -#else const gchar *p = haystack; gsize needle_len = strlen (needle); const gchar *end; @@ -2634,7 +2628,6 @@ g_strstr_len (const gchar *haystack, } return NULL; -#endif /* HAVE_MEMMEM */ } }