This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Inet address functions


The prototype of ``inet_lnaof'', ``inet_makeaddr'' and ``inet_netof''
use ``in_addr_t''.  These functions didn't compile with ``u_int32_t''
in GNU/NetBSD.

~velco
diff -rudpN libc/tags/initial/inet/inet_lnaof.c libc/trunk/inet/inet_lnaof.c
--- libc/tags/initial/inet/inet_lnaof.c	Sun Nov 24 23:51:39 2002
+++ libc/trunk/inet/inet_lnaof.c	Sun Nov 24 23:40:53 2002
@@ -40,11 +40,11 @@ static char sccsid[] = "@(#)inet_lnaof.c
  * internet address; handles class a/b/c network
  * number formats.
  */
-u_int32_t
+in_addr_t
 inet_lnaof(in)
 	struct in_addr in;
 {
-	register u_int32_t i = ntohl(in.s_addr);
+	register in_addr_t i = ntohl(in.s_addr);
 
 	if (IN_CLASSA(i))
 		return ((i)&IN_CLASSA_HOST);
diff -rudpN libc/tags/initial/inet/inet_mkadr.c libc/trunk/inet/inet_mkadr.c
--- libc/tags/initial/inet/inet_mkadr.c	Sun Nov 24 23:51:38 2002
+++ libc/trunk/inet/inet_mkadr.c	Sun Nov 24 23:40:52 2002
@@ -41,9 +41,9 @@ static char sccsid[] = "@(#)inet_makeadd
  */
 struct in_addr
 inet_makeaddr(net, host)
-	u_int32_t net, host;
+	in_addr_t net, host;
 {
-	u_int32_t addr;
+	in_addr_t addr;
 
 	if (net < 128)
 		addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST);
diff -rudpN libc/tags/initial/inet/inet_netof.c libc/trunk/inet/inet_netof.c
--- libc/tags/initial/inet/inet_netof.c	Sun Nov 24 23:51:38 2002
+++ libc/trunk/inet/inet_netof.c	Sun Nov 24 23:40:53 2002
@@ -39,11 +39,11 @@ static char sccsid[] = "@(#)inet_netof.c
  * Return the network number from an internet
  * address; handles class a/b/c network #'s.
  */
-u_int32_t
+in_addr_t
 inet_netof(in)
 	struct in_addr in;
 {
-	register u_int32_t i = ntohl(in.s_addr);
+	register in_addr_t i = ntohl(in.s_addr);
 
 	if (IN_CLASSA(i))
 		return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]