Source-Changes-HG archive

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

[src/netbsd-2-0]: src/sys/arch Pull up revision 1.2 (requested by kleink in t...



details:   https://anonhg.NetBSD.org/src/rev/d3b38e66212c
branches:  netbsd-2-0
changeset: 561365:d3b38e66212c
user:      tron <tron%NetBSD.org@localhost>
date:      Mon Jun 14 17:58:17 2004 +0000

description:
Pull up revision 1.2 (requested by kleink in ticket #467):
Reflect <sys/endian.h> rev. 1.4: make htonl() et al. arguments and
results uint{16,32}_t.  Noted by Ian Zagorskih.

diffstat:

 sys/arch/amd64/include/endian_machdep.h |  10 +++++-----
 sys/arch/i386/include/endian_machdep.h  |  10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diffs (46 lines):

diff -r ac177b3207ca -r d3b38e66212c sys/arch/amd64/include/endian_machdep.h
--- a/sys/arch/amd64/include/endian_machdep.h   Mon Jun 14 04:18:14 2004 +0000
+++ b/sys/arch/amd64/include/endian_machdep.h   Mon Jun 14 17:58:17 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: endian_machdep.h,v 1.1 2003/04/26 18:39:40 fvdl Exp $  */
+/*     $NetBSD: endian_machdep.h,v 1.1.4.1 2004/06/14 17:58:17 tron Exp $      */
 
 #define _BYTE_ORDER _LITTLE_ENDIAN
 
@@ -6,9 +6,9 @@
 
 #include <machine/byte_swap.h>
 
-#define        ntohl(x)        ((in_addr_t)__byte_swap_long((in_addr_t)(x)))
-#define        ntohs(x)        ((in_port_t)__byte_swap_word((in_port_t)(x)))
-#define        htonl(x)        ((in_addr_t)__byte_swap_long((in_addr_t)(x)))
-#define        htons(x)        ((in_port_t)__byte_swap_word((in_port_t)(x)))
+#define        ntohl(x)        ((uint32_t)__byte_swap_long((uint32_t)(x)))
+#define        ntohs(x)        ((uint16_t)__byte_swap_word((uint16_t)(x)))
+#define        htonl(x)        ((uint32_t)__byte_swap_long((uint32_t)(x)))
+#define        htons(x)        ((uint16_t)__byte_swap_word((uint16_t)(x)))
 
 #endif
diff -r ac177b3207ca -r d3b38e66212c sys/arch/i386/include/endian_machdep.h
--- a/sys/arch/i386/include/endian_machdep.h    Mon Jun 14 04:18:14 2004 +0000
+++ b/sys/arch/i386/include/endian_machdep.h    Mon Jun 14 17:58:17 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: endian_machdep.h,v 1.1 2000/03/17 00:09:20 mycroft Exp $       */
+/*     $NetBSD: endian_machdep.h,v 1.1.34.1 2004/06/14 17:58:17 tron Exp $     */
 
 #define _BYTE_ORDER _LITTLE_ENDIAN
 
@@ -6,9 +6,9 @@
 
 #include <machine/byte_swap.h>
 
-#define        ntohl(x)        ((in_addr_t)__byte_swap_long((in_addr_t)(x)))
-#define        ntohs(x)        ((in_port_t)__byte_swap_word((in_port_t)(x)))
-#define        htonl(x)        ((in_addr_t)__byte_swap_long((in_addr_t)(x)))
-#define        htons(x)        ((in_port_t)__byte_swap_word((in_port_t)(x)))
+#define        ntohl(x)        ((uint32_t)__byte_swap_long((uint32_t)(x)))
+#define        ntohs(x)        ((uint16_t)__byte_swap_word((uint16_t)(x)))
+#define        htonl(x)        ((uint32_t)__byte_swap_long((uint32_t)(x)))
+#define        htons(x)        ((uint16_t)__byte_swap_word((uint16_t)(x)))
 
 #endif



Home | Main Index | Thread Index | Old Index