summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2000-10-25 21:43:30 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2000-10-25 21:43:30 +0000
commitd2ddc5d2b2277baed86dbf8c7bf1d9d620bb4247 (patch)
treeaa957074dcc2137971599b0ebc4a7d5f931065f1
parent163460ad330f4983c5a1bcd24d1d5a8b56d6ff5d (diff)
mark swap16() and swap32() with __extension__; guenther@gac.edu
-rw-r--r--sys/sys/endian.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/sys/endian.h b/sys/sys/endian.h
index 1cd9f4b0919..d936758ae4d 100644
--- a/sys/sys/endian.h
+++ b/sys/sys/endian.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: endian.h,v 1.4 1999/07/21 05:58:25 csapuntz Exp $ */
+/* $OpenBSD: endian.h,v 1.5 2000/10/25 21:43:29 deraadt Exp $ */
/*-
* Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
@@ -53,14 +53,14 @@
#ifdef __GNUC__
-#define __swap16gen(x) ({ \
+#define __swap16gen(x) __extension__({ \
u_int16_t __swap16gen_x = (x); \
\
(u_int16_t)((__swap16gen_x & 0xff) << 8 | \
(__swap16gen_x & 0xff00) >> 8); \
})
-#define __swap32gen(x) ({ \
+#define __swap32gen(x) __extension__({ \
u_int32_t __swap32gen_x = (x); \
\
(u_int32_t)((__swap32gen_x & 0xff) << 24 | \
@@ -91,14 +91,14 @@
#ifdef MD_SWAP
#if __GNUC__
-#define swap16(x) ({ \
+#define swap16(x) __extension__({ \
u_int16_t __swap16_x = (x); \
\
__builtin_constant_p(x) ? __swap16gen(__swap16_x) : \
__swap16md(__swap16_x); \
})
-#define swap32(x) ({ \
+#define swap32(x) __extension__({ \
u_int32_t __swap32_x = (x); \
\
__builtin_constant_p(x) ? __swap32gen(__swap32_x) : \