Add restrict qualifiers to getaddrinfo() and getnameinfo() arguments.
This commit is contained in:
parent
d5d8554049
commit
53b42c4e52
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netdb.h,v 1.49 2005/03/17 10:16:14 kleink Exp $ */
|
||||
/* $NetBSD: netdb.h,v 1.50 2005/03/21 13:30:50 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1983, 1988, 1993
|
||||
|
@ -325,10 +325,12 @@ void setprotoent(int);
|
|||
#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \
|
||||
defined(_NETBSD_SOURCE)
|
||||
void setservent(int);
|
||||
int getaddrinfo(const char *, const char *,
|
||||
const struct addrinfo *, struct addrinfo **);
|
||||
int getnameinfo(const struct sockaddr *, socklen_t, char *,
|
||||
socklen_t, char *, socklen_t, int);
|
||||
int getaddrinfo(const char * __restrict, const char * __restrict,
|
||||
const struct addrinfo * __restrict,
|
||||
struct addrinfo ** __restrict);
|
||||
int getnameinfo(const struct sockaddr * __restrict, socklen_t,
|
||||
char * __restrict, socklen_t,
|
||||
char * __restrict, socklen_t, int);
|
||||
void freeaddrinfo(struct addrinfo *);
|
||||
const char *gai_strerror(int);
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: getaddrinfo.3,v 1.41 2005/01/28 11:04:52 wiz Exp $
|
||||
.\" $NetBSD: getaddrinfo.3,v 1.42 2005/03/21 13:30:50 kleink Exp $
|
||||
.\" $KAME: getaddrinfo.3,v 1.36 2005/01/05 03:23:05 itojun Exp $
|
||||
.\" $OpenBSD: getaddrinfo.3,v 1.35 2004/12/21 03:40:31 jaredy Exp $
|
||||
.\"
|
||||
|
@ -29,8 +29,9 @@
|
|||
.In sys/socket.h
|
||||
.In netdb.h
|
||||
.Ft int
|
||||
.Fn getaddrinfo "const char *hostname" "const char *servname" \
|
||||
"const struct addrinfo *hints" "struct addrinfo **res"
|
||||
.Fn getaddrinfo "const char * restrict hostname" \
|
||||
"const char * restrict servname" \
|
||||
"const struct addrinfo * restrict hints" "struct addrinfo ** restrict res"
|
||||
.Ft void
|
||||
.Fn freeaddrinfo "struct addrinfo *ai"
|
||||
.Sh DESCRIPTION
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: getnameinfo.3,v 1.34 2005/01/12 14:44:11 wiz Exp $
|
||||
.\" $NetBSD: getnameinfo.3,v 1.35 2005/03/21 13:30:50 kleink Exp $
|
||||
.\" $KAME: getnameinfo.3,v 1.37 2005/01/05 03:23:05 itojun Exp $
|
||||
.\" $OpenBSD: getnameinfo.3,v 1.36 2004/12/21 09:48:20 jmc Exp $
|
||||
.\"
|
||||
|
@ -28,8 +28,9 @@
|
|||
.In sys/socket.h
|
||||
.In netdb.h
|
||||
.Ft int
|
||||
.Fn getnameinfo "const struct sockaddr *sa" "socklen_t salen" "char *host" \
|
||||
"size_t hostlen" "char *serv" "size_t servlen" "int flags"
|
||||
.Fn getnameinfo "const struct sockaddr * restrict sa" "socklen_t salen" \
|
||||
"char * restrict host" "size_t hostlen" "char * restrict serv" \
|
||||
"size_t servlen" "int flags"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn getnameinfo
|
||||
|
|
Loading…
Reference in New Issue