-/* $OpenBSD: string.h,v 1.33 2024/06/23 07:08:26 otto Exp $ */
+/* $OpenBSD: string.h,v 1.34 2024/08/03 20:13:23 guenther Exp $ */
/* $NetBSD: string.h,v 1.6 1994/10/26 00:56:30 cgd Exp $ */
/*-
__attribute__ ((__bounded__(__string__,1,3)));
#endif
+#if __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE
+void *memmem(const void *, size_t, const void *, size_t);
+size_t strlcat(char *__restrict, const char *__restrict, size_t)
+ __attribute__ ((__bounded__(__string__,1,3)));
+size_t strlcpy(char *__restrict, const char *__restrict, size_t)
+ __attribute__ ((__bounded__(__string__,1,3)));
+#endif
+
#if __BSD_VISIBLE
void explicit_bzero(void *, size_t)
__attribute__ ((__bounded__(__buffer__,1,2)));
-void *memmem(const void *, size_t, const void *, size_t);
void *memrchr(const void *, int, size_t);
char *strcasestr(const char *, const char *);
-size_t strlcat(char *, const char *, size_t)
- __attribute__ ((__bounded__(__string__,1,3)));
-size_t strlcpy(char *, const char *, size_t)
- __attribute__ ((__bounded__(__string__,1,3)));
void strmode(__mode_t, char *);
char *strsep(char **, const char *);
int timingsafe_bcmp(const void *, const void *, size_t);
-.\" $OpenBSD: memmem.3,v 1.3 2020/04/16 12:40:41 claudio Exp $
+.\" $OpenBSD: memmem.3,v 1.4 2024/08/03 20:13:23 guenther Exp $
.\"
.\" Copyright (c) 2005 Pascal Gloor <pascal.gloor@spale.com>
.\"
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: April 16 2020 $
+.Dd $Mdocdate: August 3 2024 $
.Dt MEMMEM 3
.Os
.Sh NAME
.Xr strchr 3 ,
.Xr strstr 3
.Sh STANDARDS
+The
.Fn memmem
-is a GNU extension.
+function conforms to
+.St -p1003.1-2024 .
.Sh HISTORY
The
.Fn memmem
-.\" $OpenBSD: strlcpy.3,v 1.27 2019/01/25 00:19:25 millert Exp $
+.\" $OpenBSD: strlcpy.3,v 1.28 2024/08/03 20:13:23 guenther Exp $
.\"
.\" Copyright (c) 1998, 2000 Todd C. Miller <millert@openbsd.org>
.\"
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: January 25 2019 $
+.Dd $Mdocdate: August 3 2024 $
.Dt STRLCPY 3
.Os
.Sh NAME
.Sh SYNOPSIS
.In string.h
.Ft size_t
-.Fn strlcpy "char *dst" "const char *src" "size_t dstsize"
+.Fn strlcpy "char * restrict dst" "const char * restrict src" "size_t dstsize"
.Ft size_t
-.Fn strlcat "char *dst" "const char *src" "size_t dstsize"
+.Fn strlcat "char * restrict dst" "const char * restrict src" "size_t dstsize"
.Sh DESCRIPTION
The
.Fn strlcpy
.Xr strncat 3 ,
.Xr strncpy 3 ,
.Xr wcslcpy 3
+.Sh STANDARDS
+The
+.Fn strlcat
+and
+.Fn strlcpy
+functions conform to
+.St -p1003.1-2024 .
.Sh HISTORY
.Fn strlcpy
and