Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src More XNS5.2/POSIX-2001 alignment: change the flags argument to



details:   https://anonhg.NetBSD.org/src/rev/ad28528a200d
branches:  trunk
changeset: 526944:ad28528a200d
user:      kleink <kleink%NetBSD.org@localhost>
date:      Tue May 14 14:35:36 2002 +0000

description:
More XNS5.2/POSIX-2001 alignment: change the flags argument to
getnameinfo() from int to unsigned int.

diffstat:

 include/netdb.h            |   4 ++--
 lib/libc/net/getnameinfo.3 |   5 +++--
 lib/libc/net/getnameinfo.c |  24 +++++++++++++-----------
 3 files changed, 18 insertions(+), 15 deletions(-)

diffs (121 lines):

diff -r da7365dfd34b -r ad28528a200d include/netdb.h
--- a/include/netdb.h   Tue May 14 14:31:05 2002 +0000
+++ b/include/netdb.h   Tue May 14 14:35:36 2002 +0000
@@ -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 @@
 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
diff -r da7365dfd34b -r ad28528a200d lib/libc/net/getnameinfo.3
--- a/lib/libc/net/getnameinfo.3        Tue May 14 14:31:05 2002 +0000
+++ b/lib/libc/net/getnameinfo.3        Tue May 14 14:35:36 2002 +0000
@@ -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
diff -r da7365dfd34b -r ad28528a200d lib/libc/net/getnameinfo.c
--- a/lib/libc/net/getnameinfo.c        Tue May 14 14:31:05 2002 +0000
+++ b/lib/libc/net/getnameinfo.c        Tue May 14 14:35:36 2002 +0000
@@ -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 @@
 };
 
 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 @@
        socklen_t salen;
        char *host, *serv;
        socklen_t hostlen, servlen;
-       int flags;
+       unsigned int flags;
 {
 
        switch (sa->sa_family) {
@@ -142,7 +143,7 @@
        socklen_t hostlen;
        char *serv;
        socklen_t servlen;
-       int flags;
+       unsigned int flags;
 {
        const struct afd *afd;
        struct servent *sp;
@@ -335,7 +336,7 @@
        const char *addr;
        char *host;
        socklen_t hostlen;
-       int flags;
+       unsigned int flags;
 {
        int numaddrlen;
        char numaddr[512];
@@ -379,7 +380,7 @@
        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 @@
 /* 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;



Home | Main Index | Thread Index | Old Index