Source-Changes-HG archive

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

[src/trunk]: src correct arg type for getnameinfo(3) for RFC2553 conformance.



details:   https://anonhg.NetBSD.org/src/rev/f52efeb478b2
branches:  trunk
changeset: 487200:f52efeb478b2
user:      itojun <itojun%NetBSD.org@localhost>
date:      Sun Jun 04 08:51:23 2000 +0000

description:
correct arg type for getnameinfo(3) for RFC2553 conformance.

diffstat:

 include/netdb.h            |  13 +++++++++++--
 lib/libc/net/getnameinfo.c |   6 +++---
 2 files changed, 14 insertions(+), 5 deletions(-)

diffs (61 lines):

diff -r 4d3d5103b3aa -r f52efeb478b2 include/netdb.h
--- a/include/netdb.h   Sun Jun 04 08:50:28 2000 +0000
+++ b/include/netdb.h   Sun Jun 04 08:51:23 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netdb.h,v 1.17 2000/02/09 12:25:07 itojun Exp $        */
+/*     $NetBSD: netdb.h,v 1.18 2000/06/04 08:51:23 itojun Exp $        */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -242,6 +242,15 @@
 #define SCOPE_DELIMITER '%'            /*KAME extension*/
 #endif /* !_XOPEN_SOURCE */
 
+/*
+ * Data types
+ */
+#include <sys/ansi.h>
+#ifndef socklen_t
+typedef __socklen_t    socklen_t;
+#define socklen_t      socklen_t
+#endif
+
 __BEGIN_DECLS
 void           endhostent __P((void));
 void           endnetent __P((void));
@@ -284,7 +293,7 @@
 #if !defined(_XOPEN_SOURCE)
 int            getaddrinfo __P((const char *, const char *,
                                 const struct addrinfo *, struct addrinfo **));
-int            getnameinfo __P((const struct sockaddr *, size_t, char *,
+int            getnameinfo __P((const struct sockaddr *, socklen_t, char *,
                                 size_t, char *, size_t, int));
 void           freeaddrinfo __P((struct addrinfo *));
 char           *gai_strerror __P((int));
diff -r 4d3d5103b3aa -r f52efeb478b2 lib/libc/net/getnameinfo.c
--- a/lib/libc/net/getnameinfo.c        Sun Jun 04 08:50:28 2000 +0000
+++ b/lib/libc/net/getnameinfo.c        Sun Jun 04 08:51:23 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: getnameinfo.c,v 1.16 2000/04/26 16:08:38 itojun Exp $  */
+/*     $NetBSD: getnameinfo.c,v 1.17 2000/06/04 08:51:23 itojun Exp $  */
 /*     $KAME: getnameinfo.c,v 1.38 2000/04/26 15:58:50 itojun Exp $    */
 
 /*
@@ -46,7 +46,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: getnameinfo.c,v 1.16 2000/04/26 16:08:38 itojun Exp $");
+__RCSID("$NetBSD: getnameinfo.c,v 1.17 2000/06/04 08:51:23 itojun Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -108,7 +108,7 @@
 int
 getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
        const struct sockaddr *sa;
-       size_t salen;
+       socklen_t salen;
        char *host;
        size_t hostlen;
        char *serv;



Home | Main Index | Thread Index | Old Index