Documentation about Minix.
[gnulib.git] / doc / glibc-functions / memmem.texi
1 @node memmem
2 @subsection @code{memmem}
3 @findex memmem
4
5 Gnulib module: memmem or memmem-simple
6
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.
10
11 Portability problems fixed by either Gnulib module @code{memmem-simple}
12 or @code{memmem}:
13 @itemize
14 @item
15 This function is missing on some platforms:
16 MacOS 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, Interix 3.5, BeOS.
17 @item
18 This function has reversed arguments on some older platforms:
19 Linux libc 5.0.9
20 @item
21 This function can trigger false positives for long periodic needles on
22 some platforms:
23 glibc 2.12, Cygwin 1.7.7.
24
25 @item
26 This function returns incorrect values in some cases, such as when
27 given an empty needle:
28 glibc <= 2.0, Cygwin 1.5.x.
29 @end itemize
30
31 Performance problems fixed by Gnulib module @code{memmem}:
32 @itemize
33 @item
34 This function has quadratic instead of linear worst-case complexity on some
35 platforms:
36 glibc 2.8, FreeBSD 6.2, NetBSD 5.0, AIX 5.1, Solaris 11 2010-11, Cygwin 1.5.x.
37 Note for small needles the replacement may be slower.
38 @end itemize
39
40 Portability problems not fixed by Gnulib:
41 @itemize
42 @end itemize