summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/man/man3c/Makefile2
-rw-r--r--usr/src/man/man3c/memory.3c20
-rw-r--r--usr/src/man/man3lib/libc.3lib7
-rw-r--r--usr/src/pkg/manifests/system-library.man3c.inc1
4 files changed, 21 insertions, 9 deletions
diff --git a/usr/src/man/man3c/Makefile b/usr/src/man/man3c/Makefile
index 1a50ed5fa9..92830c3d85 100644
--- a/usr/src/man/man3c/Makefile
+++ b/usr/src/man/man3c/Makefile
@@ -914,6 +914,7 @@ MANLINKS= FD_CLR.3c \
memchr.3c \
memcmp.3c \
memcpy.3c \
+ memmem.3c \
memmove.3c \
memset.3c \
minor.3c \
@@ -1811,6 +1812,7 @@ memccpy.3c := LINKSRC = memory.3c
memchr.3c := LINKSRC = memory.3c
memcmp.3c := LINKSRC = memory.3c
memcpy.3c := LINKSRC = memory.3c
+memmem.3c := LINKSRC = memory.3c
memmove.3c := LINKSRC = memory.3c
memset.3c := LINKSRC = memory.3c
diff --git a/usr/src/man/man3c/memory.3c b/usr/src/man/man3c/memory.3c
index eafcfc2a13..02102892ab 100644
--- a/usr/src/man/man3c/memory.3c
+++ b/usr/src/man/man3c/memory.3c
@@ -1,4 +1,5 @@
'\" te
+.\" Copyright (c) 2014, Joyent, Inc.
.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 1989 AT&T
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
@@ -6,7 +7,7 @@
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH MEMORY 3C "Feb 4, 2009"
.SH NAME
-memory, memccpy, memchr, memcmp, memcpy, memmove, memset \- memory operations
+memory, memccpy, memchr, memcmp, memcpy, memmem, memmove, memset \- memory operations
.SH SYNOPSIS
.LP
.nf
@@ -33,6 +34,11 @@ memory, memccpy, memchr, memcmp, memcpy, memmove, memset \- memory operations
.LP
.nf
+\fBvoid *\fR\fBmemmem\fR(\fBconst void *\fR\fIl\fR, \fBsize_t\fR \fIl_len\fR, \fBconst void *\fR\fIs\fR, \fBsize_t\fR \fIs_len\fR);
+.fi
+
+.LP
+.nf
\fBvoid *\fR\fBmemmove\fR(\fBvoid *\fR\fIs1\fR, \fBconst void *\fR\fIs2\fR, \fBsize_t\fR \fIn\fR);
.fi
@@ -57,7 +63,6 @@ memory, memccpy, memchr, memcmp, memcpy, memmove, memset \- memory operations
.fi
.SH DESCRIPTION
-.sp
.LP
These functions operate as efficiently as possible on memory areas (arrays of
bytes bounded by a count, not terminated by a null character). They do not
@@ -90,6 +95,13 @@ The \fBmemcpy()\fR function copies \fIn\fR bytes from memory area \fIs2\fR to
overlap, the behavior is undefined.
.sp
.LP
+The \fBmemmem()\fR function searches for the \fIs_len\fR long byte pattern
+\fIs\fR in the memory region starting at \fBl\fR for \fl_len\fR bytes. If a
+match is found, a pointer to the starting location in \fIl\fR is returned. If no
+match is found, \fIl_len\fR is zero, \fIs_len\fR is zero, or \fIl_len\fR is less
+than \fIs_len\fR, then a null pointer is return.
+.sp
+.LP
The \fBmemmove()\fR function copies \fIn\fR bytes from memory area \fIs2\fR to
memory area \fIs1\fR. Copying between objects that overlap will take place
correctly. It returns \fIs1\fR.
@@ -99,12 +111,10 @@ The \fBmemset()\fR function sets the first \fIn\fR bytes in memory area \fIs\fR
to the value of \fIc\fR (converted to an \fBunsigned char\fR). It returns
\fIs\fR.
.SH USAGE
-.sp
.LP
Using \fBmemcpy()\fR might be faster than using \fBmemmove()\fR if the
application knows that the objects being copied do not overlap.
.SH ATTRIBUTES
-.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
@@ -124,11 +134,9 @@ Standard See \fBstandards\fR(5).
.TE
.SH SEE ALSO
-.sp
.LP
\fBstring\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)
.SH NOTES
-.sp
.LP
Overlap between objects being copied can arise even when their (virtual)
address ranges appear to be disjoint; for example, as a result of
diff --git a/usr/src/man/man3lib/libc.3lib b/usr/src/man/man3lib/libc.3lib
index 6e5e22f798..7ba395c349 100644
--- a/usr/src/man/man3lib/libc.3lib
+++ b/usr/src/man/man3lib/libc.3lib
@@ -408,7 +408,8 @@ l l .
\fBmembar_producer\fR \fBmemccpy\fR
\fBmemchr\fR \fBmemcmp\fR
\fBmemcntl\fR \fBmemcpy\fR
-\fBmeminfo\fR \fBmemmove\fR
+\fBmeminfo\fR \fBmemmem\fR
+\fBmemmove\fR
\fBmemset\fR \fBmincore\fR
\fBmkdir\fR \fBmkfifo\fR
\fBmknod\fR \fBmkstemp\fR
@@ -1009,13 +1010,13 @@ to avoid conflicting with an application that might define its own version of
\fBgetpwent()\fR with completely different semantics. Standard-conforming
applications may not define and use function names with leading underscores.
.LP
-Solaris system libraries are now built with direct binding. This means that a
+illumos system libraries are now built with direct binding. This means that a
system library that calls \fBgetpwent()\fR will bind directly to the instance
of \fBgetpwent()\fR in \fBlibc\fR, even if the application to which it is
linked defines a different \fBgetpwent()\fR for its own use. The application
binds to its instance of \fBgetpwent()\fR and there is no resulting conflict.
The direct binding mechanism is equally available to libraries not delivered
-with Solaris.
+with illumos.
.LP
As a result of this evolution, most of the leading-underscore synonym symbols
have been removed from \fBlibc\fR. This means that applications that call
diff --git a/usr/src/pkg/manifests/system-library.man3c.inc b/usr/src/pkg/manifests/system-library.man3c.inc
index bf8be33d69..12df716f76 100644
--- a/usr/src/pkg/manifests/system-library.man3c.inc
+++ b/usr/src/pkg/manifests/system-library.man3c.inc
@@ -915,6 +915,7 @@ link path=usr/share/man/man3c/memccpy.3c target=memory.3c
link path=usr/share/man/man3c/memchr.3c target=memory.3c
link path=usr/share/man/man3c/memcmp.3c target=memory.3c
link path=usr/share/man/man3c/memcpy.3c target=memory.3c
+link path=usr/share/man/man3c/memmem.3c target=memory.3c
link path=usr/share/man/man3c/memmove.3c target=memory.3c
link path=usr/share/man/man3c/memset.3c target=memory.3c
link path=usr/share/man/man3c/minor.3c target=makedev.3c