[REVERT] Bug 548612 – g_strstr_len() should use memmem when available

2008-08-28  Ryan Lortie  <desrt@desrt.ca>

        [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)


svn path=/trunk/; revision=7413
This commit is contained in:
Ryan Lortie 2008-08-28 22:55:36 +00:00 committed by Ryan Lortie
parent 0eca17a9f2
commit ef4df848e0
3 changed files with 7 additions and 8 deletions

View File

@ -1,3 +1,10 @@
2008-08-28 Ryan Lortie <desrt@desrt.ca>
[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 <mclsaen@redhat.com>
* configure.in: Change libselinux detection to not link libglib

View File

@ -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)

View File

@ -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 */
}
}