diff options
author | 2001-06-29 06:13:14 +0000 | |
---|---|---|
committer | 2001-06-29 06:13:14 +0000 | |
commit | 3537e2e734fb514aa0ff93a2f3818db9fd9fc01c (patch) | |
tree | 2939e7c8b36e1fcdb229fbd242fb454db2459adb | |
parent | Enable iop+ioprbs (diff) | |
download | wireguard-openbsd-3537e2e734fb514aa0ff93a2f3818db9fd9fc01c.tar.xz wireguard-openbsd-3537e2e734fb514aa0ff93a2f3818db9fd9fc01c.zip |
implement __swap64md
-rw-r--r-- | sys/arch/hppa/include/endian.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/arch/hppa/include/endian.h b/sys/arch/hppa/include/endian.h index c5b354043e3..892c8b1bd8e 100644 --- a/sys/arch/hppa/include/endian.h +++ b/sys/arch/hppa/include/endian.h @@ -1,4 +1,4 @@ -/* $OpenBSD: endian.h,v 1.5 2001/03/02 20:45:21 jason Exp $ */ +/* $OpenBSD: endian.h,v 1.6 2001/06/29 06:13:14 mickey Exp $ */ /* * Copyright (c) 1998-2000 Michael Shalayeff @@ -35,6 +35,13 @@ #ifdef __GNUC__ +#define __swap64md(x) ({ \ + u_int64_t __swap64md_x = (x); \ + \ + (u_int64_t)__swap32md(__swap64md_x >> 32) | \ + (u_int64_t)__swap32md(__swap64md_x & 0xffffffff) << 32; \ +}) + #define __swap32md(x) ({ \ register u_int32_t __swap32md_x; \ \ |