diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-05-07 07:22:34 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-05-07 07:22:34 +0000 |
commit | 01374b354a584861150a3763813e6b1475682451 (patch) | |
tree | 20cbd4e1e97837d654ec825dfb6937b5030f14ad /sys/arch/i386/include/endian.h | |
parent | a67cb0ed502d0c21cf6ab116718b19d1cbeb39bc (diff) |
sync with 0504; prototype changes
Diffstat (limited to 'sys/arch/i386/include/endian.h')
-rw-r--r-- | sys/arch/i386/include/endian.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sys/arch/i386/include/endian.h b/sys/arch/i386/include/endian.h index 056a456a205..73581faea19 100644 --- a/sys/arch/i386/include/endian.h +++ b/sys/arch/i386/include/endian.h @@ -1,4 +1,4 @@ -/* $NetBSD: endian.h,v 1.16 1995/06/01 17:19:18 mycroft Exp $ */ +/* $NetBSD: endian.h,v 1.17 1996/05/03 19:25:23 christos Exp $ */ /* * Copyright (c) 1995 Charles M. Hannum. All rights reserved. @@ -60,10 +60,10 @@ #include <sys/cdefs.h> __BEGIN_DECLS -unsigned long htonl __P((unsigned long)); -unsigned short htons __P((unsigned short)); -unsigned long ntohl __P((unsigned long)); -unsigned short ntohs __P((unsigned short)); +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)); __END_DECLS @@ -71,14 +71,14 @@ __END_DECLS #if defined(_KERNEL) && !defined(I386_CPU) #define __byte_swap_long_variable(x) \ -({ register unsigned long __x = (x); \ +({ register u_int32_t __x = (x); \ __asm ("bswap %1" \ : "=r" (__x) \ : "0" (__x)); \ __x; }) #else #define __byte_swap_long_variable(x) \ -({ register unsigned long __x = (x); \ +({ register u_int32_t __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 unsigned short __x = (x); \ +({ register u_int16_t __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((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)) +#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)) #endif /* _POSIX_SOURCE */ |