From 2fd85064776510613534560f9d1814765ae84b8b Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 7 May 1996 16:47:46 +0000 Subject: you cannot use u_intXX_t everywhere --- sys/arch/i386/include/endian.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/arch/i386/include/endian.h b/sys/arch/i386/include/endian.h index 73581faea19..056a456a205 100644 --- a/sys/arch/i386/include/endian.h +++ b/sys/arch/i386/include/endian.h @@ -1,4 +1,4 @@ -/* $NetBSD: endian.h,v 1.17 1996/05/03 19:25:23 christos Exp $ */ +/* $NetBSD: endian.h,v 1.16 1995/06/01 17:19:18 mycroft Exp $ */ /* * Copyright (c) 1995 Charles M. Hannum. All rights reserved. @@ -60,10 +60,10 @@ #include __BEGIN_DECLS -u_int32_t htonl __P((u_int32_t)); -u_int16_t htons __P((u_int16_t)); -u_int32_t ntohl __P((u_int32_t)); -u_int16_t ntohs __P((u_int16_t)); +unsigned long htonl __P((unsigned long)); +unsigned short htons __P((unsigned short)); +unsigned long ntohl __P((unsigned long)); +unsigned short ntohs __P((unsigned short)); __END_DECLS @@ -71,14 +71,14 @@ __END_DECLS #if defined(_KERNEL) && !defined(I386_CPU) #define __byte_swap_long_variable(x) \ -({ register u_int32_t __x = (x); \ +({ register unsigned long __x = (x); \ __asm ("bswap %1" \ : "=r" (__x) \ : "0" (__x)); \ __x; }) #else #define __byte_swap_long_variable(x) \ -({ register u_int32_t __x = (x); \ +({ register unsigned long __x = (x); \ __asm ("rorw $8, %w1\n\trorl $16, %1\n\trorw $8, %w1" \ : "=r" (__x) \ : "0" (__x)); \ @@ -86,7 +86,7 @@ __END_DECLS #endif /* _KERNEL && ... */ #define __byte_swap_word_variable(x) \ -({ register u_int16_t __x = (x); \ +({ register unsigned short __x = (x); \ __asm ("rorw $8, %w1" \ : "=r" (__x) \ : "0" (__x)); \ @@ -127,10 +127,10 @@ __END_DECLS /* * Macros for network/external number representation conversion. */ -#define NTOHL(x) (x) = ntohl((u_int32_t)(x)) -#define NTOHS(x) (x) = ntohs((u_int16_t)(x)) -#define HTONL(x) (x) = htonl((u_int32_t)(x)) -#define HTONS(x) (x) = htons((u_int16_t)(x)) +#define NTOHL(x) (x) = ntohl((unsigned long)(x)) +#define NTOHS(x) (x) = ntohs((unsigned short)(x)) +#define HTONL(x) (x) = htonl((unsigned long)(x)) +#define HTONS(x) (x) = htons((unsigned short)(x)) #endif /* _POSIX_SOURCE */ -- cgit v1.2.3