summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-11-10 17:25:26 +1100
committerDarren Tucker <dtucker@zip.com.au>2005-11-10 17:25:26 +1100
commit2864039a7ceebbda6fb3e0d99b891c04eb1324bd (patch)
treeb791cd681f4ac492eecbc8e6aeb4b2c0548bfef5
parentde9d623960b6e5562a73600b225d82c2497dfc58 (diff)
- (dtucker) [openbsd-compat/inet_ntop.c] Update from OpenBSD 1.5 -> 1.7.
-rw-r--r--ChangeLog5
-rw-r--r--openbsd-compat/inet_ntop.c26
2 files changed, 7 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index 324084562..22e3a3edc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -33,7 +33,8 @@
33 - (dtucker) [openbsd-compat/getcwd.c] Replace lstat with fstat to match up 33 - (dtucker) [openbsd-compat/getcwd.c] Replace lstat with fstat to match up
34 with OpenBSD code since we don't support platforms without fstat any more. 34 with OpenBSD code since we don't support platforms without fstat any more.
35 - (dtucker) [openbsd-compat/inet_aton.c] Update from OpenBSD 1.7 -> 1.9. 35 - (dtucker) [openbsd-compat/inet_aton.c] Update from OpenBSD 1.7 -> 1.9.
36 - (dtucker) [openbsd-compat/inet_nto.c] Update from OpenBSD 1.4 -> 1.6. 36 - (dtucker) [openbsd-compat/inet_ntoa.c] Update from OpenBSD 1.4 -> 1.6.
37 - (dtucker) [openbsd-compat/inet_ntop.c] Update from OpenBSD 1.5 -> 1.7.
37 38
3820051105 3920051105
39 - (djm) OpenBSD CVS Sync 40 - (djm) OpenBSD CVS Sync
@@ -3276,4 +3277,4 @@
3276 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 3277 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
3277 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 3278 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
3278 3279
3279$Id: ChangeLog,v 1.3976 2005/11/10 06:23:54 dtucker Exp $ 3280$Id: ChangeLog,v 1.3977 2005/11/10 06:25:26 dtucker Exp $
diff --git a/openbsd-compat/inet_ntop.c b/openbsd-compat/inet_ntop.c
index c75a80d2b..e7ca4b7f8 100644
--- a/openbsd-compat/inet_ntop.c
+++ b/openbsd-compat/inet_ntop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: inet_ntop.c,v 1.5 2002/08/23 16:27:31 itojun Exp $ */ 1/* $OpenBSD: inet_ntop.c,v 1.7 2005/08/06 20:30:03 espie Exp $ */
2 2
3/* Copyright (c) 1996 by Internet Software Consortium. 3/* Copyright (c) 1996 by Internet Software Consortium.
4 * 4 *
@@ -22,14 +22,6 @@
22 22
23#ifndef HAVE_INET_NTOP 23#ifndef HAVE_INET_NTOP
24 24
25#if defined(LIBC_SCCS) && !defined(lint)
26#if 0
27static char rcsid[] = "$From: inet_ntop.c,v 8.7 1996/08/05 08:41:18 vixie Exp $";
28#else
29static char rcsid[] = "$OpenBSD: inet_ntop.c,v 1.5 2002/08/23 16:27:31 itojun Exp $";
30#endif
31#endif /* LIBC_SCCS and not lint */
32
33#include <sys/param.h> 25#include <sys/param.h>
34#include <sys/types.h> 26#include <sys/types.h>
35#include <sys/socket.h> 27#include <sys/socket.h>
@@ -65,11 +57,7 @@ static const char *inet_ntop6(const u_char *src, char *dst, size_t size);
65 * Paul Vixie, 1996. 57 * Paul Vixie, 1996.
66 */ 58 */
67const char * 59const char *
68inet_ntop(af, src, dst, size) 60inet_ntop(int af, const void *src, char *dst, size_t size)
69 int af;
70 const void *src;
71 char *dst;
72 size_t size;
73{ 61{
74 switch (af) { 62 switch (af) {
75 case AF_INET: 63 case AF_INET:
@@ -95,10 +83,7 @@ inet_ntop(af, src, dst, size)
95 * Paul Vixie, 1996. 83 * Paul Vixie, 1996.
96 */ 84 */
97static const char * 85static const char *
98inet_ntop4(src, dst, size) 86inet_ntop4(const u_char *src, char *dst, size_t size)
99 const u_char *src;
100 char *dst;
101 size_t size;
102{ 87{
103 static const char fmt[] = "%u.%u.%u.%u"; 88 static const char fmt[] = "%u.%u.%u.%u";
104 char tmp[sizeof "255.255.255.255"]; 89 char tmp[sizeof "255.255.255.255"];
@@ -120,10 +105,7 @@ inet_ntop4(src, dst, size)
120 * Paul Vixie, 1996. 105 * Paul Vixie, 1996.
121 */ 106 */
122static const char * 107static const char *
123inet_ntop6(src, dst, size) 108inet_ntop6(const u_char *src, char *dst, size_t size)
124 const u_char *src;
125 char *dst;
126 size_t size;
127{ 109{
128 /* 110 /*
129 * Note that int32_t and int16_t need only be "at least" large enough 111 * Note that int32_t and int16_t need only be "at least" large enough