Fix the signatures of inet_addr(), inet_lnaof(), inet_makeaddr(), inet_netof(),

and inet_network() to match XNS and (where applicable) POSIX.  This is largely
just the replacement of unsigned long with in_addr_t.

This constitutes a small ABI change on sh5, but scw (sh5 portmaster) thinks
that both the users of that port will be able to cope.  kleink claims the
change is ABI-neutral on other LP64 ports, and it's a no-op on ILP32 ports.
Hence, I'm doing it this way and avoiding the whole __RENAME dance.
This commit is contained in:
bjh21 2003-05-05 13:56:13 +00:00
parent 76a6e18152
commit 77de1304d5
6 changed files with 21 additions and 21 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: inet.h,v 1.14 2003/04/29 11:58:15 bjh21 Exp $ */
/* $NetBSD: inet.h,v 1.15 2003/05/05 13:56:13 bjh21 Exp $ */
/*
* ++Copyright++ 1983, 1993
@ -78,11 +78,11 @@ typedef __socklen_t socklen_t;
#endif /* _POSIX_C_SOURCE >= 200112 || XOPEN_SOURCE >= 520 || _NETBSD_SOURCE */
__BEGIN_DECLS
unsigned long inet_addr __P((const char *));
unsigned long inet_lnaof __P((struct in_addr));
struct in_addr inet_makeaddr __P((u_long , u_long));
unsigned long inet_netof __P((struct in_addr));
unsigned long inet_network __P((const char *));
in_addr_t inet_addr __P((const char *));
in_addr_t inet_lnaof __P((struct in_addr));
struct in_addr inet_makeaddr __P((in_addr_t, in_addr_t));
in_addr_t inet_netof __P((struct in_addr));
in_addr_t inet_network __P((const char *));
char *inet_ntoa __P((struct in_addr));
#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \
defined(_NETBSD_SOURCE)

View File

@ -1,4 +1,4 @@
/* $NetBSD: inet_lnaof.c,v 1.7 2000/01/22 22:19:15 mycroft Exp $ */
/* $NetBSD: inet_lnaof.c,v 1.8 2003/05/05 13:56:14 bjh21 Exp $ */
/*
* Copyright (c) 1983, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)inet_lnaof.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: inet_lnaof.c,v 1.7 2000/01/22 22:19:15 mycroft Exp $");
__RCSID("$NetBSD: inet_lnaof.c,v 1.8 2003/05/05 13:56:14 bjh21 Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -56,7 +56,7 @@ __weak_alias(inet_lnaof,_inet_lnaof)
* internet address; handles class a/b/c network
* number formats.
*/
u_long
in_addr_t
inet_lnaof(in)
struct in_addr in;
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: inet_makeaddr.c,v 1.10 2002/02/14 22:10:56 augustss Exp $ */
/* $NetBSD: inet_makeaddr.c,v 1.11 2003/05/05 13:56:14 bjh21 Exp $ */
/*
* Copyright (c) 1983, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)inet_makeaddr.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: inet_makeaddr.c,v 1.10 2002/02/14 22:10:56 augustss Exp $");
__RCSID("$NetBSD: inet_makeaddr.c,v 1.11 2003/05/05 13:56:14 bjh21 Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -57,7 +57,7 @@ __weak_alias(inet_makeaddr,_inet_makeaddr)
*/
struct in_addr
inet_makeaddr(net, host)
u_long net, host;
in_addr_t net, host;
{
in_addr_t anet = (in_addr_t)net;
in_addr_t ahost = (in_addr_t)host;

View File

@ -1,4 +1,4 @@
/* $NetBSD: inet_netof.c,v 1.7 2000/01/22 22:19:15 mycroft Exp $ */
/* $NetBSD: inet_netof.c,v 1.8 2003/05/05 13:56:14 bjh21 Exp $ */
/*
* Copyright (c) 1983, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)inet_netof.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: inet_netof.c,v 1.7 2000/01/22 22:19:15 mycroft Exp $");
__RCSID("$NetBSD: inet_netof.c,v 1.8 2003/05/05 13:56:14 bjh21 Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -55,7 +55,7 @@ __weak_alias(inet_netof,_inet_netof)
* Return the network number from an internet
* address; handles class a/b/c network #'s.
*/
u_long
in_addr_t
inet_netof(in)
struct in_addr in;
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: inet_network.c,v 1.14 2001/07/22 15:16:18 itojun Exp $ */
/* $NetBSD: inet_network.c,v 1.15 2003/05/05 13:56:14 bjh21 Exp $ */
/*
* Copyright (c) 1983, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)inet_network.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: inet_network.c,v 1.14 2001/07/22 15:16:18 itojun Exp $");
__RCSID("$NetBSD: inet_network.c,v 1.15 2003/05/05 13:56:14 bjh21 Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -59,7 +59,7 @@ __weak_alias(inet_network,_inet_network)
* The library routines call this routine to interpret
* network numbers.
*/
u_long
in_addr_t
inet_network(cp)
register const char *cp;
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: inet_pton.c,v 1.17 2002/11/11 18:04:18 thorpej Exp $ */
/* $NetBSD: inet_pton.c,v 1.18 2003/05/05 13:56:14 bjh21 Exp $ */
/* Copyright (c) 1996 by Internet Software Consortium.
*
@ -21,7 +21,7 @@
#if 0
static char rcsid[] = "Id: inet_pton.c,v 8.7 1996/08/05 08:31:35 vixie Exp ";
#else
__RCSID("$NetBSD: inet_pton.c,v 1.17 2002/11/11 18:04:18 thorpej Exp $");
__RCSID("$NetBSD: inet_pton.c,v 1.18 2003/05/05 13:56:14 bjh21 Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -317,7 +317,7 @@ inet_pton6(src, dst)
* Ascii internet address interpretation routine.
* The value returned is in network order.
*/
u_long
in_addr_t
inet_addr(cp)
register const char *cp;
{