glib r7413 - in trunk: . glib



Author: ryanl
Date: Thu Aug 28 22:55:36 2008
New Revision: 7413
URL: http://svn.gnome.org/viewvc/glib?rev=7413&view=rev

Log:
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)



Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/glib/gstrfuncs.c

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Thu Aug 28 22:55:36 2008
@@ -559,7 +559,6 @@
 AC_CHECK_FUNCS(posix_memalign)
 AC_CHECK_FUNCS(memalign)
 AC_CHECK_FUNCS(valloc)
-AC_CHECK_FUNCS(memmem)
 
 AC_CHECK_FUNCS(atexit on_exit)
 

Modified: trunk/glib/gstrfuncs.c
==============================================================================
--- trunk/glib/gstrfuncs.c	(original)
+++ trunk/glib/gstrfuncs.c	Thu Aug 28 22:55:36 2008
@@ -2602,12 +2602,6 @@
     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 @@
 	}
       
       return NULL;
-#endif /* HAVE_MEMMEM */
     }
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]