summaryrefslogtreecommitdiff
path: root/sys/i386/include/endian.h
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2000-10-16 17:06:48 +0000
committerBrian Somers <brian@FreeBSD.org>2000-10-16 17:06:48 +0000
commit0910581ff18b6b0209e17f59a2fb3ddc1977dcad (patch)
treeef6fbf686ec5bf3e68bde3637165e96cc8169529 /sys/i386/include/endian.h
parente296c9c9f746423b5004e5fdaba24b5c921d490b (diff)
Notes
Diffstat (limited to 'sys/i386/include/endian.h')
-rw-r--r--sys/i386/include/endian.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/i386/include/endian.h b/sys/i386/include/endian.h
index e2d1fa59abcc..b8619e2b7c86 100644
--- a/sys/i386/include/endian.h
+++ b/sys/i386/include/endian.h
@@ -66,6 +66,8 @@ unsigned long ntohl __P((unsigned long));
unsigned short ntohs __P((unsigned short));
__END_DECLS
+#ifdef __GNUC__
+
static __inline uint32_t
__uint16_swap_uint32(uint32_t __x)
{
@@ -97,12 +99,12 @@ __uint8_swap_uint16(uint16_t __x)
/*
* Macros for network/external number representation conversion.
*/
-#ifdef __GNUC__
#define ntohl __uint8_swap_uint32
#define ntohs __uint8_swap_uint16
#define htonl __uint8_swap_uint32
#define htons __uint8_swap_uint16
-#endif
+
+#endif /* __GNUC__ */
#define NTOHL(x) ((x) = ntohl(x))
#define NTOHS(x) ((x) = ntohs(x))