Mercurial > hg > octave-shane > gnulib-hg
annotate doc/glibc-functions/memmem.texi @ 17632:86af85d364e1 default tip
unistd: port readlink to Mac OS X 10.3.9
* lib/unistd.in.h (_GL_INCLUDING_UNISTD_H): New macro, to work
around self-include problem in Mac OS X 10.3.9 when combined with
readlink module. Problem reported by Klaus Zietler in
<http://bugs.gnu.org/16825>.
author | Paul Eggert <eggert@penguin.cs.ucla.edu> |
---|---|
date | Tue, 25 Feb 2014 11:16:27 -0800 |
parents | 498a2211d839 |
children |
rev | line source |
---|---|
9635
3a9052fb8e95
New documentation of GNU libc functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
1 @node memmem |
3a9052fb8e95
New documentation of GNU libc functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
2 @subsection @code{memmem} |
3a9052fb8e95
New documentation of GNU libc functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
3 @findex memmem |
3a9052fb8e95
New documentation of GNU libc functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
4 |
9636
fac8d34097f1
Incorporate existing memmem doc into new doc structure.
Bruno Haible <bruno@clisp.org>
parents:
9635
diff
changeset
|
5 Gnulib module: memmem or memmem-simple |
9635
3a9052fb8e95
New documentation of GNU libc functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
6 |
13934
0e10c7f526c5
memmem: rearrange memmem and expand memmem-simple modules
Pádraig Brady <P@draigBrady.com>
parents:
13917
diff
changeset
|
7 Both modules implement the same replacement for the @code{memmem} function |
0e10c7f526c5
memmem: rearrange memmem and expand memmem-simple modules
Pádraig Brady <P@draigBrady.com>
parents:
13917
diff
changeset
|
8 with the memmem module providing a replacement on more platforms where |
0e10c7f526c5
memmem: rearrange memmem and expand memmem-simple modules
Pádraig Brady <P@draigBrady.com>
parents:
13917
diff
changeset
|
9 the existing @code{memmem} function has a quadratic worst-case complexity. |
0e10c7f526c5
memmem: rearrange memmem and expand memmem-simple modules
Pádraig Brady <P@draigBrady.com>
parents:
13917
diff
changeset
|
10 |
9636
fac8d34097f1
Incorporate existing memmem doc into new doc structure.
Bruno Haible <bruno@clisp.org>
parents:
9635
diff
changeset
|
11 Portability problems fixed by either Gnulib module @code{memmem-simple} |
fac8d34097f1
Incorporate existing memmem doc into new doc structure.
Bruno Haible <bruno@clisp.org>
parents:
9635
diff
changeset
|
12 or @code{memmem}: |
9635
3a9052fb8e95
New documentation of GNU libc functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
13 @itemize |
9636
fac8d34097f1
Incorporate existing memmem doc into new doc structure.
Bruno Haible <bruno@clisp.org>
parents:
9635
diff
changeset
|
14 @item |
fac8d34097f1
Incorporate existing memmem doc into new doc structure.
Bruno Haible <bruno@clisp.org>
parents:
9635
diff
changeset
|
15 This function is missing on some platforms: |
16935
498a2211d839
Write "Mac OS X" instead of "MacOS X".
Bruno Haible <bruno@clisp.org>
parents:
16254
diff
changeset
|
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. |
9636
fac8d34097f1
Incorporate existing memmem doc into new doc structure.
Bruno Haible <bruno@clisp.org>
parents:
9635
diff
changeset
|
17 @item |
fac8d34097f1
Incorporate existing memmem doc into new doc structure.
Bruno Haible <bruno@clisp.org>
parents:
9635
diff
changeset
|
18 This function has reversed arguments on some older platforms: |
fac8d34097f1
Incorporate existing memmem doc into new doc structure.
Bruno Haible <bruno@clisp.org>
parents:
9635
diff
changeset
|
19 Linux libc 5.0.9 |
13772
1d8a613275c6
memmem, strstr, strcasestr: fix bug with long periodic needle
Eric Blake <eblake@redhat.com>
parents:
10076
diff
changeset
|
20 @item |
1d8a613275c6
memmem, strstr, strcasestr: fix bug with long periodic needle
Eric Blake <eblake@redhat.com>
parents:
10076
diff
changeset
|
21 This function can trigger false positives for long periodic needles on |
1d8a613275c6
memmem, strstr, strcasestr: fix bug with long periodic needle
Eric Blake <eblake@redhat.com>
parents:
10076
diff
changeset
|
22 some platforms: |
1d8a613275c6
memmem, strstr, strcasestr: fix bug with long periodic needle
Eric Blake <eblake@redhat.com>
parents:
10076
diff
changeset
|
23 glibc 2.12, Cygwin 1.7.7. |
9636
fac8d34097f1
Incorporate existing memmem doc into new doc structure.
Bruno Haible <bruno@clisp.org>
parents:
9635
diff
changeset
|
24 |
fac8d34097f1
Incorporate existing memmem doc into new doc structure.
Bruno Haible <bruno@clisp.org>
parents:
9635
diff
changeset
|
25 @item |
fac8d34097f1
Incorporate existing memmem doc into new doc structure.
Bruno Haible <bruno@clisp.org>
parents:
9635
diff
changeset
|
26 This function returns incorrect values in some cases, such as when |
fac8d34097f1
Incorporate existing memmem doc into new doc structure.
Bruno Haible <bruno@clisp.org>
parents:
9635
diff
changeset
|
27 given an empty needle: |
16254
da62858ef2f6
doc: Update for Solaris 11 2011-11.
Bruno Haible <bruno@clisp.org>
parents:
15607
diff
changeset
|
28 glibc <= 2.0, Solaris 11 2011-11, Cygwin 1.5.x. |
13934
0e10c7f526c5
memmem: rearrange memmem and expand memmem-simple modules
Pádraig Brady <P@draigBrady.com>
parents:
13917
diff
changeset
|
29 @end itemize |
0e10c7f526c5
memmem: rearrange memmem and expand memmem-simple modules
Pádraig Brady <P@draigBrady.com>
parents:
13917
diff
changeset
|
30 |
0e10c7f526c5
memmem: rearrange memmem and expand memmem-simple modules
Pádraig Brady <P@draigBrady.com>
parents:
13917
diff
changeset
|
31 Performance problems fixed by Gnulib module @code{memmem}: |
0e10c7f526c5
memmem: rearrange memmem and expand memmem-simple modules
Pádraig Brady <P@draigBrady.com>
parents:
13917
diff
changeset
|
32 @itemize |
9636
fac8d34097f1
Incorporate existing memmem doc into new doc structure.
Bruno Haible <bruno@clisp.org>
parents:
9635
diff
changeset
|
33 @item |
fac8d34097f1
Incorporate existing memmem doc into new doc structure.
Bruno Haible <bruno@clisp.org>
parents:
9635
diff
changeset
|
34 This function has quadratic instead of linear worst-case complexity on some |
fac8d34097f1
Incorporate existing memmem doc into new doc structure.
Bruno Haible <bruno@clisp.org>
parents:
9635
diff
changeset
|
35 platforms: |
16254
da62858ef2f6
doc: Update for Solaris 11 2011-11.
Bruno Haible <bruno@clisp.org>
parents:
15607
diff
changeset
|
36 glibc 2.8, FreeBSD 6.2, NetBSD 5.0, AIX 5.1, Solaris 11 2011-11, Cygwin 1.5.x. |
13934
0e10c7f526c5
memmem: rearrange memmem and expand memmem-simple modules
Pádraig Brady <P@draigBrady.com>
parents:
13917
diff
changeset
|
37 Note for small needles the replacement may be slower. |
9635
3a9052fb8e95
New documentation of GNU libc functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
38 @end itemize |
3a9052fb8e95
New documentation of GNU libc functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
39 |
3a9052fb8e95
New documentation of GNU libc functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
40 Portability problems not fixed by Gnulib: |
3a9052fb8e95
New documentation of GNU libc functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
41 @itemize |
3a9052fb8e95
New documentation of GNU libc functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
42 @end itemize |