2 @subsection @code{memmem}
5 Gnulib module: memmem or memmem-simple
7 Both modules implement the same replacement for the @code{memmem} function
8 with the memmem module providing a replacement on more platforms where
9 the existing @code{memmem} function has a quadratic worst-case complexity.
11 Portability problems fixed by either Gnulib module @code{memmem-simple}
15 This function is missing on some platforms:
16 Mac OS X 10.5, FreeBSD 5.2.1, OpenBSD 4.0, Minix 3.1.8, AIX 4.3.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw, MSVC 9, Interix 3.5, BeOS.
18 This function has reversed arguments on some older platforms:
21 This function can trigger false positives for long periodic needles on
23 glibc 2.12, Cygwin 1.7.7.
26 This function returns incorrect values in some cases, such as when
27 given an empty needle:
28 glibc <= 2.0, Solaris 11 2011-11, Cygwin 1.5.x.
31 Performance problems fixed by Gnulib module @code{memmem}:
34 This function has quadratic instead of linear worst-case complexity on some
36 glibc 2.8, FreeBSD 6.2, NetBSD 5.0, AIX 5.1, Solaris 11 2011-11, Cygwin 1.5.x.
37 Note for small needles the replacement may be slower.
40 Portability problems not fixed by Gnulib: