More XNS5.2/POSIX-2001 alignment: change the flags argument to

getnameinfo() from int to unsigned int.
This commit is contained in:
kleink 2002-05-14 14:35:36 +00:00
parent 485febee55
commit 4b77e72e94
3 changed files with 18 additions and 15 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: netdb.h,v 1.24 2002/05/14 14:31:05 kleink Exp $ */
/* $NetBSD: netdb.h,v 1.25 2002/05/14 14:35:36 kleink Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -319,7 +319,7 @@ void setprotoent __P((int));
int getaddrinfo __P((const char *, const char *,
const struct addrinfo *, struct addrinfo **));
int getnameinfo __P((const struct sockaddr *, socklen_t, char *,
socklen_t, char *, socklen_t, int));
socklen_t, char *, socklen_t, unsigned int));
void freeaddrinfo __P((struct addrinfo *));
char *gai_strerror __P((int));
#endif

View File

@ -1,4 +1,4 @@
.\" $NetBSD: getnameinfo.3,v 1.18 2002/05/14 14:31:06 kleink Exp $
.\" $NetBSD: getnameinfo.3,v 1.19 2002/05/14 14:35:36 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,8 @@
.Fd #include \*[Lt]netdb.h\*[Gt]
.Ft int
.Fn getnameinfo "const struct sockaddr *sa" "socklen_t salen" \
"char *host" "socklen_t hostlen" "char *serv" "socklen_t servlen" "int flags"
"char *host" "socklen_t hostlen" "char *serv" "socklen_t servlen" \
"unsigned int flags"
.\"
.Sh DESCRIPTION
The

View File

@ -1,4 +1,4 @@
/* $NetBSD: getnameinfo.c,v 1.36 2002/05/14 14:31:06 kleink Exp $ */
/* $NetBSD: getnameinfo.c,v 1.37 2002/05/14 14:35:36 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.36 2002/05/14 14:31:06 kleink Exp $");
__RCSID("$NetBSD: getnameinfo.c,v 1.37 2002/05/14 14:35:36 kleink Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@ -93,14 +93,15 @@ struct sockinet {
};
static int getnameinfo_inet __P((const struct sockaddr *, socklen_t, char *,
socklen_t, char *, socklen_t, int));
socklen_t, char *, socklen_t, unsigned int));
#ifdef INET6
static int ip6_parsenumeric __P((const struct sockaddr *, const char *, char *,
socklen_t, int));
static int ip6_sa2str __P((const struct sockaddr_in6 *, char *, size_t, int));
socklen_t, unsigned int));
static int ip6_sa2str __P((const struct sockaddr_in6 *, char *, size_t,
unsigned int));
#endif
static int getnameinfo_link __P((const struct sockaddr *, socklen_t, char *,
socklen_t, char *, socklen_t, int));
socklen_t, char *, socklen_t, unsigned int));
static int hexname __P((const u_int8_t *, size_t, char *, socklen_t));
/*
@ -113,7 +114,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
socklen_t salen;
char *host, *serv;
socklen_t hostlen, servlen;
int flags;
unsigned int flags;
{
switch (sa->sa_family) {
@ -142,7 +143,7 @@ getnameinfo_inet(sa, salen, host, hostlen, serv, servlen, flags)
socklen_t hostlen;
char *serv;
socklen_t servlen;
int flags;
unsigned int flags;
{
const struct afd *afd;
struct servent *sp;
@ -335,7 +336,7 @@ ip6_parsenumeric(sa, addr, host, hostlen, flags)
const char *addr;
char *host;
socklen_t hostlen;
int flags;
unsigned int flags;
{
int numaddrlen;
char numaddr[512];
@ -379,7 +380,7 @@ ip6_sa2str(sa6, buf, bufsiz, flags)
const struct sockaddr_in6 *sa6;
char *buf;
size_t bufsiz;
int flags;
unsigned int flags;
{
unsigned int ifindex;
const struct in6_addr *a6;
@ -428,7 +429,8 @@ ip6_sa2str(sa6, buf, bufsiz, flags)
/* ARGSUSED */
static int
getnameinfo_link(const struct sockaddr *sa, socklen_t salen,
char *host, socklen_t hostlen, char *serv, socklen_t servlen, int flags)
char *host, socklen_t hostlen, char *serv, socklen_t servlen,
unsigned int flags)
{
const struct sockaddr_dl *sdl =
(const struct sockaddr_dl *)(const void *)sa;