Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Align with XNS5.2/POSIX-2001: change hostlen and servlen arg...
details: https://anonhg.NetBSD.org/src/rev/da7365dfd34b
branches: trunk
changeset: 526943:da7365dfd34b
user: kleink <kleink%NetBSD.org@localhost>
date: Tue May 14 14:31:05 2002 +0000
description:
Align with XNS5.2/POSIX-2001: change hostlen and servlen arguments to
getnameinfo() from size_t to socklen_t.
diffstat:
include/netdb.h | 4 ++--
lib/libc/net/getnameinfo.3 | 4 ++--
lib/libc/net/getnameinfo.c | 25 +++++++++++++------------
3 files changed, 17 insertions(+), 16 deletions(-)
diffs (123 lines):
diff -r 9c48aac5ccc2 -r da7365dfd34b include/netdb.h
--- a/include/netdb.h Tue May 14 14:27:33 2002 +0000
+++ b/include/netdb.h Tue May 14 14:31:05 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netdb.h,v 1.23 2002/05/14 13:45:13 kleink Exp $ */
+/* $NetBSD: netdb.h,v 1.24 2002/05/14 14:31:05 kleink Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -319,7 +319,7 @@
int getaddrinfo __P((const char *, const char *,
const struct addrinfo *, struct addrinfo **));
int getnameinfo __P((const struct sockaddr *, socklen_t, char *,
- size_t, char *, size_t, int));
+ socklen_t, char *, socklen_t, int));
void freeaddrinfo __P((struct addrinfo *));
char *gai_strerror __P((int));
#endif
diff -r 9c48aac5ccc2 -r da7365dfd34b lib/libc/net/getnameinfo.3
--- a/lib/libc/net/getnameinfo.3 Tue May 14 14:27:33 2002 +0000
+++ b/lib/libc/net/getnameinfo.3 Tue May 14 14:31:05 2002 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: getnameinfo.3,v 1.17 2002/02/07 07:00:20 ross Exp $
+.\" $NetBSD: getnameinfo.3,v 1.18 2002/05/14 14:31:06 kleink Exp $
.\" $KAME: getnameinfo.3,v 1.20 2001/01/05 13:37:37 itojun Exp $
.\"
.\" Copyright (c) 1983, 1987, 1991, 1993
@@ -51,7 +51,7 @@
.Fd #include \*[Lt]netdb.h\*[Gt]
.Ft int
.Fn getnameinfo "const struct sockaddr *sa" "socklen_t salen" \
-"char *host" "size_t hostlen" "char *serv" "size_t servlen" "int flags"
+"char *host" "socklen_t hostlen" "char *serv" "socklen_t servlen" "int flags"
.\"
.Sh DESCRIPTION
The
diff -r 9c48aac5ccc2 -r da7365dfd34b lib/libc/net/getnameinfo.c
--- a/lib/libc/net/getnameinfo.c Tue May 14 14:27:33 2002 +0000
+++ b/lib/libc/net/getnameinfo.c Tue May 14 14:31:05 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getnameinfo.c,v 1.35 2002/03/04 15:16:31 sommerfeld Exp $ */
+/* $NetBSD: getnameinfo.c,v 1.36 2002/05/14 14:31:06 kleink Exp $ */
/* $KAME: getnameinfo.c,v 1.45 2000/09/25 22:43:56 itojun Exp $ */
/*
@@ -47,7 +47,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: getnameinfo.c,v 1.35 2002/03/04 15:16:31 sommerfeld Exp $");
+__RCSID("$NetBSD: getnameinfo.c,v 1.36 2002/05/14 14:31:06 kleink Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -93,15 +93,15 @@
};
static int getnameinfo_inet __P((const struct sockaddr *, socklen_t, char *,
- size_t, char *, size_t, int));
+ socklen_t, char *, socklen_t, int));
#ifdef INET6
static int ip6_parsenumeric __P((const struct sockaddr *, const char *, char *,
- size_t, int));
+ socklen_t, int));
static int ip6_sa2str __P((const struct sockaddr_in6 *, char *, size_t, int));
#endif
static int getnameinfo_link __P((const struct sockaddr *, socklen_t, char *,
- size_t, char *, size_t, int));
-static int hexname __P((const u_int8_t *, size_t, char *, size_t));
+ socklen_t, char *, socklen_t, int));
+static int hexname __P((const u_int8_t *, size_t, char *, socklen_t));
/*
* Top-level getnameinfo() code. Look at the address family, and pick an
@@ -112,7 +112,7 @@
const struct sockaddr *sa;
socklen_t salen;
char *host, *serv;
- size_t hostlen, servlen;
+ socklen_t hostlen, servlen;
int flags;
{
@@ -139,9 +139,9 @@
const struct sockaddr *sa;
socklen_t salen;
char *host;
- size_t hostlen;
+ socklen_t hostlen;
char *serv;
- size_t servlen;
+ socklen_t servlen;
int flags;
{
const struct afd *afd;
@@ -334,7 +334,7 @@
const struct sockaddr *sa;
const char *addr;
char *host;
- size_t hostlen;
+ socklen_t hostlen;
int flags;
{
int numaddrlen;
@@ -428,7 +428,7 @@
/* ARGSUSED */
static int
getnameinfo_link(const struct sockaddr *sa, socklen_t salen,
- char *host, size_t hostlen, char *serv, size_t servlen, int flags)
+ char *host, socklen_t hostlen, char *serv, socklen_t servlen, int flags)
{
const struct sockaddr_dl *sdl =
(const struct sockaddr_dl *)(const void *)sa;
@@ -501,7 +501,8 @@
hexname(cp, len, host, hostlen)
const u_int8_t *cp;
char *host;
- size_t len, hostlen;
+ size_t len;
+ socklen_t hostlen;
{
int i, n;
char *outp = host;
Home |
Main Index |
Thread Index |
Old Index